bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public ObjectNotActive(String why) { super(why); }
public ObjectNotActive() { super(why); }
10,034
public ObjectNotActive(String why) { super(why); }
public ObjectNotActive(String why) { }
10,035
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column);
Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column);
10,037
public abstract double get ();
public DoubleBuffer get (double[] dst, int offset, int length) { checkArraySize(dst.length, offset, length); checkForUnderflow(length); for (int i = offset; i < offset + length; i++) { dst [i] = get (); } return this; }
10,038
public abstract DoubleBuffer put (double b);
public DoubleBuffer put (DoubleBuffer src) { if (src == this) throw new IllegalArgumentException (); checkForOverflow(src.remaining ()); if (src.remaining () > 0) { double[] toPut = new double [src.remaining ()]; src.get (toPut); put (toPut); } return this; }
10,039
public int checkImage(Image image, int width, int height, ImageObserver observer) { if (peer != null) return peer.checkImage(image, width, height, observer); return getToolkit().checkImage(image, width, height, observer); }
public int checkImage(Image image, int width, int height, ImageObserver observer) { if (peer != null) return peer.checkImage(image, width, height, observer); return getToolkit().checkImage(image, width, height, observer); }
10,040
public int checkImage(Image image, int width, int height, ImageObserver observer) { if (peer != null) return peer.checkImage(image, width, height, observer); return getToolkit().checkImage(image, width, height, observer); }
public int checkImage(Image image, int width, int height, ImageObserver observer) { if (peer != null) return peer.checkImage(image, width, height, observer); return getToolkit().checkImage(image, width, height, observer); }
10,041
void createBuffers(int x, BufferCapabilities capabilities) throws AWTException;
void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException;
10,043
public IllegalComponentStateException(String message) { super(message); }
public IllegalComponentStateException() { super(message); }
10,044
public IllegalComponentStateException(String message) { super(message); }
public IllegalComponentStateException(String message) { }
10,045
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { System.out.println("HMMMMM, abstract-border.paintBorder"); }
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { System.out.println("HMMMMM, abstract-border.paintBorder"); }
10,046
void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
public void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
10,047
static JRootPane getRootPane(Component a) { if (a instanceof JRootPane) return (JRootPane) a; a = a.getParent(); if (a != null) { return getRootPane(a); } return null; }
static JRootPane getRootPane(Component a) { if (a instanceof JRootPane) return (JRootPane) a; a = a.getParent(); if (a != null) { return getRootPane(a); } return null; }
10,048
public void addPropertyChangeListener(PropertyChangeListener listener);
void addPropertyChangeListener(PropertyChangeListener listener);
10,049
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = insets.left; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,051
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,052
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = innerSize.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,053
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((innerSize.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,054
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = insets.top; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,055
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,056
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = innerSize.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,057
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((size.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
public void layoutContainer(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Dimension size = parent.getSize(); Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { int x = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cy = 0; if (height > size.height) { height = size.height; } else { cy = (int) ((size.height - height) * comp.getAlignmentY()); } comp.setSize(width, height); comp.setLocation(x, cy); x = x + width; } } else { int y = 0; for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); int width = sz.width; int height = sz.height; int cx = 0; if (width > size.width) { width = size.width; } else { cx = (int) ((innerSize.width - width) * comp.getAlignmentX()); } comp.setSize(width, height); comp.setLocation(cx, y); y = y + height; } } }
10,058
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); int x = 0; int y = 0; Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); int x = 0; int y = 0; Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMaximumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
10,059
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); int x = 0; int y = 0; Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); int x = 0; int y = 0; Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
10,060
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); int x = 0; int y = 0; Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
public Dimension preferredLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); int x = 0; int y = 0; Component[] children = parent.getComponents(); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getPreferredSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); }
10,061
protected String paramString() { return "JRadioButton"; }
protected String paramString() { return super.paramString(); }
10,062
public JToggleButton (String text, Icon icon, boolean selected) { super(text, icon); horizontalAlignment = LEADING; setModel(new ToggleButtonModel()); model.setSelected(selected); }
public JToggleButton() { super(text, icon); horizontalAlignment = LEADING; setModel(new ToggleButtonModel()); model.setSelected(selected); }
10,063
public JToggleButton (String text, Icon icon, boolean selected) { super(text, icon); horizontalAlignment = LEADING; setModel(new ToggleButtonModel()); model.setSelected(selected); }
public JToggleButton (String text, Icon icon, boolean selected) { super(text, icon); horizontalAlignment = LEADING; setModel(new ToggleButtonModel()); model.setSelected(selected); }
10,064
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
10,065
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
10,066
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); if (p.mark > endOffset) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
10,067
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; if (p.mark >= offset && p.mark <= endOffset) p.mark += incr; } }
10,068
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
10,069
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
10,070
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); if (p.mark > endOffset) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
10,071
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
10,072
public UndoableEdit insertString(int where, String str) throws BadLocationException { // check arguments int length = length(); int strLen = str.length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); replace(where, 0, str.toCharArray(), str.length()); return null; }
public UndoableEdit insertString(int where, String str) throws BadLocationException { // check arguments int length = length(); int strLen = str.length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); replace(where, 0, str.toCharArray(), strLen); return null; }
10,073
public UndoableEdit insertString(int where, String str) throws BadLocationException { // check arguments int length = length(); int strLen = str.length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); replace(where, 0, str.toCharArray(), str.length()); return null; }
public UndoableEdit insertString(int where, String str) throws BadLocationException { // check arguments int length = length(); int strLen = str.length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); replace(where, 0, str.toCharArray(), str.length()); return new UndoInsertString(where, strLen); }
10,074
public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((where + nitems) > length) throw new BadLocationException("where + nitems cannot be greater" + " than the content length", where + nitems); replace(where, nitems, null, 0); return null; }
public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((where + nitems) > length) throw new BadLocationException("where + nitems cannot be greater" + " than the content length", where + nitems); replace(where, nitems, null, 0); return new UndoRemove(where, removedText); }
10,075
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
10,076
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
10,077
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); if (p.mark > endOffset) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
10,078
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; if (p.mark >= offset && p.mark <= endOffset) p.mark = value;} }
10,079
public ListIterator<E> listIterator(final int index) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + size()); return new ListIterator<E>() { private int knownMod = modCount; private int position = index; private int lastReturned = -1; private int size = size(); // This will get inlined, since it is private. /** * Checks for modifications made to the list from * elsewhere while iteration is in progress. * * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ private void checkMod() { if (knownMod != modCount) throw new ConcurrentModificationException(); } /** * Tests to see if there are any more objects to * return. * * @return True if the end of the list has not yet been * reached. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasNext() { checkMod(); return position < size; } /** * Tests to see if there are objects prior to the * current position in the list. * * @return True if objects exist prior to the current * position of the iterator. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasPrevious() { checkMod(); return position > 0; } /** * Retrieves the next object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * more objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E next() { checkMod(); if (position == size) throw new NoSuchElementException(); lastReturned = position; return get(position++); } /** * Retrieves the previous object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * previous objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E previous() { checkMod(); if (position == 0) throw new NoSuchElementException(); lastReturned = --position; return get(lastReturned); } /** * Returns the index of the next element in the * list, which will be retrieved by <code>next()</code> * * @return The index of the next element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int nextIndex() { checkMod(); return position; } /** * Returns the index of the previous element in the * list, which will be retrieved by <code>previous()</code> * * @return The index of the previous element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int previousIndex() { checkMod(); return position - 1; } /** * Removes the last object retrieved by <code>next()</code> * or <code>previous()</code> from the list, if the list * supports object removal. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list does * not support removing elements. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void remove() { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.remove(lastReturned); size--; position = lastReturned; lastReturned = -1; knownMod = modCount; } /** * Replaces the last object retrieved by <code>next()</code> * or <code>previous</code> with o, if the list supports object * replacement and an add or remove operation has not already * been performed. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list doesn't support * the addition or removal of elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void set(E o) { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.set(lastReturned, o); } /** * Adds the supplied object before the element that would be returned * by a call to <code>next()</code>, if the list supports addition. * * @param o The object to add to the list. * @throws UnsupportedOperationException if the list doesn't support * the addition of new elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void add(E o) { checkMod(); AbstractList.this.add(position++, o); size++; lastReturned = -1; knownMod = modCount; } }; }
public ListIterator<E> listIterator() { if (index < 0 || index > size()) throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + size()); return new ListIterator<E>() { private int knownMod = modCount; private int position = index; private int lastReturned = -1; private int size = size(); // This will get inlined, since it is private. /** * Checks for modifications made to the list from * elsewhere while iteration is in progress. * * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ private void checkMod() { if (knownMod != modCount) throw new ConcurrentModificationException(); } /** * Tests to see if there are any more objects to * return. * * @return True if the end of the list has not yet been * reached. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasNext() { checkMod(); return position < size; } /** * Tests to see if there are objects prior to the * current position in the list. * * @return True if objects exist prior to the current * position of the iterator. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasPrevious() { checkMod(); return position > 0; } /** * Retrieves the next object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * more objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E next() { checkMod(); if (position == size) throw new NoSuchElementException(); lastReturned = position; return get(position++); } /** * Retrieves the previous object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * previous objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E previous() { checkMod(); if (position == 0) throw new NoSuchElementException(); lastReturned = --position; return get(lastReturned); } /** * Returns the index of the next element in the * list, which will be retrieved by <code>next()</code> * * @return The index of the next element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int nextIndex() { checkMod(); return position; } /** * Returns the index of the previous element in the * list, which will be retrieved by <code>previous()</code> * * @return The index of the previous element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int previousIndex() { checkMod(); return position - 1; } /** * Removes the last object retrieved by <code>next()</code> * or <code>previous()</code> from the list, if the list * supports object removal. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list does * not support removing elements. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void remove() { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.remove(lastReturned); size--; position = lastReturned; lastReturned = -1; knownMod = modCount; } /** * Replaces the last object retrieved by <code>next()</code> * or <code>previous</code> with o, if the list supports object * replacement and an add or remove operation has not already * been performed. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list doesn't support * the addition or removal of elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void set(E o) { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.set(lastReturned, o); } /** * Adds the supplied object before the element that would be returned * by a call to <code>next()</code>, if the list supports addition. * * @param o The object to add to the list. * @throws UnsupportedOperationException if the list doesn't support * the addition of new elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void add(E o) { checkMod(); AbstractList.this.add(position++, o); size++; lastReturned = -1; knownMod = modCount; } }; }
10,080
public ListIterator<E> listIterator(final int index) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + size()); return new ListIterator<E>() { private int knownMod = modCount; private int position = index; private int lastReturned = -1; private int size = size(); // This will get inlined, since it is private. /** * Checks for modifications made to the list from * elsewhere while iteration is in progress. * * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ private void checkMod() { if (knownMod != modCount) throw new ConcurrentModificationException(); } /** * Tests to see if there are any more objects to * return. * * @return True if the end of the list has not yet been * reached. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasNext() { checkMod(); return position < size; } /** * Tests to see if there are objects prior to the * current position in the list. * * @return True if objects exist prior to the current * position of the iterator. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasPrevious() { checkMod(); return position > 0; } /** * Retrieves the next object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * more objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E next() { checkMod(); if (position == size) throw new NoSuchElementException(); lastReturned = position; return get(position++); } /** * Retrieves the previous object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * previous objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E previous() { checkMod(); if (position == 0) throw new NoSuchElementException(); lastReturned = --position; return get(lastReturned); } /** * Returns the index of the next element in the * list, which will be retrieved by <code>next()</code> * * @return The index of the next element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int nextIndex() { checkMod(); return position; } /** * Returns the index of the previous element in the * list, which will be retrieved by <code>previous()</code> * * @return The index of the previous element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int previousIndex() { checkMod(); return position - 1; } /** * Removes the last object retrieved by <code>next()</code> * or <code>previous()</code> from the list, if the list * supports object removal. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list does * not support removing elements. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void remove() { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.remove(lastReturned); size--; position = lastReturned; lastReturned = -1; knownMod = modCount; } /** * Replaces the last object retrieved by <code>next()</code> * or <code>previous</code> with o, if the list supports object * replacement and an add or remove operation has not already * been performed. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list doesn't support * the addition or removal of elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void set(E o) { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.set(lastReturned, o); } /** * Adds the supplied object before the element that would be returned * by a call to <code>next()</code>, if the list supports addition. * * @param o The object to add to the list. * @throws UnsupportedOperationException if the list doesn't support * the addition of new elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void add(E o) { checkMod(); AbstractList.this.add(position++, o); size++; lastReturned = -1; knownMod = modCount; } }; }
public ListIterator<E> listIterator(final int index) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + size()); return new ListIterator<E>() { private int knownMod = modCount; private int position = index; private int lastReturned = -1; private int size = size(); // This will get inlined, since it is private. /** * Checks for modifications made to the list from * elsewhere while iteration is in progress. * * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ private void checkMod() { if (knownMod != modCount) throw new ConcurrentModificationException(); } /** * Tests to see if there are any more objects to * return. * * @return True if the end of the list has not yet been * reached. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasNext() { checkMod(); return position < size; } /** * Tests to see if there are objects prior to the * current position in the list. * * @return True if objects exist prior to the current * position of the iterator. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public boolean hasPrevious() { checkMod(); return position > 0; } /** * Retrieves the next object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * more objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E next() { checkMod(); if (position == size) throw new NoSuchElementException(); lastReturned = position; return get(position++); } /** * Retrieves the previous object from the list. * * @return The next object. * @throws NoSuchElementException if there are no * previous objects to retrieve. * @throws ConcurrentModificationException if the * list has been modified elsewhere. */ public E previous() { checkMod(); if (position == 0) throw new NoSuchElementException(); lastReturned = --position; return get(lastReturned); } /** * Returns the index of the next element in the * list, which will be retrieved by <code>next()</code> * * @return The index of the next element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int nextIndex() { checkMod(); return position; } /** * Returns the index of the previous element in the * list, which will be retrieved by <code>previous()</code> * * @return The index of the previous element. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public int previousIndex() { checkMod(); return position - 1; } /** * Removes the last object retrieved by <code>next()</code> * or <code>previous()</code> from the list, if the list * supports object removal. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list does * not support removing elements. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void remove() { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.remove(lastReturned); size--; position = lastReturned; lastReturned = -1; knownMod = modCount; } /** * Replaces the last object retrieved by <code>next()</code> * or <code>previous</code> with o, if the list supports object * replacement and an add or remove operation has not already * been performed. * * @throws IllegalStateException if the iterator is positioned * before the start of the list or the last object has already * been removed. * @throws UnsupportedOperationException if the list doesn't support * the addition or removal of elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void set(E o) { checkMod(); if (lastReturned < 0) throw new IllegalStateException(); AbstractList.this.set(lastReturned, o); } /** * Adds the supplied object before the element that would be returned * by a call to <code>next()</code>, if the list supports addition. * * @param o The object to add to the list. * @throws UnsupportedOperationException if the list doesn't support * the addition of new elements. * @throws ClassCastException if the type of o is not a valid type * for this list. * @throws IllegalArgumentException if something else related to o * prevents its addition. * @throws ConcurrentModificationException if the list * has been modified elsewhere. */ public void add(E o) { checkMod(); AbstractList.this.add(position++, o); size++; lastReturned = -1; knownMod = modCount; } }; }
10,081
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys != null ? sortKeys.size() : 0; List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); len = withParams.size(); List withParams2 = new ArrayList(len); for (int i = 0; i < len; i++) withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet)); TemplateNode ret = new ApplyTemplatesNode(select.clone(stylesheet), mode, sortKeys2, withParams2, isDefault); if (children != null) ret.children = children.clone(stylesheet); if (next != null) ret.next = next.clone(stylesheet); return ret; }
TemplateNode clone(Stylesheet stylesheet) { int len = sortKeys != null ? sortKeys.size() : 0; List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); len = withParams != null ? withParams.size() : 0; List withParams2 = new ArrayList(len); for (int i = 0; i < len; i++) withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet)); TemplateNode ret = new ApplyTemplatesNode(select.clone(stylesheet), mode, sortKeys2, withParams2, isDefault); if (children != null) ret.children = children.clone(stylesheet); if (next != null) ret.next = next.clone(stylesheet); return ret; }
10,082
public boolean references(QName var) { if (children != null && children.references(var)) { return true; } if (next != null && next.references(var)) { return true; } return false; }
public boolean references(QName var) if (children != null && children.references(var)) return true; } if (next != null && next.references(var)) return true; } return false; }
10,083
public boolean references(QName var) { if (children != null && children.references(var)) { return true; } if (next != null && next.references(var)) { return true; } return false; }
public boolean references(QName var) { if (children != null && children.references(var)) { return true; if (next != null && next.references(var)) { return true; return false;
10,084
final private void debug(String s) { if (Configuration.DEBUG) System.out.println(s); }
private void debug(String s) { if (Configuration.DEBUG) System.out.println(s); }
10,085
final private void dumpTable() { int start_range = 0; if (!Configuration.DEBUG) return; System.out.println("Dumping internal table:"); for (int i = 0; i < ranges.length; i++) { System.out.print("\t" + start_range + " => " + ranges[i] + ":"); if (attributes[i] == null) System.out.println("null"); else { Set keyset = attributes[i].keySet(); if (keyset != null) { Iterator keys = keyset.iterator(); while (keys.hasNext()) System.out.print(" " + keys.next()); } else System.out.println("keySet null"); System.out.println(); } } System.out.println(); System.out.flush(); }
private void dumpTable() { int start_range = 0; if (!Configuration.DEBUG) return; System.out.println("Dumping internal table:"); for (int i = 0; i < ranges.length; i++) { System.out.print("\t" + start_range + " => " + ranges[i] + ":"); if (attributes[i] == null) System.out.println("null"); else { Set keyset = attributes[i].keySet(); if (keyset != null) { Iterator keys = keyset.iterator(); while (keys.hasNext()) System.out.print(" " + keys.next()); } else System.out.println("keySet null"); System.out.println(); } } System.out.println(); System.out.flush(); }
10,086
getAttributes();
Map getAttributes();
10,087
public int getRGB(Object inData) { return ((getAlpha(inData) & 0xff) << 24) | (( getRed(inData) & 0xff) << 16) | ((getGreen(inData) & 0xff) << 8) | (( getBlue(inData) & 0xff) << 0); }
public int getRGB(int pixel) { return ((getAlpha(inData) & 0xff) << 24) | (( getRed(inData) & 0xff) << 16) | ((getGreen(inData) & 0xff) << 8) | (( getBlue(inData) & 0xff) << 0); }
10,088
public int getRGB(Object inData) { return ((getAlpha(inData) & 0xff) << 24) | (( getRed(inData) & 0xff) << 16) | ((getGreen(inData) & 0xff) << 8) | (( getBlue(inData) & 0xff) << 0); }
public int getRGB(Object inData) { return ((getAlpha(inData) & 0xff) << 24) | (( getRed(inData) & 0xff) << 16) | ((getGreen(inData) & 0xff) << 8) | (( getBlue(inData) & 0xff) << 0); }
10,089
MessageNode(TemplateNode children, TemplateNode next, boolean terminate) { super(children, next); this.terminate = terminate; }
MessageNode(boolean terminate) { super(children, next); this.terminate = terminate; }
10,090
MessageNode(TemplateNode children, TemplateNode next, boolean terminate) { super(children, next); this.terminate = terminate; }
MessageNode(TemplateNode children, TemplateNode next, boolean terminate) { this.terminate = terminate; }
10,091
TemplateNode clone(Stylesheet stylesheet) { return new MessageNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), terminate); }
TemplateNode clone(Stylesheet stylesheet) { return new MessageNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), terminate); }
10,092
public boolean equals (Object obj) { if (! (obj instanceof DateFormat)) return false; DateFormat d = (DateFormat) obj; return calendar.equals(d.calendar) && numberFormat.equals(d.numberFormat); }
public boolean equals (Object obj) { if (! (obj instanceof DateFormat)) return false; DateFormat d = (DateFormat) obj; return numberFormat.equals(d.numberFormat); }
10,094
public int hashCode () { int hash = calendar.hashCode(); if (numberFormat != null) hash ^= numberFormat.hashCode(); return hash; }
public int hashCode () { if (numberFormat != null) hash ^= numberFormat.hashCode(); return hash; }
10,095
public int hashCode () { int hash = calendar.hashCode(); if (numberFormat != null) hash ^= numberFormat.hashCode(); return hash; }
public int hashCode () { int hash = calendar.hashCode(); if (numberFormat != null) hash ^= numberFormat.hashCode(); return hash; }
10,096
public boolean equals(Object o) { return (o instanceof Calendar) && getTimeInMillis() == ((Calendar) o).getTimeInMillis(); }
public boolean equals(Object o) { return (o instanceof Calendar) && getTimeInMillis() == ((Calendar) o).getTimeInMillis(); }
10,097
public int hashCode() { long time = getTimeInMillis(); return (int) ((time & 0xffffffffL) ^ (time >> 32)); }
public int hashCode() { long time = getTimeInMillis(); int val = (int) ((time & 0xffffffffL) ^ (time >> 32)); val += (getFirstDayOfWeek() + (isLenient() ? 1230 : 1237) + getMinimalDaysInFirstWeek()); TimeZone self = getTimeZone(); if (self != null) val ^= self.hashCode(); return val; }
10,098
public void copy(int srcMemPtr, int destMemPtr, int size) { testMemPtr(srcMemPtr, size); testMemPtr(destMemPtr, size); Unsafe.copy(start.add(srcMemPtr), start.add(destMemPtr), size); }
public void copy(int srcMemPtr, int destMemPtr, int size) { testMemPtr(srcMemPtr, size); testMemPtr(destMemPtr, size); Unsafe.copy(start.add(srcMemPtr), start.add(destMemPtr), size); }
10,099
public void getBytes(int memPtr, byte[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, length); }
public void getBytes(int memPtr, byte[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs); final Extent size = Extent.fromIntZeroExtend(length); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, size); }
10,100
public void getChars(int memPtr, char[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 2); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 2); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, length * 2); }
public void getChars(int memPtr, char[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 2); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 2); final Extent size = Extent.fromIntZeroExtend(length * 2); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, size); }
10,101
public void getDoubles(int memPtr, double[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 8); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 8); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, length * 8); }
public void getDoubles(int memPtr, double[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 8); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 8); final Extent size = Extent.fromIntZeroExtend(length * 8); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, size); }
10,102
public void getInts(int memPtr, int[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 4); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 4); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, length * 4); }
public void getInts(int memPtr, int[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 4); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 4); final Extent size = Extent.fromIntZeroExtend(length); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, size); }
10,103
public void getLongs(int memPtr, long[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 8); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 8); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, length * 8); }
public void getLongs(int memPtr, long[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 8); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 8); final Extent size = Extent.fromIntZeroExtend(length * 8); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, size); }
10,104
public void getShorts(int memPtr, short[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 2); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 2); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, length * 2); }
public void getShorts(int memPtr, short[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 2); final Address dstPtr = VmMagic.getArrayData(dst).add(dstOfs * 2); final Extent size = Extent.fromIntZeroExtend(length * 2); Unsafe.copy(start.add(Offset.fromIntZeroExtend(memPtr)), dstPtr, size); }
10,105
public void setBytes(byte[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs); Unsafe.copy(srcPtr, start.add(dstPtr), length); }
public void setBytes(byte[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs); final Extent size = Extent.fromIntZeroExtend(length); Unsafe.copy(srcPtr, start.add(dstPtr), size); }
10,106
public void setChars(char[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 2); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 2); Unsafe.copy(srcPtr, start.add(dstPtr), length * 2); }
public void setChars(char[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 2); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 2); final Extent size = Extent.fromIntZeroExtend(length * 2); Unsafe.copy(srcPtr, start.add(dstPtr), size); }
10,107
public void setDoubles(double[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 8); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 8); Unsafe.copy(srcPtr, start.add(dstPtr), length * 8); }
public void setDoubles(double[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 8); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 8); final Extent size = Extent.fromIntZeroExtend(length * 8); Unsafe.copy(srcPtr, start.add(dstPtr), size); }
10,108
public void setFloats(float[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 4); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 4); Unsafe.copy(srcPtr, start.add(dstPtr), length * 4); }
public void setFloats(float[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 4); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 4); final Extent size = Extent.fromIntZeroExtend(length * 4); Unsafe.copy(srcPtr, start.add(dstPtr), size); }
10,109
public void setInts(int[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 4); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 4); Unsafe.copy(srcPtr, start.add(dstPtr), length * 4); }
public void setInts(int[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 4); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 4); final Extent size = Extent.fromIntZeroExtend(length * 4); Unsafe.copy(srcPtr, start.add(dstPtr), size); }
10,110
public void setLongs(long[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 8); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 8); Unsafe.copy(srcPtr, start.add(dstPtr), length * 8); }
public void setLongs(long[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 8); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 8); final Extent size = Extent.fromIntZeroExtend(length * 8); Unsafe.copy(srcPtr, start.add(dstPtr), size); }
10,111
public void setShorts(short[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 2); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 2); Unsafe.copy(srcPtr, start.add(dstPtr), length * 2); }
public void setShorts(short[] src, int srcOfs, int dstPtr, int length) { if (srcOfs < 0) { throw new IndexOutOfBoundsException("srcOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (srcOfs + length > src.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(dstPtr, length * 2); final Address srcPtr = VmMagic.getArrayData(src).add(srcOfs * 2); final Extent size = Extent.fromIntZeroExtend(length * 2); Unsafe.copy(srcPtr, start.add(dstPtr), size); }
10,112
public synchronized void fireEvent(PointerEvent event) { for (Iterator i = listeners.iterator(); i.hasNext();) { PointerListener l = (PointerListener) i.next(); l.pointerStateChanged(event); if (event.isConsumed()) { break; } } }
public synchronized void fireEvent(PointerEvent event) { for (Iterator i = listeners.iterator(); i.hasNext();) { PointerListener l = (PointerListener) i.next(); try { l.pointerStateChanged(event); } catch (Throwable ex) { log.error("Exception in PointerListener", ex); } if (event.isConsumed()) { break; } } }
10,113
public static Serializable read(InputStream output) { // 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 { ObjectInputStream oin = new uncObjectInputStream(output); return (Serializable) oin.readObject(); } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
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 { ObjectInputStream oin = new uncObjectInputStream(output); return (Serializable) oin.readObject(); } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
10,114
public static Serializable read(InputStream output) { // 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 { ObjectInputStream oin = new uncObjectInputStream(output); return (Serializable) oin.readObject(); } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
public static Serializable read(InputStream output) { // 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 { ObjectInputStream oin = new uncObjectInputStream(output); return (Serializable) oin.readObject(); } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
10,115
public static void write(OutputStream input, Serializable value) { // 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 { ObjectOutputStream oout = new uncObjectOutputStream(input); oout.writeObject(value); oout.flush(); } catch (IOException ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
public static void write(OutputStream output, Serializable value) { // 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 { ObjectOutputStream oout = new uncObjectOutputStream(input); oout.writeObject(value); oout.flush(); } catch (IOException ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
10,116
public static void write(OutputStream input, Serializable value) { // 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 { ObjectOutputStream oout = new uncObjectOutputStream(input); oout.writeObject(value); oout.flush(); } catch (IOException ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
public static void write(OutputStream input, Serializable value) { // 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 { ObjectOutputStream oout = new uncObjectOutputStream(input); oout.writeObject(value); oout.flush(); } catch (IOException ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
10,117
public Insets getInsets() { return insets(); }
public Insets getInsets() { Insets retVal; if (swingComponent != null) retVal = swingComponent.getJComponent().getInsets(); else retVal = new Insets(0, 0, 0, 0); return retVal; }
10,118
public void installDefaults(AbstractButton b) { super.installDefaults(b); disabledTextColor = UIManager.getColor("RadioButton.disabledText"); focusColor = UIManager.getColor("RadioButton.focus"); selectColor = UIManager.getColor("RadioButton.select"); }
public void installDefaults(AbstractButton b) { super.installDefaults(b); disabledTextColor = UIManager.getColor("RadioButton.disabledText"); focusColor = UIManager.getColor("RadioButton.focus"); selectColor = UIManager.getColor("RadioButton.select"); }
10,120
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected()) currentIcon = b.getSelectedIcon(); else currentIcon = b.getIcon(); SwingUtilities.calculateInnerArea(b, vr); String text = SwingUtilities.layoutCompoundLabel (c, g.getFontMetrics(f), b.getText(), currentIcon, b.getVerticalAlignment(), b.getHorizontalAlignment(), b.getVerticalTextPosition(), b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset); if (currentIcon != null) { currentIcon.paintIcon(c, g, ir.x, ir.y); } if (text != null) paintText(g, b, tr, text); paintFocus(g, b, vr, tr, ir); }
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected()) currentIcon = b.getSelectedIcon(); else currentIcon = b.getIcon(); SwingUtilities.calculateInnerArea(b, vr); String text = SwingUtilities.layoutCompoundLabel (c, g.getFontMetrics(f), b.getText(), currentIcon, b.getVerticalAlignment(), b.getHorizontalAlignment(), b.getVerticalTextPosition(), b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset); if (currentIcon != null) { currentIcon.paintIcon(c, g, ir.x, ir.y); } if (text != null) paintText(g, b, tr, text); paintFocus(g, tr, null); }
10,121
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) return false; // Check Elements for (index = 0; index < path.length; index++) { if (treepath[index] != path[index]) return false; } // Tree Path's are equals return true; } // Unequal return false; }
public boolean equals(Object object) { // Variables Object[] treepath; int index; // Check for TreePath if (object instanceof TreePath) { // Get Path Elements treepath = ((TreePath) object).getPath(); // Check length if (treepath.length != path.length) return false; // Check Elements for (index = 0; index < path.length; index++) { if (!treepath[index].equals(path[index])) return false; } // Tree Path's are equals return true; } // Unequal return false; }
10,123
public Object[] getPath() { return path; }
public Object[] getPath() { return (Object[]) path.clone(); }
10,124
public boolean isDescendant(TreePath path) { // Variables Object[] treepath; int index; int index2; // Get Descendant path treepath = path.getPath(); // Locate Start Index index = 0; index2 = 0; while (treepath[index] != this.path[index2]) index++; // Verify Paths while (treepath[index] == this.path[index2]) { index++; index2++; } // Check for descendant if (index2 != this.path.length) return false; // Is Descendant return true; }
public boolean isDescendant(TreePath path) { // Variables Object[] treepath; int index; int index2; // Get Descendant path treepath = path.getPath(); // Locate Start Index index = 0; index2 = 0; while (treepath[index] != this.path[index2]) index++; // Verify Paths while (treepath[index] == this.path[index2]) { index++; index2++; } // Check for descendant if (index2 != this.path.length) return false; // Is Descendant return true; }
10,126
public boolean isDescendant(TreePath path) { // Variables Object[] treepath; int index; int index2; // Get Descendant path treepath = path.getPath(); // Locate Start Index index = 0; index2 = 0; while (treepath[index] != this.path[index2]) index++; // Verify Paths while (treepath[index] == this.path[index2]) { index++; index2++; } // Check for descendant if (index2 != this.path.length) return false; // Is Descendant return true; }
public boolean isDescendant(TreePath path) { // Variables Object[] treepath; int index; int index2; // Get Descendant path treepath = path.getPath(); // Locate Start Index index = 0; index2 = 0; while (treepath[index] != this.path[index2]) index++; // Verify Paths while (treepath[index] == this.path[index2]) { index++; index2++; } // Check for descendant if (index2 != this.path.length) return false; // Is Descendant return true; }
10,127
protected Object readResolve () throws InvalidObjectException { throw new Error ("not implemented"); }
protected Object readResolve () throws InvalidObjectException { if (this.getName().equals("background")) return BACKGROUND; if (this.getName().equals("bidi_embedding")) return BIDI_EMBEDDING; if (this.getName().equals("char_replacement")) return CHAR_REPLACEMENT; if (this.getName().equals("family")) return FAMILY; if (this.getName().equals("font")) return FONT; if (this.getName().equals("foreground")) return FOREGROUND; if (this.getName().equals("input method highlight")) return INPUT_METHOD_HIGHLIGHT; if (this.getName().equals("input method underline")) return INPUT_METHOD_UNDERLINE; if (this.getName().equals("justification")) return JUSTIFICATION; if (this.getName().equals("numeric_shaping")) return NUMERIC_SHAPING; if (this.getName().equals("posture")) return POSTURE; if (this.getName().equals("run_direction")) return RUN_DIRECTION; if (this.getName().equals("size")) return SIZE; if (this.getName().equals("strikethrough")) return STRIKETHROUGH; if (this.getName().equals("superscript")) return SUPERSCRIPT; if (this.getName().equals("swap_colors")) return SWAP_COLORS; if (this.getName().equals("transform")) return TRANSFORM; if (this.getName().equals("underline")) return UNDERLINE; if (this.getName().equals("weight")) return WEIGHT; if (this.getName().equals("width")) return WIDTH; throw new InvalidObjectException("Can't resolve Attribute: " + getName()); }
10,129
Attribute(String name){ this.name = name;}
Attribute(String name){ this.name = name;}
10,130
readResolve() throws InvalidObjectException{ if (this.equals(READING)) return(READING); if (this.equals(LANGUAGE)) return(LANGUAGE); if (this.equals(INPUT_METHOD_SEGMENT)) return(INPUT_METHOD_SEGMENT); throw new InvalidObjectException("Can't resolve Attribute: " + getName());}
readResolve() throws InvalidObjectException{ if (this.equals(READING)) return(READING); if (this.equals(LANGUAGE)) return(LANGUAGE); if (this.equals(INPUT_METHOD_SEGMENT)) return(INPUT_METHOD_SEGMENT); throw new InvalidObjectException("Can't resolve Attribute: " + getName());}
10,131
readResolve() throws InvalidObjectException{ if (this.equals(READING)) return(READING); if (this.equals(LANGUAGE)) return(LANGUAGE); if (this.equals(INPUT_METHOD_SEGMENT)) return(INPUT_METHOD_SEGMENT); throw new InvalidObjectException("Can't resolve Attribute: " + getName());}
readResolve() throws InvalidObjectException{ if (this.equals(READING)) return(READING); if (this.equals(LANGUAGE)) return(LANGUAGE); if (this.equals(INPUT_METHOD_SEGMENT)) return(INPUT_METHOD_SEGMENT); throw new InvalidObjectException("Can't resolve Attribute: " + getName());}
10,132
readResolve() throws InvalidObjectException{ if (this.equals(READING)) return(READING); if (this.equals(LANGUAGE)) return(LANGUAGE); if (this.equals(INPUT_METHOD_SEGMENT)) return(INPUT_METHOD_SEGMENT); throw new InvalidObjectException("Can't resolve Attribute: " + getName());}
readResolve() throws InvalidObjectException{ if (this.equals(READING)) return(READING); if (this.equals(LANGUAGE)) return(LANGUAGE); if (this.equals(INPUT_METHOD_SEGMENT)) return(INPUT_METHOD_SEGMENT); throw new InvalidObjectException("Can't resolve Attribute: " + getName());}
10,133
public FileSystemType getFileSystemTypeForNameSystemTypes(String name) throws FileSystemException { FileSystemType result = fsTypeManager.getSystemType(name); if (result == null) { throw new FileSystemException( "Not existent FisleSystemType"); } return result; }
public FileSystemType getFileSystemTypeForNameSystemTypes(String name) throws FileSystemException { FileSystemType result = fsTypeManager.getSystemType(name); if (result == null) { throw new FileSystemException( "FileSystemType " + name + " doesn't exist"); } return result; }
10,134
protected final Set cancelledKeys() { return null; }
protected final Set cancelledKeys() { if (! isOpen()) throw new ClosedSelectorException(); return cancelledKeys; }
10,136
public final void close () throws IOException { if (closed) return; closed = true; implCloseSelector (); }
public final synchronized void close() throws IOException { if (closed) return; closed = true; implCloseSelector (); }
10,137
public final void close () throws IOException { if (closed) return; closed = true; implCloseSelector (); }
public final void close () throws IOException { if (closed) return; closed = true; }
10,138
public int interestOps () { if (!isValid()) throw new CancelledKeyException(); return interestOps; }
public int interestOps () { if (!isValid()) throw new CancelledKeyException(); synchronized (impl.selectedKeys()) { return interestOps; }
10,139
public int readyOps () { if (!isValid()) throw new CancelledKeyException(); return readyOps; }
public synchronized int readyOps () { if (!isValid()) throw new CancelledKeyException(); return readyOps; }
10,141
public static char[] read(InputStream input) { WCharSeqHolder h = new WCharSeqHolder(); h._read(input); return h.value; }
public static char[] read(InputStream input) { WCharSeqHolder h = new WCharSeqHolder(); h._read(input); return h.value; }
10,142
public static void write(OutputStream output, char[] value) { WCharSeqHolder h = new WCharSeqHolder(value); h._write(output); }
public static void write(OutputStream output, char[] value) { WCharSeqHolder h = new WCharSeqHolder(value); h._write(output); }
10,143