bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while...
public BigDecimal (BigInteger num) { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { cha...
1,447
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while...
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while...
1,448
private void expireOldRange(LiveRange lr) { for (int i=0; i<active.size(); i+=1) { LiveRange l = (LiveRange) active.get(i); if (l.getLastUseAddress() >= lr.getAssignAddress()) { return; } active.remove(l); registerPool.release(l.getLocation()); } }
private void expireOldRange(LiveRange lr) { for (int i=0; i<active.size(); i+=1) { LiveRange l = (LiveRange) active.get(i); if (l.getLastUseAddress() >= lr.getAssignAddress()) { return; } active.remove(l); RegisterLocation regLoc = (RegisterLocation) l.getLocation(); registerPool.release(regLoc.getRegist...
1,449
public StackLocation() { this(0); }
public StackLocation() { this(0); }
1,450
HelpException(String message) { super(message); }
HelpException(String message) { super(message); }
1,451
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
public void append(int count) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
1,452
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
public void append(SocketBuffer skbuf) { if (next != null) { next.append(count); } else { next = skbuf; } testBuffer(); }
1,453
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { setSize(size + count); } testBuffer(); }
1,454
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered ...
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered ...
1,457
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : ...
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : ...
1,459
public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); }
public Dimension getMaximumSize(JComponent c) { Dimension d = getPreferredSize(c); View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) d.width += view.getMaximumSpan(View.X_AXIS) - view.getPreferredSpan(View.X_AXIS); return d; }
1,460
public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); }
public Dimension getMinimumSize(JComponent c) { Dimension d = getPreferredSize(c); View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) d.width -= view.getPreferredSpan(View.X_AXIS) - view.getMinimumSpan(View.X_AXIS); return d; }
1,461
public Dimension getPreferredSize(JComponent c) { JToolTip tip = (JToolTip) c; FontMetrics fm; Toolkit g = tip.getToolkit(); text = tip.getTipText(); Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = tip.getInsets(); fm = g....
public Dimension getPreferredSize(JComponent c) { JToolTip tip = (JToolTip) c; FontMetrics fm; Toolkit g = tip.getToolkit(); text = tip.getTipText(); Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = tip.getInsets(); fm = g....
1,462
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr...
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr...
1,465
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr...
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr...
1,466
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr...
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr...
1,467
public static Icon getCheckBoxIcon() { return new Icon() { public int getIconHeight() { return 10; } public int getIconWidth() { return 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (c i...
public static Icon getCheckBoxIcon() { return new Icon() { public int getIconHeight() { return 10; } public int getIconWidth() { return 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (c i...
1,471
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDe...
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDe...
1,472
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDe...
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDe...
1,473
public FileSystem getFileSystem() { return null; }
public FileSystem getFileSystem() { return null; }
1,474
public boolean isValid() { return true; }
public boolean isValid() { return true; }
1,475
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry =...
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry =...
1,476
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry =...
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry =...
1,477
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry =...
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry =...
1,478
public boolean hasNext() { return buffer[offset] > 0; }
public boolean hasNext() { return buffer[offset] > 0; }
1,479
public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); }
public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); }
1,480
UTF_16 () { super ("UTF-16", null); }
UTF_16 () { super ("UTF-16", new String[] { "UTF16", "ISO-10646-UCS-2", "unicode", "csUnicode", "ucs-2" }); }
1,481
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
public Object read_abstract_interface() { boolean isObject = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
1,482
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
1,483
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_value(); }
1,484
public static Serializable read(InputStream input) { // Explicitly prevent the stream from closing as we may need // to read the subsequent bytes as well. Stream may be auto-closed // in its finalizer. try { // We may need to jump back if the value is read via value factory. input.mark...
public static Serializable read(InputStream input) { // Explicitly prevent the stream from closing as we may need // to read the subsequent bytes as well. Stream may be auto-closed // in its finalizer. try { // We may need to jump back if the value is read via value factory. input.mark...
1,485
public Image createImage(byte[] data) { return createImage(data, 0, data.length); }
public Image createImage(byte[] data) { return createImage(data, 0, data.length); }
1,486
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.tran...
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.tran...
1,487
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.tran...
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.tran...
1,488
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
1,489
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = subnetMask; }
1,490
public ICMPEchoHeader(SocketBuffer skbuf) { super(skbuf); }
public ICMPEchoHeader(SocketBuffer skbuf) { super(skbuf); }
1,491
private void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.a...
private void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.a...
1,492
public Dimension minimumLayoutSize(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view != null) return view.getMinimumSize(); else return new Dimension(); }
public Dimension minimumLayoutSize(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view != null) return view.getMinimumSize(); else return new Dimension(); }
1,493
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; con...
public void connect(InetAddress address, int port) { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAdd...
1,494
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; con...
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; con...
1,495
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; con...
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; con...
1,496
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; con...
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; con...
1,497
public abstract int read(ByteBuffer dst) throws IOException;
public final long read(ByteBuffer[] dsts) throws IOException { long b = 0; for (int i = 0; i < dsts.length; i++) b += read(dsts[i]); return b; }
1,498
public DatagramPacket(byte[] buf, int length) { this(buf, 0, length); }
public DatagramPacket(byte[] buf, int length) { this(buf, 0, length); }
1,499
public abstract int write(ByteBuffer src) throws IOException;
public final long write(ByteBuffer[] srcs) throws IOException { long b = 0; for (int i = 0; i < srcs.length; i++) b += write(srcs[i]); return b; }
1,500
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
public void setLevel(int newLevel) { switch (newLevel) { case OFF: log.setLevel((Level)Level.OFF); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
1,501
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.setLevel((Level)Level.DEBUG); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; ...
1,502
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.setLevel((Level)Level.INFO); break; ...
1,503
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
1,504
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
1,505
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); ...
1,506
static void fillMetalPattern(Graphics g, int x, int y, int w, int h, Color light, Color dark) { int xOff = 0; for (int mY = y; mY < (y + h); mY++) { // set color alternating with every line if ((mY % 2) == 0) g.setColor(light); else g.s...
static void fillMetalPattern(Graphics g, int x, int y, int w, int h, Color light, Color dark) { int xOff = 0; for (int mY = y; mY < (y + h); mY++) { // set color alternating with every line if (((mY - y) % 2) == 0) g.setColor(light); else ...
1,507
public int[] getSelectedIndices() { int lo, hi, n, i, j; if (selectionModel.isSelectionEmpty()) return new int[0]; lo = selectionModel.getMinSelectionIndex(); hi = selectionModel.getMaxSelectionIndex(); n = 0; for (i = lo; i <= hi; ++i) if (selectionModel.isSelectedIndex(i)) n++; ...
public int[] getSelectedIndices() { int lo, hi, n, i, j; if (selectionModel.isSelectionEmpty()) return new int[0]; lo = selectionModel.getMinSelectionIndex(); hi = selectionModel.getMaxSelectionIndex(); n = 0; for (i = lo; i <= hi; ++i) if (selectionModel.isSelectedIndex(i)) n++; ...
1,508
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == tree...
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == tree...
1,509
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == tree...
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == tree...
1,510
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == tree...
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == tree...
1,511
private Rectangle getCellBounds(int x, int y, Object cell) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm .getHeight()); }
private Rectangle getCellBounds(int x, int y, Object cell) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm .getHeight()); }
1,515
public Dimension getMaximumSize(JComponent c) { // FIXME: not implemented return new Dimension(200, 900); }
public Dimension getMaximumSize(JComponent c) { // FIXME: not implemented return getPreferredSize(c); }
1,516
public Dimension getMinimumSize(JComponent c) { // FIXME: not implemented return new Dimension(200, 900); }
public Dimension getMinimumSize(JComponent c) { // FIXME: not implemented return getPreferredSize(c); }
1,517
public TreePath getPathForRow(JTree tree, int row) { // FIXME: check visibility when expand/collapse is implemented DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); for (int i = 0; i < row; i++) { if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } ...
public TreePath getPathForRow(JTree tree, int row) { // FIXME: check visibility when expand/collapse is implemented DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); for (int i = 0; i < row; i++) { if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } ...
1,518
public TreePath getPathForRow(JTree tree, int row) { // FIXME: check visibility when expand/collapse is implemented DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); for (int i = 0; i < row; i++) { if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } ...
public TreePath getPathForRow(JTree tree, int row) { // FIXME: check visibility when expand/collapse is implemented DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); for (int i = 0; i < row; i++) { if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } ...
1,519
public int getRowCount(JTree tree) { return treeState.getRowCount(); }
public int getRowCount(JTree tree) { DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel()) .getRoot()); int count = 0; while (node != null) { count++; node = getNextVisibleNode(node); } return count; }
1,520
protected boolean isLeaf(int row) { return false; // FIXME: not implemented }
protected boolean isLeaf(int row) { TreePath pathForRow = getPathForRow(tree, row); if (pathForRow == null) return true; Object node = pathForRow.getLastPathComponent(); if (node instanceof TreeNode) return ((TreeNode) node).isLeaf(); else return true; // FIXME: not implemented }
1,521
private void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, leaf, true, false, ...
private void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, leaf, true, false, ...
1,522
private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, ...
private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, ...
1,523
private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, ...
private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, ...
1,524
private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, ...
private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, ...
1,525
private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int...
private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int...
1,526
private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int...
private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int...
1,527
private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int...
private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int...
1,528
public Point getLocationOnScreen() { final Point screen = new Point(location); final Component parent = component.getParent(); if (parent != null) { final Point parentScreen = parent.getLocationOnScreen(); screen.translate(parentScreen.x, parentScreen.y); } r...
public Point getLocationOnScreen() { final Point screen = new Point(location); final Component parent = component.getParent(); if (parent != null) { final Point parentScreen = parent.getLocationOnScreen(); screen.translate(parentScreen.x, parentScreen.y); } r...
1,529
public Image createImage(ImageProducer producer) { return new JNodeImage(producer); }
public Image createImage(ImageProducer producer) { return new JNodeImage(producer); }
1,530
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "[] value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localize...
1,534
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
1,535
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
1,536
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
1,537
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized t...
1,538
private void showPopupMenu(MouseEvent me) { JPopupMenu jpm = new JPopupMenu(); JMenuItem menuItem; Action action; final int row = spools.rowAtPoint(me.getPoint()); final int col = spools.convertColumnIndexToModel( spools.columnAtPoint(me.getPoint()));// System.out...
private void showPopupMenu(MouseEvent me) { JPopupMenu jpm = new JPopupMenu(); JMenuItem menuItem; Action action; final int row = spools.rowAtPoint(me.getPoint()); final int col = spools.convertColumnIndexToModel( spools.columnAtPoint(me.getPoint()));// System.out...
1,539
public void actionPerformed(ActionEvent e) { SpoolExportWizard sew = new SpoolExportWizard(getSpooledFile(row), session); sew.show(); }
public void actionPerformed(ActionEvent e) { SpoolExportWizard sew = new SpoolExportWizard(getSpooledFile(row), session); sew.setVisible(true); }
1,540
public NoSuchMethodException() { super(); }
public NoSuchMethodException() { super(); }
1,541
public NoSuchAlgorithmException(String msg) { super(msg); }
public NoSuchAlgorithmException() { super(msg); }
1,542
public NoSuchAlgorithmException(String msg) { super(msg); }
public NoSuchAlgorithmException(String msg) { }
1,543
SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalA...
SecureSet (final Subject subject, final int type, final Collection inElements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new Illega...
1,544
SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalA...
SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = inElements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new Illega...
1,545
SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalA...
SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalA...
1,546
SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalA...
SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalA...
1,547
public synchronized boolean contains (final Object element) { return elements.remove (element); }
public synchronized boolean contains (final Object element) { return elements.contains (element); }
1,548
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y, x + 9, y); g.drawLine(x, y + 1, x, y + 15); g.drawLine(x, y + 15, x + 12, y + 15); g.drawLine(x + 12, ...
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors y = y + getShift(); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y, x + 9, y); g.drawLine(x, y + 1, x, y + 15); g.drawLine(x, y + 15, x + 12, y + 15); ...
1,549
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y, x + 9, y); g.drawLine(x, y + 1, x, y + 15); g.drawLine(x, y + 15, x + 12, y + 15); g.drawLine(x + 12, ...
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y, x + 9, y); g.drawLine(x, y + 1, x, y + 15); g.drawLine(x, y + 15, x + 12, y + 15); g.drawLine(x + 12, ...
1,550
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y + 3, x, y + 12); g.drawLine(x, y + 12, x + 15, y + 12); g.drawLine(x + 15, y + 12, x + 15, y + 2); g.drawLine(x + 14, y + 3, x + 9, y + 3);...
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y + 3, x, y + 12); g.drawLine(x, y + 12, x + 15, y + 12); g.drawLine(x + 15, y + 12, x + 15, y + 2); g.drawLine(x + 14, y + 3, x + 9, y + 3);...
1,551
public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.s...
public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, ...
1,552
public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.s...
public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.s...
1,553
public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.s...
public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.s...
1,554
public boolean equals(Object obj) { return (obj instanceof SmallAttributeSet) && this.isEqual((AttributeSet)obj); }
public boolean equals(Object obj) { return (obj instanceof AttributeSet) && this.isEqual((AttributeSet)obj); }
1,555
public final static void setMacro(String name, String keyStrokes) { int x = 0; while (getMacroByNumber(++x) != null) {} macros.put("macro" + x + "." + name,keyStrokes); macrosExist = true; saveMacros(); }
public final static void setMacro(String name, String keyStrokes) { int x = 0; while (getMacroByNumber(++x) != null) {} macros.put("macro" + x + "." + name,keyStrokes); macrosExist = true; saveMacros(); }
1,556
public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); if (txt != null) { txt.array = this.content; txt.offset = where; txt.count = len; } }
public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); if (txt != null) { txt.array = this.content; txt.offset = where; txt.count = len; } }
1,557
public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); if (txt != null) { txt.array = this.content; txt.offset = where; txt.count = len; } }
public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); if (txt != null) { txt.array = this.content; txt.offset = where; txt.count = len;
1,558
public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy array. S...
public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems + 1); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy array. ...
1,559
public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl();...
protected DatagramSocket(DatagramSocketImpl impl) { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (pro...
1,562