bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = getTickLength(); if (tickRect.y + tickRect.height > contentRect.y + contentRect.height) tickRe... | protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0); if (tickRect.y + tickRect.height > contentRect.y... | 27,219 |
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = getTickLength(); if (tickRect.y + tickRect.height > contentRect.y + contentRect.height) tickRe... | protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = getTickLength(); if (tickRect.y + tickRect.height > contentRect.y + contentRect.height) tickRe... | 27,220 |
protected void calculateTrackBuffer() { if (slider.getOrientation() == JSlider.HORIZONTAL) trackBuffer = thumbRect.width / 2; else trackBuffer = thumbRect.height / 2; } | protected void calculateTrackBuffer() { if (slider.getOrientation() == JSlider.HORIZONTAL) { int w = Math.max(getWidthOfLowValueLabel(), getWidthOfHighValueLabel()); trackBuffer = Math.max(thumbRect.width / 2, w / 2); } else trackBuffer = thumbRect.height / 2; } | 27,221 |
protected void calculateTrackBuffer() { if (slider.getOrientation() == JSlider.HORIZONTAL) trackBuffer = thumbRect.width / 2; else trackBuffer = thumbRect.height / 2; } | protected void calculateTrackBuffer() { if (slider.getOrientation() == JSlider.HORIZONTAL) trackBuffer = thumbRect.width / 2; else { int h = Math.max(getHeightOfLowValueLabel(), getHeightOfHighValueLabel()); trackBuffer = Math.max(thumbRect.height / 2, h / 2); } } | 27,222 |
protected boolean drawInverted() { return ! (slider.getInverted() ^ leftToRightCache); } | protected boolean drawInverted() { return slider.getInverted(); } | 27,224 |
protected int getHeightOfHighValueLabel() { Component highValueLabel = getHighestValueLabel(); if (highValueLabel != null) return highValueLabel.getHeight(); else return 0; } | protected int getHeightOfHighValueLabel() { Component highValueLabel = getHighestValueLabel(); if (highValueLabel != null) return highValueLabel.getPreferredSize().height; else return 0; } | 27,225 |
protected int getHeightOfLowValueLabel() { Component lowValueLabel = getLowestValueLabel(); if (lowValueLabel != null) return lowValueLabel.getHeight(); else return 0; } | protected int getHeightOfLowValueLabel() { Component lowValueLabel = getLowestValueLabel(); if (lowValueLabel != null) return lowValueLabel.getPreferredSize().height; else return 0; } | 27,226 |
protected int getWidthOfHighValueLabel() { Component highValueLabel = getHighestValueLabel(); if (highValueLabel != null) return highValueLabel.getWidth(); else return 0; } | protected int getWidthOfHighValueLabel() { Component highValueLabel = getHighestValueLabel(); if (highValueLabel != null) return highValueLabel.getPreferredSize().width; else return 0; } | 27,227 |
protected int getWidthOfLowValueLabel() { Component lowValueLabel = getLowestValueLabel(); if (lowValueLabel != null) return lowValueLabel.getWidth(); else return 0; } | protected int getWidthOfLowValueLabel() { Component lowValueLabel = getLowestValueLabel(); if (lowValueLabel != null) return lowValueLabel.getPreferredSize().width; else return 0; } | 27,228 |
protected void paintHorizontalLabel(Graphics g, int value, Component label) { // This relies on clipping working properly or we'll end up // painting all over the place. If our preferred size is ignored, then // the labels may not fit inside the slider's bounds. Rather than mucking // with font sizes an... | protected void paintHorizontalLabel(Graphics g, int value, Component label) { // This relies on clipping working properly or we'll end up // painting all over the place. If our preferred size is ignored, then // the labels may not fit inside the slider's bounds. Rather than mucking // with font sizes an... | 27,230 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,231 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,232 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,233 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,234 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,235 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,236 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,237 |
public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | 27,238 |
protected void paintVerticalLabel(Graphics g, int value, Component label) { Dimension dim = label.getPreferredSize(); int w = (int) dim.getWidth(); int h = (int) dim.getHeight(); int max = slider.getMaximum(); int min = slider.getMinimum(); if (value > max || value < min) return; int xpos =... | protected void paintVerticalLabel(Graphics g, int value, Component label) { Dimension dim = label.getPreferredSize(); int w = (int) dim.getWidth(); int h = (int) dim.getHeight(); int max = slider.getMaximum(); int min = slider.getMinimum(); if (value > max || value < min) return; int xpos =... | 27,239 |
protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width - 1; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos = len - xPos; xPos += trackRect... | protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width - 1; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos = len - xPos; xPos += trackRect... | 27,241 |
protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width - 1; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos = len - xPos; xPos += trackRect... | protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width - 1; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos = len - xPos; xPos += trackRect... | 27,242 |
protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width - 1; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos = len - xPos; xPos += trackRect... | protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width - 1; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos = len - xPos; xPos += trackRect... | 27,243 |
protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += t... | protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += t... | 27,244 |
protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += t... | protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (int) ((value - min) / (max - min) * len + 0.5); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += trackR... | 27,245 |
protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += t... | protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += t... | 27,246 |
protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += t... | protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height - 1; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = len - yPos; yPos += trackRect.y; } else yPos += t... | 27,247 |
public void actionPerformed(ActionEvent e) { if(currentWorkspace.getLocation() == null) { JOptionPane.showMessageDialog((Component)e.getSource(), "Please save this workspace before importing workflows into it", "Warning", JOptionPane.WARNING_MESSAGE); return; } File inputFile = Utils.promptUser... | public void actionPerformed(ActionEvent e) { if(currentWorkspace.getLocation() == null) { JOptionPane.showMessageDialog((Component)e.getSource(), ResourceManager.getString("error.save.unsavedspace"), ResourceManager.getString("title.warning"), JOptionPane.WARNING_MESSAGE); return; } File inputF... | 27,248 |
public void actionPerformed(ActionEvent e) { if(currentWorkspace.getLocation() == null) { JOptionPane.showMessageDialog((Component)e.getSource(), "Please save this workspace before importing workflows into it", "Warning", JOptionPane.WARNING_MESSAGE); return; } File inputFile = Utils.promptUser... | public void actionPerformed(ActionEvent e) { if(currentWorkspace.getLocation() == null) { JOptionPane.showMessageDialog((Component)e.getSource(), "Please save this workspace before importing workflows into it", "Warning", JOptionPane.WARNING_MESSAGE); return; } File inputFile = Utils.promptUser... | 27,249 |
public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); JDialog dialog = pane.createDialog(parentComponent, title); d... | public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); JDialog dialog = pane.createDialog(parentComponent, title); d... | 27,250 |
public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); JDialog dialog = pane.createDialog(parentComponent, title); d... | public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); JDialog dialog = pane.createDialog(parentComponent, title); d... | 27,251 |
public void write (byte[] buf, int offset, int len) throws IOException { if (offset < 0 || len < 0 || offset + len > buf.length) throw new ArrayIndexOutOfBoundsException (); ch.write (buf, offset, len); } | public void write (byte[] buf, int offset, int len) throws IOException { if (offset < 0 || len < 0 || offset + len > buf.length) throw new ArrayIndexOutOfBoundsException (); ch.write (buf, offset, len); } | 27,252 |
public void write (byte[] buf, int offset, int len) throws IOException { if (offset < 0 || len < 0 || offset + len > buf.length) throw new ArrayIndexOutOfBoundsException (); ch.write (buf, offset, len); } | public void write (byte[] buf, int offset, int len) throws IOException { if (offset < 0 || len < 0 || offset + len > buf.length) throw new ArrayIndexOutOfBoundsException (); ch.write (buf, offset, len); } | 27,253 |
public RoutableSupport(long messageID) { this(messageID, false, Long.MAX_VALUE); } | public RoutableSupport() { this(messageID, false, Long.MAX_VALUE); } | 27,254 |
public RoutableSupport(long messageID) { this(messageID, false, Long.MAX_VALUE); } | public RoutableSupport(long messageID) { } | 27,255 |
protected ResolvedModuleRevision findModuleInCache(ResolveData data, ModuleRevisionId mrid) { return data.getIvy().findModuleInCache(toSystem(mrid), data.getCache(), doValidate(data)); } | protected ResolvedModuleRevision findModuleInCache(ResolveData data, ModuleRevisionId mrid) { ResolvedModuleRevision moduleFromCache = data.getIvy().findModuleInCache(toSystem(mrid), data.getCache(), doValidate(data)); if (moduleFromCache == null) { return null; } if ((getName() == null ? moduleFromCache.get... | 27,256 |
public static ModuleDescriptor toSystem(ModuleDescriptor md, Namespace ns) { return DefaultModuleDescriptor.transformInstance(md, ns); } | public static ModuleDescriptor toSystem(ModuleDescriptor md, Namespace ns) { return DefaultModuleDescriptor.transformInstance(md, ns); } | 27,257 |
public void run() { try { if (log.isTraceEnabled()) { log.trace("handing the message " + this.getCallbackObject() + " over to the remoting layer"); } callbackHandler.handleCallback(this); } catch(Throwable t) { log.error("Failed to deliver the message to the client,... | public void run() { try { if (log.isTraceEnabled()) { log.trace("handing the message " + this.getCallbackObject() + " over to the remoting layer"); } callbackHandler.handleCallback(this); } catch(Throwable t) { log.error("Failed to deliver the message to the client,... | 27,258 |
public abstract void initialize(DSAParams params, SecureRandom random) throws InvalidParameterException; | void initialize (DSAParams params, SecureRandom random) throws InvalidParameterException; | 27,259 |
public void testExclusion() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-exclusion.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayasoft", "test", "1.0"), md.ge... | public void testExclusion() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-exclusion.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayasoft", "test", "1.0"), md.ge... | 27,260 |
InetAddress() { System.out.println("CLASS: InetAddress.InetAddress()"); } | InetAddress() { if (DEBUG) System.out.println("CLASS: InetAddress.InetAddress()"); } | 27,261 |
public boolean equals(Object obj) { System.out.println("CLASS: InetAddress.equals()"); if ( (obj != null) && (obj instanceof InetAddress) ) { byte addr[] = ((InetAddress)obj).getAddress(); if ( addr.length == address.length ) { for (int i = 0; i < address.length; i++) { if (address[i] != addr[i]) { ... | public boolean equals(Object obj) { if (DEBUG) System.out.println("CLASS: InetAddress.equals()"); if ( (obj != null) && (obj instanceof InetAddress) ) { byte addr[] = ((InetAddress)obj).getAddress(); if ( addr.length == address.length ) { for (int i = 0; i < address.length; i++) { if (address[i] != ad... | 27,262 |
public byte[] getAddress() { System.out.println("CLASS: InetAddress.getAddress()"); return address; } | public byte[] getAddress() { if (DEBUG) System.out.println("CLASS: InetAddress.getAddress()"); return address; } | 27,263 |
public static InetAddress getAllByName(String host)[] throws UnknownHostException { System.out.println("CLASS: InetAddress.getAllByName("+host+")[]"); if (host == null || host.length() == 0) { throw new UnknownHostException(host == null ? "Null string" : host); } /* check if host is IP address */ byte[] a... | public static InetAddress getAllByName(String host)[] throws UnknownHostException { if (DEBUG) System.out.println("CLASS: InetAddress.getAllByName("+host+")[]"); if (host == null || host.length() == 0) { throw new UnknownHostException(host == null ? "Null string" : host); } /* check if host is IP address *... | 27,264 |
public static InetAddress getByName(String host) throws UnknownHostException { System.out.println("CLASS: InetAddress.getByName("+host+")"); if ( (host == null) || (host.length() == 0) ) { return loopbackHost; } else { byte[] addr = pton(host); if (addr != null) { return new InetAddress(null, addr); }... | public static InetAddress getByName(String host) throws UnknownHostException { if (DEBUG) System.out.println("CLASS: InetAddress.getByName("+host+")"); if ( (host == null) || (host.length() == 0) ) { return loopbackHost; } else { byte[] addr = pton(host); if (addr != null) { return new InetAddress(null,... | 27,265 |
public String getHostAddress() { int len = address.length; /* allocate room for result */ /* defined in <netinet/in.h> INET6_ADDRSTRLEN = 46 */ StringBuffer addrBuffer = new StringBuffer(46); System.out.println("CLASS: InetAddress.getHostAddress()"); /* We have an IPv6 address. * Return full address for no... | public String getHostAddress() { int len = address.length; /* allocate room for result */ /* defined in <netinet/in.h> INET6_ADDRSTRLEN = 46 */ StringBuffer addrBuffer = new StringBuffer(46); if (DEBUG) System.out.println("CLASS: InetAddress.getHostAddress()"); /* We have an IPv6 address. * Return full add... | 27,266 |
public String getHostName() { System.out.println("CLASS: InetAddress.getHostName()"); if (hostName == null) { try { hostName = getHostByAddress(address); } catch (UnknownHostException he) { hostName = getHostAddress(); } } return hostName; } | public String getHostName() { if (DEBUG) System.out.println("CLASS: InetAddress.getHostName()"); if (hostName == null) { try { hostName = getHostByAddress(address); } catch (UnknownHostException he) { hostName = getHostAddress(); } } return hostName; } | 27,267 |
public static InetAddress getLocalHost() throws UnknownHostException { System.out.println("CLASS: InetAddress.getLocalHost()"); SecurityManager s = System.getSecurityManager(); /* need to check if they are allowed to to do this */ if (localHost == null) { String host = getLocalHostName(); if (s != null) {... | public static InetAddress getLocalHost() throws UnknownHostException { if (DEBUG) System.out.println("CLASS: InetAddress.getLocalHost()"); SecurityManager s = System.getSecurityManager(); /* need to check if they are allowed to to do this */ if (localHost == null) { String host = getLocalHostName(); if (s... | 27,268 |
public int hashCode() { System.out.println("CLASS: InetAddress.hashCode()"); int hash = 0; int i = 0; int len = address.length; if (len == 16) { /* only want the last 4 bytes of IPv6 address */ i = len - 4; } for ( ; i < len; i++) hash = (hash << 8) | (address[i] & 0xFF); return hash; } | public int hashCode() { if (DEBUG) System.out.println("CLASS: InetAddress.hashCode()"); int hash = 0; int i = 0; int len = address.length; if (len == 16) { /* only want the last 4 bytes of IPv6 address */ i = len - 4; } for ( ; i < len; i++) hash = (hash << 8) | (address[i] & 0xFF); return hash; } | 27,269 |
public boolean isMulticastAddress() { System.out.println("CLASS: InetAddress.isMulticastAddress()"); int len = address.length; /* IPv4 address check for class D address */ if (len == 4) return ((address[0] & 0xF0) == 0xE0); /* IPv6 address check */ if (len == 16) return (address[0] == (byte) 0xFF); /*... | public boolean isMulticastAddress() { if (DEBUG) System.out.println("CLASS: InetAddress.isMulticastAddress()"); int len = address.length; /* IPv4 address check for class D address */ if (len == 4) return ((address[0] & 0xF0) == 0xE0); /* IPv6 address check */ if (len == 16) return (address[0] == (byte)... | 27,270 |
public String toString() { System.out.println("CLASS: InetAddress.toString()"); return getHostName() + "/" + getHostAddress(); } | public String toString() { if (DEBUG) System.out.println("CLASS: InetAddress.toString()"); return getHostName() + "/" + getHostAddress(); } | 27,271 |
private boolean handleConfiguration(boolean loaded, String conf, boolean shouldBePublic) { String[] confs = getRealConfs(conf); if (_md != null) { for (int i = 0; i < confs.length; i++) { Configuration c = _md.getConfiguration(confs[i]); if (c == null) { ... | private boolean handleConfiguration(boolean loaded, String conf, boolean shouldBePublic) { if (_md != null) { for (int i = 0; i < confs.length; i++) { Configuration c = _md.getConfiguration(confs[i]); if (c == null) { _confsToFetch.remove(co... | 27,272 |
public void setJMSDeliveryMode(int deliveryMode) throws JMSException { if (deliveryMode == DeliveryMode.PERSISTENT) { reliable = true; } else if (deliveryMode == DeliveryMode.NON_PERSISTENT) { reliable = false; } else { throw new JBossJMSException("De... | public void setJMSDeliveryMode(int deliveryMode) throws JMSException { if (deliveryMode == DeliveryMode.PERSISTENT) { reliable = true; } else if (deliveryMode == DeliveryMode.NON_PERSISTENT) { reliable = false; } else { throw new MessagingJMSException... | 27,276 |
public MessageSupport(long messageID, boolean reliable, long expiration, long timestamp, byte priority, int deliveryCount, Map headers, ... | public MessageSupport(long messageID, boolean reliable, long expiration, long timestamp, byte priority, int deliveryCount, Map headers, ... | 27,277 |
public MessageSupport(long messageID, boolean reliable, long expiration, long timestamp, byte priority, int deliveryCount, Map headers, ... | public MessageSupport(long messageID, boolean reliable, long expiration, long timestamp, byte priority, int deliveryCount, Map headers, ... | 27,278 |
public JBossTemporaryQueue(ConnectionDelegate delegate) { super(new GUID().toString()); this.delegate = delegate; } | public JBossTemporaryQueue(SessionDelegate delegate) { super(new GUID().toString()); this.delegate = delegate; } | 27,279 |
public JBossTemporaryTopic(ConnectionDelegate delegate) { super(new GUID().toString()); this.delegate = delegate; } | public JBossTemporaryTopic(SessionDelegate delegate) { super(new GUID().toString()); this.delegate = delegate; } | 27,280 |
void afterCommit(); | void afterCommit() throws TransactionException; | 27,281 |
void afterRollback(); | void afterRollback() throws TransactionException; | 27,282 |
public void addInlineChild(Context c, InlineBox ib) { if (ib == null) { throw new NullPointerException("trying to add null child"); } if (getChildCount() == 0 && ib instanceof InlineTextBox) {//first box on line InlineTextBox child = (InlineTextBox) ib; if (chil... | public void addInlineChild(Context c, InlineBox ib) { if (ib == null) { throw new NullPointerException("trying to add null child"); } if (getChildCount() == 0 && ib instanceof InlineTextBox) {//first box on line InlineTextBox child = (InlineTextBox) ib; if (chil... | 27,284 |
public void init() throws ServletException { super.init(); ServiceRegistry registry = getXFire().getServiceRegistry(); ObjectServiceFactory factory = new ObjectServiceFactory(getXFire().getTransportManager()); Service service = factory.create(Workflow.class, "Workflow", null, null); ... | public void init() throws ServletException { super.init(); ServiceRegistry registry = getXFire().getServiceRegistry(); ObjectServiceFactory factory = new ObjectServiceFactory(getXFire().getTransportManager()); Service service = factory.create(Workflow.class); service.getBinding().... | 27,286 |
public static String getCondition(String name) { return (String) conditions.get(name); } | public static String getCondition(String name) { return (String) conditions.get(name); } | 27,287 |
public static String getFunction(String name) { return (String) functions.get(name); } | public static String getFunction(String name) { return (String) functions.get(name); } | 27,288 |
public static String getRegister(String name) { return (String) registers.get(name); } | public static String getRegister(String name) { return (String) registers.get(name); } | 27,289 |
public static String getValidator(String name) { return (String) validators.get(name); } | public static String getValidator(String name) { return (String) validators.get(name); } | 27,290 |
private ObjectName deploy(String destConfig) throws Exception { ObjectName on = ServerManagement.deploy(destConfig); ServerManagement.invoke(on, "create", new Object[0], new String[0]); ServerManagement.invoke(on, "start", new Object[0], new String[0]); return on; } | protected ObjectName deploy(String destConfig) throws Exception { ObjectName on = ServerManagement.deploy(destConfig); ServerManagement.invoke(on, "create", new Object[0], new String[0]); ServerManagement.invoke(on, "start", new Object[0], new String[0]); return on; } | 27,291 |
private void undeployDestination(String name) throws Exception { if (isQueue()) { ServerManagement.undeployQueue(name); } else { ServerManagement.undeployTopic(name); } } | protected void undeployDestination(String name) throws Exception { if (isQueue()) { ServerManagement.undeployQueue(name); } else { ServerManagement.undeployTopic(name); } } | 27,292 |
public GridLayout (int rows, int cols, int hgap, int vgap) { if (rows < 0) throw new IllegalArgumentException ("number of rows cannot be negative"); if (cols < 0) throw new IllegalArgumentException ("number of columns cannot be negative"); if (rows == 0 && cols == 0) throw new IllegalArgument... | public GridLayout () { if (rows < 0) throw new IllegalArgumentException ("number of rows cannot be negative"); if (cols < 0) throw new IllegalArgumentException ("number of columns cannot be negative"); if (rows == 0 && cols == 0) throw new IllegalArgumentException ("both rows and columns cann... | 27,293 |
public GridLayout (int rows, int cols, int hgap, int vgap) { if (rows < 0) throw new IllegalArgumentException ("number of rows cannot be negative"); if (cols < 0) throw new IllegalArgumentException ("number of columns cannot be negative"); if (rows == 0 && cols == 0) throw new IllegalArgument... | public GridLayout (int rows, int cols, int hgap, int vgap) { if (rows < 0) throw new IllegalArgumentException ("number of rows cannot be negative"); if (cols < 0) throw new IllegalArgumentException ("number of columns cannot be negative"); if (rows == 0 && cols == 0) throw new IllegalArgument... | 27,294 |
public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("Routable is already a reference"); } return (MessageReference)r; } MessageReference ref = super.getReference(r.getMessageID()); if (ref != null) { ... | public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("Routable is already a reference"); } return (MessageReference)r; } MessageReference ref = super.getReference(r.getMessageID()); if (ref != null) { ... | 27,295 |
public void actionPerformed( ActionEvent evt ) { root.panel.view.c.debug_draw_boxes = !root.panel.view.c.debug_draw_boxes; root.panel.view.repaint(); } | public void actionPerformed( ActionEvent evt ) { root.panel.view.getContext().debug_draw_boxes = !root.panel.view.getContext().debug_draw_boxes; root.panel.view.repaint(); } | 27,296 |
public void actionPerformed( ActionEvent evt ) { root.panel.view.c.debug_draw_inline_boxes = !root.panel.view.c.debug_draw_inline_boxes; root.panel.view.repaint(); } | public void actionPerformed( ActionEvent evt ) { root.panel.view.getContext().debug_draw_inline_boxes = !root.panel.view.getContext().debug_draw_inline_boxes; root.panel.view.repaint(); } | 27,297 |
public void actionPerformed( ActionEvent evt ) { root.panel.view.c.debug_draw_line_boxes = !root.panel.view.c.debug_draw_line_boxes; root.panel.view.repaint(); } | public void actionPerformed( ActionEvent evt ) { root.panel.view.getContext().debug_draw_line_boxes = !root.panel.view.getContext().debug_draw_line_boxes; root.panel.view.repaint(); } | 27,298 |
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | 27,299 |
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | 27,300 |
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | 27,301 |
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is... | 27,302 |
public void onMessage(Message m) { messages.add(m); log.info("Added message " + m + " to my list"); latch.release(); //latch = new Latch(); }; | public void onMessage(Message m) { messages.add(m); log.trace("Added message " + m + " to my list"); latch.release(); //latch = new Latch(); }; | 27,303 |
public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.info("Got message:" + count); if (count == 0) { if (!("a".equals(tm.getText()))) { failed = true; ... | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + count); if (count == 0) { if (!("a".equals(tm.getText()))) { failed = true; ... | 27,304 |
public void testRedelMessageListener2() throws Exception { Connection conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageConsumer cons = sess.createConsumer(queue); RedelMessageListenerImpl listene... | public void testRedelMessageListener2() throws Exception { Connection conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageConsumer cons = sess.createConsumer(queue); RedelMessageListenerImpl listene... | 27,308 |
public void testRedelMessageListener2() throws Exception { Connection conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageConsumer cons = sess.createConsumer(queue); RedelMessageListenerImpl listene... | public void testRedelMessageListener2() throws Exception { Connection conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageConsumer cons = sess.createConsumer(queue); RedelMessageListenerImpl listene... | 27,309 |
public void testSetMessageListenerTwice() throws Exception { if (log.isTraceEnabled()) log.trace("testSetMessageListenerTwice"); MessageListenerImpl listener1 = new MessageListenerImpl(); topicConsumer.setMessageListener(listener1); log.info("Set message listener1"); MessageListenerI... | public void testSetMessageListenerTwice() throws Exception { if (log.isTraceEnabled()) log.trace("testSetMessageListenerTwice"); MessageListenerImpl listener1 = new MessageListenerImpl(); topicConsumer.setMessageListener(listener1); log.trace("Set message listener1"); MessageListener... | 27,311 |
public void testSetMessageListenerTwice() throws Exception { if (log.isTraceEnabled()) log.trace("testSetMessageListenerTwice"); MessageListenerImpl listener1 = new MessageListenerImpl(); topicConsumer.setMessageListener(listener1); log.info("Set message listener1"); MessageListenerI... | public void testSetMessageListenerTwice() throws Exception { if (log.isTraceEnabled()) log.trace("testSetMessageListenerTwice"); MessageListenerImpl listener1 = new MessageListenerImpl(); topicConsumer.setMessageListener(listener1); log.info("Set message listener1"); MessageListenerI... | 27,312 |
public void testSetMessageListenerWhileReceiving() throws Exception { if (log.isTraceEnabled()) log.trace("testSetMessageListenerWhileReceiving"); consumerConnection.start(); worker1= new Thread(new Runnable() { public void run() { try { topic... | public void testSetMessageListenerWhileReceiving() throws Exception { if (log.isTraceEnabled()) log.trace("testSetMessageListenerWhileReceiving"); consumerConnection.start(); worker1= new Thread(new Runnable() { public void run() { try { topic... | 27,313 |
public void testTimeoutReceiveOnClose() throws Exception { if (log.isTraceEnabled()) log.trace("testTimeoutReceiveOnClose"); consumerConnection.start(); final Latch latch = new Latch(); final long timeToSleep = 1000; Thread closerThread = new Thread(new Runnable() { public voi... | public void testTimeoutReceiveOnClose() throws Exception { if (log.isTraceEnabled()) log.trace("testTimeoutReceiveOnClose"); consumerConnection.start(); final Latch latch = new Latch(); final long timeToSleep = 1000; Thread closerThread = new Thread(new Runnable() { public voi... | 27,314 |
private float calcFloatProportionalValue(float relVal, short primitiveType, float baseValue, CssContext ctx) { float absVal = Float.MIN_VALUE; // NOTE: absolute datatypes (px, pt, pc, cm, etc.) are converted once and stored. // this could be done on instantiation, but it seems more clear to hav... | private float calcFloatProportionalValue(float relVal, short primitiveType, float baseValue, CssContext ctx) { float absVal = Float.MIN_VALUE; // NOTE: absolute datatypes (px, pt, pc, cm, etc.) are converted once and stored. // this could be done on instantiation, but it seems more clear to hav... | 27,315 |
public Image getImage(String uri) { java.io.InputStream is = null; Image img = null; if (imageCache != null) { SoftReference ref = (SoftReference) imageCache.get(uri); if (ref != null) { img = (Image) ref.get(); } if (img != null) { ... | public Image getImage(String uri) { java.io.InputStream is = null; Image img = null; if (imageCache != null) { SoftReference ref = (SoftReference) imageCache.get(uri); if (ref != null) { img = (Image) ref.get(); } if (img != null) { ... | 27,316 |
public java.io.Reader getReader(String uri) { java.io.InputStream is = null; Reader reader = null; try { is = new URL(resolveURI(uri)).openStream(); reader = new BufferedReader(new java.io.InputStreamReader(is)); } catch (java.net.MalformedURLException e) { ... | public java.io.Reader getReader(String uri) { java.io.InputStream is = null; Reader reader = null; try { is = new URL(uri).openStream(); reader = new BufferedReader(new java.io.InputStreamReader(is)); } catch (java.net.MalformedURLException e) { XRLog.exc... | 27,317 |
public JOptionPane(Object message, int messageType, int optionType) { this(message, messageType, optionType, null, null, null); } | public JOptionPane() { this(message, messageType, optionType, null, null, null); } | 27,318 |
public JOptionPane(Object message, int messageType, int optionType) { this(message, messageType, optionType, null, null, null); } | public JOptionPane(Object message, int messageType, int optionType) { this("JOptionPane message", PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null); } | 27,319 |
public JDialog createDialog(Component parentComponent, String title) { Frame toUse = getFrameForComponent(parentComponent); if (toUse == null) toUse = getRootFrame(); JDialog dialog = new JDialog(toUse, title); inputValue = UNINITIALIZED_VALUE; value = UNINITIALIZED_VALUE; // FIXME: This dialo... | public JDialog createDialog(Component parentComponent, String title) { Frame toUse = getFrameForComponent(parentComponent); if (toUse == null) toUse = getRootFrame(); JDialog dialog = new JDialog(toUse, title); inputValue = UNINITIALIZED_VALUE; value = UNINITIALIZED_VALUE; // FIXME: This dialo... | 27,320 |
public static Object showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSele... | public static Object showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSele... | 27,321 |
public static Object showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSele... | public static Object showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSele... | 27,322 |
public static Object showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSele... | public static Object showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSele... | 27,323 |
public void testExecTwoActions() throws Exception { long id = workflow.initialize(getClass().getResource("/samples/auto3.xml").toString(), 100, null); List currentSteps = workflow.getCurrentSteps(id); assertEquals("Unexpected number of current steps", 1, currentSteps.size()); assertEqual... | public void testExecTwoActions() throws Exception { long id = workflow.initialize(getClass().getResource("/samples/auto3.xml").toString(), 100, null); List currentSteps = workflow.getCurrentSteps(id); assertEquals("Unexpected number of current steps", 1, currentSteps.size()); assertEqual... | 27,324 |
public void testSimpleFinish() throws Exception { long id = workflow.initialize(getClass().getResource("/samples/finish1.xml").toString(), 100, null); workflow.doAction(id, 1, null); assertTrue("Finished workflow should have no current actions", workflow.getCurrentSteps(id).size() == 0); ... | public void testSimpleFinish() throws Exception { long id = workflow.initialize(getClass().getResource("/samples/finish1.xml").toString(), 100, null); workflow.doAction(id, 1, null); assertTrue("Finished workflow should have no current actions", workflow.getCurrentSteps(id).size() == 0); ... | 27,325 |
public void doAction(long id, int actionId, Map inputs) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() != WorkflowEntry.ACTIVATED) { return; } WorkflowDescriptor wf = getConfiguration().... | public void doAction(long id, int actionId, Map inputs) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() != WorkflowEntry.ACTIVATED) { return; } WorkflowDescriptor wf = getConfiguration().... | 27,326 |
public void testExampleWorkflow() throws Exception { WorkflowQuery query; String workflowName = getClass().getResource("/samples/example.xml").toString(); assertTrue("canInitialize for workflow " + workflowName + " is false", workflow.canInitialize(workflowName, 1)); long workflowId = wo... | public void testExampleWorkflow() throws Exception { WorkflowQuery query; String workflowName = getClass().getResource("/samples/example.xml").toString(); assertTrue("canInitialize for workflow " + workflowName + " is false", workflow.canInitialize(workflowName, 1)); long workflowId = wo... | 27,327 |
public void testExampleWorkflow() throws Exception { WorkflowQuery query; String workflowName = getClass().getResource("/samples/example.xml").toString(); assertTrue("canInitialize for workflow " + workflowName + " is false", workflow.canInitialize(workflowName, 1)); long workflowId = wo... | public void testExampleWorkflow() throws Exception { WorkflowQuery query; String workflowName = getClass().getResource("/samples/example.xml").toString(); assertTrue("canInitialize for workflow " + workflowName + " is false", workflow.canInitialize(workflowName, 1)); long workflowId = wo... | 27,328 |
public void testExampleWorkflow() throws Exception { WorkflowQuery query; String workflowName = getClass().getResource("/samples/example.xml").toString(); assertTrue("canInitialize for workflow " + workflowName + " is false", workflow.canInitialize(workflowName, 1)); long workflowId = wo... | public void testExampleWorkflow() throws Exception { WorkflowQuery query; String workflowName = getClass().getResource("/samples/example.xml").toString(); assertTrue("canInitialize for workflow " + workflowName + " is false", workflow.canInitialize(workflowName, 1)); long workflowId = wo... | 27,329 |
public WorkflowQuery(int field, int type, int operator, Object value) { this.type = type; this.operator = operator; this.field = field; this.value = value; } | public WorkflowQuery(int field, int type, int operator, Object value) { this.type = type; this.operator = operator; this.field = field; this.value = value; } | 27,330 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.