bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
private void sendPicture ( ImageConsumer ic ) { ic.setHints( ImageConsumer.TOPDOWNLEFTRIGHT ); if( props != null ) { ic.setProperties( props ); } ic.setDimensions(width, height); ic.setColorModel(cm); if( pixeli != null ) { ic.setPixels( 0, 0, width, height, cm, pixeli, offset, scansize ); } else { ic.setPixels( 0, 0, width, height, cm, pixelb, offset, scansize ); } }
private void sendPicture ( ImageConsumer ic ) { ic.setHints( ImageConsumer.TOPDOWNLEFTRIGHT ); if( props != null ) { ic.setProperties( props ); } ic.setDimensions(width, height); ic.setColorModel(cm); if( pixeli != null ) { ic.setPixels( 0, 0, width, height, cm, pixeli, offset, scansize ); } else { ic.setPixels( 0, 0, width, height, cm, pixelb, offset, scansize ); } }
15,985
private void sendPicture ( ImageConsumer ic ) { ic.setHints( ImageConsumer.TOPDOWNLEFTRIGHT ); if( props != null ) { ic.setProperties( props ); } ic.setDimensions(width, height); ic.setColorModel(cm); if( pixeli != null ) { ic.setPixels( 0, 0, width, height, cm, pixeli, offset, scansize ); } else { ic.setPixels( 0, 0, width, height, cm, pixelb, offset, scansize ); } }
private void sendPicture ( ImageConsumer ic ) { ic.setHints( ImageConsumer.TOPDOWNLEFTRIGHT ); if( props != null ) { ic.setProperties( props ); } ic.setDimensions(width, height); ic.setColorModel(cm); if( pixeli != null ) { ic.setPixels( 0, 0, width, height, cm, pixeli, offset, scansize ); } else { ic.setPixels( 0, 0, width, height, cm, pixelb, offset, scansize ); } }
15,986
public void startProduction(ImageConsumer ic) { if (!(consumers.contains(ic))) { consumers.addElement(ic); } Vector list = (Vector) consumers.clone(); for(int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture( ic ); ic.imageComplete( ImageConsumer.STATICIMAGEDONE ); } }
public void startProduction(ImageConsumer ic) { if (!(consumers.contains(ic))) { consumers.addElement(ic); } Vector list = (Vector) consumers.clone(); for(int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture( ic ); ic.imageComplete( ImageConsumer.STATICIMAGEDONE ); } }
15,987
public void startProduction(ImageConsumer ic) { if (!(consumers.contains(ic))) { consumers.addElement(ic); } Vector list = (Vector) consumers.clone(); for(int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture( ic ); ic.imageComplete( ImageConsumer.STATICIMAGEDONE ); } }
public void startProduction(ImageConsumer ic) { if (!(consumers.contains(ic))) { consumers.addElement(ic); Vector list = (Vector) consumers.clone(); for(int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture( ic ); ic.imageComplete( ImageConsumer.STATICIMAGEDONE );
15,988
public void startProduction(ImageConsumer ic) { if (!(consumers.contains(ic))) { consumers.addElement(ic); } Vector list = (Vector) consumers.clone(); for(int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture( ic ); ic.imageComplete( ImageConsumer.STATICIMAGEDONE ); } }
public void startProduction(ImageConsumer ic) { if (!(consumers.contains(ic))) { consumers.addElement(ic); } Vector list = (Vector) consumers.clone(); for(int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture( ic ); ic.imageComplete( ImageConsumer.STATICIMAGEDONE ); } }
15,989
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ChooseNode(); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
TemplateNode clone(Stylesheet stylesheet) TemplateNode ret = new ChooseNode(); if (children != null) ret.children = children.clone(stylesheet); } if (next != null) ret.next = next.clone(stylesheet); } return ret; }
15,990
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ChooseNode(); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ChooseNode(); if (children != null) { ret.children = children.clone(stylesheet); if (next != null) { ret.next = next.clone(stylesheet); return ret;
15,991
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append(']'); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer("choose"); buf.append('['); buf.append(']'); return buf.toString(); }
15,992
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new Rectangle(); // icon rectangle Rectangle vr = new Rectangle(); // view rectangle Rectangle br = new Rectangle(); // border rectangle Rectangle ar = new Rectangle(); // accelerator rectangle Rectangle cr = new Rectangle(); // checkIcon rectangle int vertAlign = m.getVerticalAlignment(); int horAlign = m.getHorizontalAlignment(); int vertTextPos = m.getVerticalTextPosition(); int horTextPos = m.getHorizontalTextPosition(); Font f = m.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); SwingUtilities.calculateInnerArea(m, br); SwingUtilities.calculateInsetArea(br, m.getInsets(), vr); paintBackground(g, m, background); /* * MenuItems insets are equal to menuItems margin, space between text and * menuItems border. We need to paint insets region as well. */ Insets insets = m.getInsets(); br.x -= insets.left; br.y -= insets.top; br.width += insets.right + insets.left; br.height += insets.top + insets.bottom; // If this menu item is a JCheckBoxMenuItem then paint check icon if (checkIcon != null) { SwingUtilities.layoutCompoundLabel(m, fm, null, checkIcon, vertAlign, horAlign, vertTextPos, horTextPos, vr, cr, tr, defaultTextIconGap); checkIcon.paintIcon(m, g, cr.x, cr.y); // We need to calculate position of the menu text and position of // user menu icon if there exists one relative to the check icon. // So we need to adjust view rectangle s.t. its starting point is at // checkIcon.width + defaultTextIconGap. vr.x = cr.x + cr.width + defaultTextIconGap; } // if this is a submenu, then paint arrow icon to indicate it. if (arrowIcon != null && (c instanceof JMenu)) { if (!((JMenu) c).isTopLevelMenu()) { int width = arrowIcon.getIconWidth(); int height = arrowIcon.getIconHeight(); int offset = (vr.height - height) / 2; arrowIcon.paintIcon(m, g, vr.width - width, vr.y + offset); } } // paint text and user menu icon if it exists Icon i = m.getIcon(); SwingUtilities.layoutCompoundLabel(c, fm, m.getText(), i, vertAlign, horAlign, vertTextPos, horTextPos, vr, ir, tr, defaultTextIconGap); if (i != null) i.paintIcon(c, g, ir.x, ir.y); paintText(g, m, tr, m.getText()); // paint accelerator String acceleratorText = ""; if (m.getAccelerator() != null) { acceleratorText = getAcceleratorText(m.getAccelerator()); fm = g.getFontMetrics(acceleratorFont); ar.width = fm.stringWidth(acceleratorText); ar.x = br.width - ar.width; vr.x = br.width - ar.width - defaultTextIconGap; SwingUtilities.layoutCompoundLabel(m, fm, acceleratorText, null, vertAlign, horAlign, vertTextPos, horTextPos, vr, ir, ar, defaultTextIconGap); paintAccelerator(g, m, ar, acceleratorText); } }
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new Rectangle(); // icon rectangle Rectangle vr = new Rectangle(); // view rectangle Rectangle br = new Rectangle(); // border rectangle Rectangle ar = new Rectangle(); // accelerator rectangle Rectangle cr = new Rectangle(); // checkIcon rectangle int vertAlign = m.getVerticalAlignment(); int horAlign = m.getHorizontalAlignment(); int vertTextPos = m.getVerticalTextPosition(); int horTextPos = m.getHorizontalTextPosition(); Font f = m.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); SwingUtilities.calculateInnerArea(m, br); SwingUtilities.calculateInsetArea(br, m.getInsets(), vr); paintBackground(g, m, background); /* * MenuItems insets are equal to menuItems margin, space between text and * menuItems border. We need to paint insets region as well. */ Insets insets = m.getInsets(); br.x -= insets.left; br.y -= insets.top; br.width += insets.right + insets.left; br.height += insets.top + insets.bottom; // If this menu item is a JCheckBoxMenuItem then paint check icon if (checkIcon != null) { SwingUtilities.layoutCompoundLabel(m, fm, null, checkIcon, vertAlign, horAlign, vertTextPos, horTextPos, vr, cr, tr, defaultTextIconGap); checkIcon.paintIcon(m, g, cr.x, cr.y); // We need to calculate position of the menu text and position of // user menu icon if there exists one relative to the check icon. // So we need to adjust view rectangle s.t. its starting point is at // checkIcon.width + defaultTextIconGap. vr.x = cr.x + cr.width + defaultTextIconGap; } // if this is a submenu, then paint arrow icon to indicate it. if (arrowIcon != null && (c instanceof JMenu)) { if (!((JMenu) c).isTopLevelMenu()) { int width = arrowIcon.getIconWidth(); int height = arrowIcon.getIconHeight(); int offset = (vr.height - height) / 2; arrowIcon.paintIcon(m, g, vr.width - width, vr.y + offset); } } // paint text and user menu icon if it exists Icon i = m.getIcon(); SwingUtilities.layoutCompoundLabel(c, fm, m.getText(), i, vertAlign, horAlign, vertTextPos, horTextPos, vr, ir, tr, defaultTextIconGap); if (i != null) i.paintIcon(c, g, ir.x, ir.y); paintText(g, m, tr, m.getText()); // paint accelerator String acceleratorText = ""; if (m.getAccelerator() != null) { acceleratorText = getAcceleratorText(m.getAccelerator()); fm = g.getFontMetrics(acceleratorFont); ar.width = fm.stringWidth(acceleratorText); ar.x = br.width - ar.width; vr.x = br.width - ar.width - defaultTextIconGap; SwingUtilities.layoutCompoundLabel(m, fm, acceleratorText, null, vertAlign, horAlign, vertTextPos, horTextPos, vr, ir, ar, defaultTextIconGap); paintAccelerator(g, m, ar, acceleratorText); } }
15,993
public final VmType loadClass(String className, boolean resolve) throws ClassNotFoundException, PrivilegedActionPragma { final VmType<?> cls; if (className.charAt(0) == '[') { cls = loadArrayClass(className, resolve); addLoadedClass(className, cls); } else { cls = loader.loadClass(className).getVmClass(); } if (resolve) { cls.link(); } return cls; }
public final VmType loadClass(String className, boolean resolve) throws ClassNotFoundException, PrivilegedActionPragma { final VmType<?> cls; if (className.charAt(0) == '[') { cls = loadArrayClass(className, resolve); addLoadedClass(className, cls); } else { final Class<?> javaType = loader.loadClass(className); cls = javaType.getVmClass(); } if (resolve) { cls.link(); } return cls; }
15,994
public SelectorImpl (SelectorProvider provider) { super (provider); keys = new HashSet (); selected = new HashSet (); }
public SelectorImpl (SelectorProvider provider) { super (provider); keys = new HashSet (); selected = new HashSet (); }
15,995
private final void deregisterCancelledKeys() { Set ckeys = cancelledKeys (); synchronized (ckeys) { Iterator it = ckeys.iterator(); while (it.hasNext ()) { keys.remove ((SelectionKeyImpl) it.next ()); it.remove (); } } }
private final void deregisterCancelledKeys() { Set<SelectionKey> ckeys = cancelledKeys (); synchronized (ckeys) { Iterator it = ckeys.iterator(); while (it.hasNext ()) { keys.remove ((SelectionKeyImpl) it.next ()); it.remove (); } } }
15,996
private final void deregisterCancelledKeys() { Set ckeys = cancelledKeys (); synchronized (ckeys) { Iterator it = ckeys.iterator(); while (it.hasNext ()) { keys.remove ((SelectionKeyImpl) it.next ()); it.remove (); } } }
private final void deregisterCancelledKeys() { Set ckeys = cancelledKeys (); synchronized (ckeys) { Iterator<SelectionKey> it = ckeys.iterator(); while (it.hasNext ()) { keys.remove ((SelectionKeyImpl) it.next ()); it.remove (); } } }
15,997
private final int[] getFDsAsArray (int ops) { int[] result; int counter = 0; Iterator it = keys.iterator (); // Count the number of file descriptors needed while (it.hasNext ()) { SelectionKeyImpl key = (SelectionKeyImpl) it.next (); if ((key.interestOps () & ops) != 0) { counter++; } } result = new int[counter]; counter = 0; it = keys.iterator (); // Fill the array with the file descriptors while (it.hasNext ()) { SelectionKeyImpl key = (SelectionKeyImpl) it.next (); if ((key.interestOps () & ops) != 0) { result[counter] = key.getNativeFD(); counter++; } } return result; }
private final int[] getFDsAsArray (int ops) { int[] result; int counter = 0; Iterator<SelectionKey> it = keys.iterator (); // Count the number of file descriptors needed while (it.hasNext ()) { SelectionKeyImpl key = (SelectionKeyImpl) it.next (); if ((key.interestOps () & ops) != 0) { counter++; } } result = new int[counter]; counter = 0; it = keys.iterator (); // Fill the array with the file descriptors while (it.hasNext ()) { SelectionKeyImpl key = (SelectionKeyImpl) it.next (); if ((key.interestOps () & ops) != 0) { result[counter] = key.getNativeFD(); counter++; } } return result; }
15,998
public final Set keys() { if (!isOpen()) throw new ClosedSelectorException(); return Collections.unmodifiableSet (keys); }
public final Set<SelectionKey> keys() { if (!isOpen()) throw new ClosedSelectorException(); return Collections.unmodifiableSet (keys); }
15,999
public final Set selectedKeys() { if (!isOpen()) throw new ClosedSelectorException(); return selected; }
public final Set<SelectionKey> selectedKeys() { if (!isOpen()) throw new ClosedSelectorException(); return selected; }
16,000
protected IOR createIOR(cObject ref) throws BAD_OPERATION { IOR ior = super.createIOR(ref); if (iIor != null) { AOM.Obj obj = rootPOA.findIorKey(ior.key); POA poa; // Null means that the object was connected to the ORB directly. if (obj == null) poa = rootPOA; else poa = obj.poa; gnuIorInfo info = new gnuIorInfo(this, poa, ior); // This may modify the ior. iIor.establish_components(info); } return ior; }
protected IOR createIOR(cObject ref) throws BAD_OPERATION { IOR ior = super.createIOR(ref); if (iIor != null) { AOM.Obj obj = rootPOA.findIorKey(ior.key); gnuPOA poa; // Null means that the object was connected to the ORB directly. if (obj == null) poa = rootPOA; else poa = obj.poa; gnuIorInfo info = new gnuIorInfo(this, poa, ior); // This may modify the ior. iIor.establish_components(info); } return ior; }
16,001
protected DomIterator(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) { if (!root.isSupported("MutationEvents", "2.0")) { throw new DomEx(DomEx.NOT_SUPPORTED_ERR, "Iterator needs mutation events", root, 0); } this.root = root; this.whatToShow = whatToShow; this.filter = filter; this.expandEntityReferences = entityReferenceExpansion; // start condition: going right, seen nothing yet. reference = null; right = true; EventTarget target = (EventTarget) root; target.addEventListener("DOMNodeRemoved", this, false); }
protected DomIterator(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) { if (!root.isSupported("MutationEvents", "2.0")) { throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, "Iterator needs mutation events", root, 0); } this.root = root; this.whatToShow = whatToShow; this.filter = filter; this.expandEntityReferences = entityReferenceExpansion; // start condition: going right, seen nothing yet. reference = null; right = true; EventTarget target = (EventTarget) root; target.addEventListener("DOMNodeRemoved", this, false); }
16,003
public Node nextNode() { if (done) { throw new DomEx(DomEx.INVALID_STATE_ERR); } right = true; return walk(true); }
public Node nextNode() { if (done) { throw new DomDOMException(DOMException.INVALID_STATE_ERR); } right = true; return walk(true); }
16,004
public Node previousNode() { if (done) { throw new DomEx(DomEx.INVALID_STATE_ERR); } Node previous = reference; right = false; walk(false); return previous; }
public Node previousNode() { if (done) { throw new DomDOMException(DOMException.INVALID_STATE_ERR); } Node previous = reference; right = false; walk(false); return previous; }
16,005
private final void addBranch(int target, byte flags) { IRBasicBlock pred = this.currentBlock; IRBasicBlock succ = startBB(target); pred.addSuccessor(succ); endBB(flags); }
private final void addBranch(int target, byte flags) { IRBasicBlock pred = this.currentBlock; IRBasicBlock succ = startBB(target); branchTargets.put(new Integer(getInstructionAddress()), new Integer(target)); endBB(flags); }
16,006
public static Throwable systemException(int nr, int address) throws UninterruptiblePragma, LoadStaticsPragma, PrivilegedActionPragma { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); if (false) { Unsafe.debug(nr); Unsafe.debug(address); Unsafe.die("System exception"); } //Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final VmThread current = Unsafe.getCurrentProcessor() .getCurrentThread(); //final String state = " (" + current.getReadableErrorState() + ")"; final String state = ""; // Mark a system exception, so the stacktrace uses the exception frame // instead of the current frame. current.setInSystemException(); switch (nr) { case EX_NULLPOINTER: return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT: return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS: return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0: return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD: return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW: return new StackOverflowError(); case EX_CLASSCAST: return new ClassCastException(); default: return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
public static Throwable systemException(int nr, int address) throws UninterruptiblePragma, LoadStaticsPragma, PrivilegedActionPragma { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); if (false) { Unsafe.debug(nr); Unsafe.debug(address); Unsafe.die("System exception"); } //Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final VmThread current = Unsafe.getCurrentProcessor() .getCurrentThread(); //final String state = " (" + current.getReadableErrorState() + ")"; final String state = ""; // Mark a system exception, so the stacktrace uses the exception frame // instead of the current frame. current.setInSystemException(); switch (nr) { case EX_NULLPOINTER: return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT: return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS: return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0: return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD: return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW: return new StackOverflowError(); case EX_CLASSCAST: return new ClassCastException(); default: return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
16,008
public boolean nameAndTypeEquals(Node other) { if (other == this) { return true; } // node types must match if (nodeType != other.getNodeType()) { return false; } // if both have namespaces, do a "full" comparision // this is a "global" partition String ns1 = this.getNamespaceURI(); String ns2 = other.getNamespaceURI(); if (ns1 != null && ns2 != null) { return ns1.equals(ns2) && getLocalName().equals(other.getLocalName()); } // if neither has a namespace, this is a "no-namespace" name. if (ns1 == null && ns2 == null) { if (!getNodeName().equals(other.getNodeName())) { return false; } // can test the non-normative "per-element-type" scope here. // if this is an attribute node and both nodes have been bound // to elements (!!), then return the nameAndTypeEquals() // comparison of those elements. return true; } // otherwise they're unequal: one scoped, one not. return false; }
public boolean nameAndTypeEquals(Node other) { if (other == this) { return true; } // node types must match if (nodeType != other.getNodeType()) { return false; } // if both have namespaces, do a "full" comparision // this is a "global" partition String ns1 = this.getNamespaceURI(); String ns2 = other.getNamespaceURI(); if (ns1 != null && ns2 != null) { return ns1.equals(ns2) && equal(getLocalName(), other.getLocalName()); } // if neither has a namespace, this is a "no-namespace" name. if (ns1 == null && ns2 == null) { if (!getNodeName().equals(other.getNodeName())) { return false; } // can test the non-normative "per-element-type" scope here. // if this is an attribute node and both nodes have been bound // to elements (!!), then return the nameAndTypeEquals() // comparison of those elements. return true; } // otherwise they're unequal: one scoped, one not. return false; }
16,009
public Class getUIClass(String id, ClassLoader loader) { String className = (String) get (id); if (className == null) return null; try { if (loader != null) return loader.loadClass (className); return Class.forName (className); } catch (Exception e) { return null; } }
public Class getUIClass(String id, ClassLoader loader) { String className = (String) get (id); if (className == null) return null; try { if (loader == null) loader = ClassLoader.getSystemClassLoader(); return loader.loadClass (className); return Class.forName (className); } catch (Exception e) { return null; } }
16,010
public Class getUIClass(String id, ClassLoader loader) { String className = (String) get (id); if (className == null) return null; try { if (loader != null) return loader.loadClass (className); return Class.forName (className); } catch (Exception e) { return null; } }
public Class getUIClass(String id, ClassLoader loader) { String className = (String) get (id); if (className == null) return null; try { if (loader != null) return loader.loadClass (className); } catch (Exception e) { return null; } }
16,011
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + (w.width == 0 ? 0 : hgap); int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
16,012
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + (w.width == 0 ? 0 : hgap); else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
16,013
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + (n.height == 0 ? 0 : vgap); int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
16,014
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-(s.height == 0 ? 0 : vgap); setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
16,015
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-hgap, hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
layoutContainer(Container target){ synchronized (target.getTreeLock ()) { Insets i = target.getInsets(); ComponentOrientation orient = target.getComponentOrientation (); boolean left_to_right = orient.isLeftToRight (); Component my_north = north; Component my_east = east; Component my_south = south; Component my_west = west; // Note that we currently don't handle vertical layouts. Neither // does JDK 1.3. if (firstLine != null) my_north = firstLine; if (lastLine != null) my_south = lastLine; if (firstItem != null) { if (left_to_right) my_west = firstItem; else my_east = firstItem; } if (lastItem != null) { if (left_to_right) my_east = lastItem; else my_west = lastItem; } Dimension c = calcCompSize(center, PREF); Dimension n = calcCompSize(my_north, PREF); Dimension s = calcCompSize(my_south, PREF); Dimension e = calcCompSize(my_east, PREF); Dimension w = calcCompSize(my_west, PREF); Dimension t = target.getSize(); /* <-> hgap <-> hgap +----------------------------+ } |t | } i.top | +----------------------+ | --- y1 } | |n | | | +----------------------+ | } vgap | +---+ +----------+ +---+ | --- y2 } } | |w | |c | |e | | } hh | +---+ +----------+ +---+ | } vgap } | +----------------------+ | --- y3 } | |s | | | +----------------------+ | } | | } i.bottom +----------------------------+ } |x1 |x2 |x3 <----------------------> <--> ww <--> i.left i.right */ int x1 = i.left; int x2 = x1 + w.width + hgap; int x3; if (t.width <= i.right + e.width) x3 = x2 + w.width + hgap; else x3 = t.width - i.right - e.width; int ww = t.width - i.right - i.left; int y1 = i.top; int y2 = y1 + n.height + vgap; int midh = Math.max(e.height, Math.max(w.height, c.height)); int y3; if (t.height <= i.bottom + s.height) y3 = y2 + midh + vgap; else y3 = t.height - i.bottom - s.height; int hh = y3-y2-vgap; setBounds(center, x2, y2, x3-x2-(w.width == 0 ? 0 : hgap), hh); setBounds(my_north, x1, y1, ww, n.height); setBounds(my_south, x1, y3, ww, s.height); setBounds(my_west, x1, y2, w.width, hh); setBounds(my_east, x3, y2, e.width, hh); }}
16,016
public static void main(String[] args) throws Exception { final String devId = (args.length > 0) ? args[0] : "fb0"; final int count = (args.length > 1) ? Integer.parseInt(args[1]) : 100; final String tests = (args.length > 2) ? args[2] : "plrREQ"; Surface g = null; try { final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME); final Device dev = dm.getDevice(devId); final FrameBufferAPI api = (FrameBufferAPI) dev.getAPI(FrameBufferAPI.class); final FrameBufferConfiguration conf = api.getConfigurations()[0]; g = api.open(conf); new FBTest(g, conf.getScreenWidth(), conf.getScreenHeight(), count, tests).perform(); Thread.sleep(3000); } catch (Throwable ex) { ex.printStackTrace(); } finally { if (g != null) { g.close(); } } }
public static void main(String[] args) throws Exception { final String devId = (args.length > 0) ? args[0] : "fb0"; final int count = (args.length > 1) ? Integer.parseInt(args[1]) : 100; final String tests = (args.length > 2) ? args[2] : "plrREQ"; Surface g = null; try { final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME); final Device dev = dm.getDevice(devId); final FrameBufferAPI api = (FrameBufferAPI) dev.getAPI(FrameBufferAPI.class); final FrameBufferConfiguration conf = api.getConfigurations()[0]; g = api.open(conf); new FBTest(g, conf.getScreenWidth(), conf.getScreenHeight(), count, tests).perform(); Thread.sleep(3000); } catch (Throwable ex) { log.error("Error in FBTest", ex); } finally { if (g != null) { g.close(); } } }
16,018
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
protected void perform() { log.info("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
16,020
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
16,021
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
16,022
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { log.info("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
16,023
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { log.info("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
16,024
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { System.out.println("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
protected void perform() { System.out.println("Loop count " + count); if (tests.indexOf('l') >= 0) { System.out.println("Shape Line PAINT " + performTest(new DrawShapeLineTest(), Surface.PAINT_MODE)); System.out.println("Shape Line XOR " + performTest(new DrawShapeLineTest(), Surface.XOR_MODE)); } if (tests.indexOf('R') >= 0) { System.out.println("Shape Rect PAINT " + performTest(new DrawShapeRectTest(), Surface.PAINT_MODE)); System.out.println("Shape Rect XOR " + performTest(new DrawShapeRectTest(), Surface.XOR_MODE)); } if (tests.indexOf('E') >= 0) { System.out.println("Shape Ellipse PAINT " + performTest(new DrawShapeEllipseTest(), Surface.PAINT_MODE)); //System.out.println("Shape Ellipse XOR " + performTest(new DrawShapeEllipseTest(), Surface.XOR_MODE)); } if (tests.indexOf('A') >= 0) { System.out.println("Shape Arc PAINT " + performTest(new DrawShapeArcTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } if (tests.indexOf('Q') >= 0) { log.info("Shape QuadCurve PAINT " + performTest(new DrawShapeQuadTest(), Surface.PAINT_MODE)); //System.out.println("Shape Arc XOR " + performTest(new DrawShapeArcTest(), Surface.XOR_MODE)); } }
16,025
public void write(byte[] buf, int off, int len) throws IOException { crc.update(buf, off, len); super.write(buf, off, len); }
public synchronized void write(byte[] buf, int off, int len) throws IOException { crc.update(buf, off, len); super.write(buf, off, len); }
16,026
public void write(byte[] buf, int off, int len) throws IOException { crc.update(buf, off, len); super.write(buf, off, len); }
public void write(byte[] buf, int off, int len) throws IOException { crc.update(buf, off, len); }
16,027
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; ButtonModel m = b.getModel(); if (b.isContentAreaFilled() && (UIManager.get(getPropertyPrefix() + "gradient") != null) && ! m.isPressed() && ! m.isArmed() && b.isEnabled() && (b.getBackground() instanceof UIResource)) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; if (b.isContentAreaFilled() && (UIManager.get(getPropertyPrefix() + "gradient") != null) && ! m.isPressed() && ! m.isArmed() && b.isEnabled() && (b.getBackground() instanceof UIResource)) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
16,028
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; ButtonModel m = b.getModel(); if (b.isContentAreaFilled() && (UIManager.get(getPropertyPrefix() + "gradient") != null) && ! m.isPressed() && ! m.isArmed() && b.isEnabled() && (b.getBackground() instanceof UIResource)) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; ButtonModel m = b.getModel(); if (b.isContentAreaFilled() && (UIManager.get(getPropertyPrefix() + "gradient") != null) && b.isEnabled() && (b.getBackground() instanceof UIResource)) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
16,029
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; ButtonModel m = b.getModel(); if (b.isContentAreaFilled() && (UIManager.get(getPropertyPrefix() + "gradient") != null) && ! m.isPressed() && ! m.isArmed() && b.isEnabled() && (b.getBackground() instanceof UIResource)) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
public void update(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; ButtonModel m = b.getModel(); if (b.isContentAreaFilled() && (UIManager.get(getPropertyPrefix() + "gradient") != null) && ! m.isPressed() && ! m.isArmed() && b.isEnabled() && (b.getBackground() instanceof UIResource)) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, getPropertyPrefix() + "gradient"); paint(g, c); } else super.update(g, c); }
16,030
public void addChangeListener(ChangeListener listener) { // TODO } // addChangeListener()
public void addChangeListener(ChangeListener listener) { // TODO } // addChangeListener()
16,031
protected void fireStateChanged() { // TODO } // fireStateChanged()
protected void fireStateChanged() { // TODO } // fireStateChanged()
16,032
public Color getSelectedColor() { return null; // TODO } // getSelectedColor()
public Color getSelectedColor() { return null; // TODO } // getSelectedColor()
16,033
public void removeChangeListener(ChangeListener listener) { // TODO } // removeChangeListener()
public void removeChangeListener(ChangeListener listener) { // TODO } // removeChangeListener()
16,034
public void setSelectedColor(Color color) { // TODO } // setSelectedColor()
public void setSelectedColor(Color color) { // TODO } // setSelectedColor()
16,035
public InetAddress(byte[] ipaddr) { this(ipaddr, null, null); }
public InetAddress(byte[] ipaddr) { this(ipaddr, null, null); }
16,036
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return (null); Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return (null); if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return null; Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return (null); if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
16,037
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return (null); Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return (null); if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return (null); Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return (null); if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
16,038
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return (null); Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return (null); if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return (null); Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return null; if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
16,039
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return (null); Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return (null); if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
private static synchronized InetAddress[] checkCacheFor(String hostname) { InetAddress[] addresses = null; if (cache_size == 0) return (null); Object obj = cache.get(hostname); if (obj == null) return (null); if (obj instanceof InetAddress[]) addresses = (InetAddress[]) obj; if (addresses == null) return (null); if (cache_period != -1) if ((System.currentTimeMillis() - addresses[ 0].lookup_time) > cache_period) { cache.remove(hostname); return (null); } return addresses; }
16,040
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] test_ip = ((InetAddress) obj).getAddress(); if (test_ip.length != addr.length) return (false); for (int i = 0; i < addr.length; i++) if (test_ip[ i] != (byte) addr[ i]) return (false); return (true); }
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] addr2 = ((InetAddress) obj).addr; if (test_ip.length != addr.length) return (false); for (int i = 0; i < addr.length; i++) if (test_ip[ i] != (byte) addr[ i]) return (false); return (true); }
16,041
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] test_ip = ((InetAddress) obj).getAddress(); if (test_ip.length != addr.length) return (false); for (int i = 0; i < addr.length; i++) if (test_ip[ i] != (byte) addr[ i]) return (false); return (true); }
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] test_ip = ((InetAddress) obj).getAddress(); if (addr.length != addr2.length) return false; for (int i = 0; i < addr.length; i++) if (test_ip[ i] != (byte) addr[ i]) return (false); return (true); }
16,042
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] test_ip = ((InetAddress) obj).getAddress(); if (test_ip.length != addr.length) return (false); for (int i = 0; i < addr.length; i++) if (test_ip[ i] != (byte) addr[ i]) return (false); return (true); }
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] test_ip = ((InetAddress) obj).getAddress(); if (test_ip.length != addr.length) return (false); for (int i = 0; i < addr.length; i++) if (addr[i] != addr2[i]) return false; return (true); }
16,043
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] test_ip = ((InetAddress) obj).getAddress(); if (test_ip.length != addr.length) return (false); for (int i = 0; i < addr.length; i++) if (test_ip[ i] != (byte) addr[ i]) return (false); return (true); }
public boolean equals(Object obj) { if (!(obj instanceof InetAddress)) return false; byte[] test_ip = ((InetAddress) obj).getAddress(); if (test_ip.length != addr.length) return (false); for (int i = 0; i < addr.length; i++) if (test_ip[ i] != (byte) addr[ i]) return (false); return true; }
16,044
public byte[] getAddress() { byte[] ipaddr = new byte[ addr.length]; for (int i = 0; i < addr.length; i++) { ipaddr[ i] = (byte) addr[ i]; } return ipaddr; }
public byte[] getAddress() { byte[] ipaddr = new byte[ addr.length]; for (int i = 0; i < addr.length; i++) { ipaddr[ i] = (byte) addr[ i]; } return ipaddr; }
16,045
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
16,046
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
16,047
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
16,048
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addresses = checkCacheFor(hostname); return addresses; }
16,049
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); return addresses; }
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) { InetAddress local = getLocalHost(); return getAllByName(local.getHostName()); } // Check the cache for this host before doing a lookup InetAddress[] addresses = checkCacheFor(hostname); if (addresses != null) return (addresses); // Not in cache, try the lookup addresses = getHostByName(hostname); if ((addresses == null) || (addresses.length == 0)) { throw new UnknownHostException( hostname); } addToCache(hostname, addresses); if (addresses != null) return addresses; byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
16,050
public static InetAddress getByAddress(byte[] addr) throws UnknownHostException { if (addr.length != 4 && addr.length != 16) throw new UnknownHostException("IP address has illegal length"); if (addr.length == 4) // return new Inet4Address(null,addr); return new Inet4Address(addr, null); return new Inet6Address(addr, null); // return new Inet6Address(null,addr); }
public static InetAddress getByAddress(byte[] addr) throws UnknownHostException { if (addr.length != 4 && addr.length != 16) throw new UnknownHostException("IP address has illegal length"); if (addr.length == 4) // return new Inet4Address(null,addr); return new Inet4Address(addr, null); return new Inet6Address(addr, null); // return new Inet6Address(null,addr); }
16,051
public static InetAddress getByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) return getLocalHost(); // First, check to see if it is an IP address. If so, then don't // do a DNS lookup. StringTokenizer st = new StringTokenizer(hostname, "."); if (st.countTokens() == 4) { int i; byte[] ip = new byte[ 4]; for (i = 0; i < 4; i++) { try { ip[ i] = Byte.parseByte(st.nextToken()); if ((ip[ i] < 0) || (ip[ 1] > 255)) break; } catch (NumberFormatException e) { break; } } if (i == 4) { return (new Inet4Address(ip)); } } // Wasn't an IP, so try the lookup InetAddress[] addresses = getAllByName(hostname); return addresses[ 0]; }
public static InetAddress getByName(String hostname) throws UnknownHostException { // Default to current host if necessary if (hostname == null) return getLocalHost(); // First, check to see if it is an IP address. If so, then don't // do a DNS lookup. StringTokenizer st = new StringTokenizer(hostname, "."); if (st.countTokens() == 4) { int i; byte[] ip = new byte[ 4]; for (i = 0; i < 4; i++) { try { ip[ i] = Byte.parseByte(st.nextToken()); if ((ip[ i] < 0) || (ip[ 1] > 255)) break; } catch (NumberFormatException e) { break; } } if (i == 4) { return (new Inet4Address(ip)); } } // Wasn't an IP, so try the lookup InetAddress[] addresses = getAllByName(hostname); return addresses[ 0]; }
16,052
public String getHostAddress() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < addr.length; i++) { sb.append(addr[ i] & 0xff); if (i < (addr.length - 1)) sb.append("."); } return sb.toString(); }
public String getHostAddress() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < addr.length; i++) { sb.append(addr[ i] & 0xff); if (i < (addr.length - 1)) sb.append("."); } return sb.toString(); }
16,053
public String getHostAddress() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < addr.length; i++) { sb.append(addr[ i] & 0xff); if (i < (addr.length - 1)) sb.append("."); } return sb.toString(); }
public String getHostAddress() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < addr.length; i++) { sb.append(addr[ i] & 0xff); if (i < (addr.length - 1)) sb.append("."); } return sb.toString(); }
16,054
public String getHostAddress() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < addr.length; i++) { sb.append(addr[ i] & 0xff); if (i < (addr.length - 1)) sb.append("."); } return sb.toString(); }
public String getHostAddress() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < addr.length; i++) { sb.append(addr[ i] & 0xff); if (i < (addr.length - 1)) sb.append("."); } for ( ; ; ) { sb.append(addr[i] & 0xff); i++; if (i == len) break; sb.append('.'); }
16,055
public String getHostName() { if (hostName != null) return (hostName); try { hostName = getHostByAddr(addr); return (hostName); } catch (UnknownHostException e) { if (hostname_alias != null) return (hostname_alias); else return (getHostAddress()); } }
public String getHostName() { if (hostName != null) return (hostName); try { hostName = getHostByAddr(addr); return (hostName); } catch (UnknownHostException e) { if (hostname_alias != null) return (hostname_alias); else return (getHostAddress()); } }
16,057
public String getHostName() { if (hostName != null) return (hostName); try { hostName = getHostByAddr(addr); return (hostName); } catch (UnknownHostException e) { if (hostname_alias != null) return (hostname_alias); else return (getHostAddress()); } }
public String getHostName() { if (hostName != null) return (hostName); try { hostName = getHostByAddr(addr); return (hostName); } catch (UnknownHostException e) { if (hostname_alias != null) return (hostname_alias); else return (getHostAddress()); } }
16,058
static InetAddress getInaddrAny() throws UnknownHostException { if (inaddr_any == null) { byte[] tmp = new byte[] { 0, 0, 0, 0}; inaddr_any = new InetAddress(tmp); } return (inaddr_any); }
static InetAddress getInaddrAny() throws UnknownHostException { if (inaddr_any == null) { byte[] tmp = new byte[] { 0, 0, 0, 0}; inaddr_any = new InetAddress(tmp); } return (inaddr_any); }
16,059
static InetAddress getInaddrAny() throws UnknownHostException { if (inaddr_any == null) { byte[] tmp = new byte[] { 0, 0, 0, 0}; inaddr_any = new InetAddress(tmp); } return (inaddr_any); }
static InetAddress getInaddrAny() throws UnknownHostException { if (inaddr_any == null) { byte[] tmp = new byte[] { 0, 0, 0, 0}; inaddr_any = new InetAddress(tmp); } return (inaddr_any); }
16,060
public static InetAddress getLocalHost() throws UnknownHostException { return VMNetUtils.getAPI().getLocalAddress(); // return Ifconfig.getLocalAddress().toInetAddress(); /* * String hostname = getLocalHostName(); */ }
public static InetAddress getLocalHost() throws UnknownHostException { return VMNetUtils.getAPI().getLocalAddress(); // return Ifconfig.getLocalAddress().toInetAddress(); /* * String hostname = getLocalHostName(); */ }
16,061
public int hashCode() { long val1 = 0, val2 = 0; // Its obvious here that I have no idea how to generate a good // hash key for (int i = 0; i < addr.length; i++) val1 = val1 + (addr[ i] << ((addr.length - i) / 8)); for (int i = 0; i < addr.length; i++) val2 = val2 + (addr[ i] * 10 * i); val1 = (val1 >> 1) ^ val2; return ((int) val1); }
public int hashCode() { long val1 = 0, val2 = 0; // Its obvious here that I have no idea how to generate a good // hash key for (int i = 0; i < addr.length; i++) val1 = val1 + (addr[ i] << ((addr.length - i) / 8)); for (int i = 0; i < addr.length; i++) val2 = val2 + (addr[ i] * 10 * i); val1 = (val1 >> 1) ^ val2; return ((int) val1); }
16,062
public int hashCode() { long val1 = 0, val2 = 0; // Its obvious here that I have no idea how to generate a good // hash key for (int i = 0; i < addr.length; i++) val1 = val1 + (addr[ i] << ((addr.length - i) / 8)); for (int i = 0; i < addr.length; i++) val2 = val2 + (addr[ i] * 10 * i); val1 = (val1 >> 1) ^ val2; return ((int) val1); }
public int hashCode() { long val1 = 0, val2 = 0; // Its obvious here that I have no idea how to generate a good // hash key for (int i = 0; i < addr.length; i++) val1 = val1 + (addr[ i] << ((addr.length - i) / 8)); for (int i = 0; i < addr.length; i++) val2 = val2 + (addr[ i] * 10 * i); val1 = (val1 >> 1) ^ val2; return ((int) val1); }
16,063
public int hashCode() { long val1 = 0, val2 = 0; // Its obvious here that I have no idea how to generate a good // hash key for (int i = 0; i < addr.length; i++) val1 = val1 + (addr[ i] << ((addr.length - i) / 8)); for (int i = 0; i < addr.length; i++) val2 = val2 + (addr[ i] * 10 * i); val1 = (val1 >> 1) ^ val2; return ((int) val1); }
public int hashCode() { long val1 = 0, val2 = 0; // Its obvious here that I have no idea how to generate a good // hash key for (int i = 0; i < addr.length; i++) val1 = val1 + (addr[ i] << ((addr.length - i) / 8)); for (int i = 0; i < addr.length; i++) val2 = val2 + (addr[ i] * 10 * i); val1 = (val1 >> 1) ^ val2; return ((int) val1); }
16,064
public boolean isAnyLocalAddress() { return (this.equals(ANY_IF)); }
public boolean isAnyLocalAddress() { return (this.equals(ANY_IF)); }
16,065
public boolean isMulticastAddress() { if (addr.length == 0) return (false); // Mask against high order bits of 1110 if ((addr[ 0] & 0xF0) == 224) return (true); return (false); }
public boolean isMulticastAddress() { if (addr.length == 0) return (false); // Mask against high order bits of 1110 if ((addr[ 0] & 0xF0) == 224) return (true); return (false); }
16,066
public boolean isMulticastAddress() { if (addr.length == 0) return (false); // Mask against high order bits of 1110 if ((addr[ 0] & 0xF0) == 224) return (true); return (false); }
public boolean isMulticastAddress() { if (addr.length == 0) return (false); // Mask against high order bits of 1110 if ((addr[ 0] & 0xF0) == 224) return (true); return (false); }
16,067
public String toString() { StringBuffer sb; if (hostName != null) sb = new StringBuffer(hostName).append('/'); else if (hostname_alias != null) sb = new StringBuffer(hostname_alias).append('/'); else sb = new StringBuffer(); sb.append(getHostAddress()); return (sb.toString()); }
public String toString() { StringBuffer sb; if (hostName != null) sb = new StringBuffer(hostName).append('/'); else if (hostname_alias != null) sb = new StringBuffer(hostname_alias).append('/'); else sb = new StringBuffer(); sb.append(getHostAddress()); return (sb.toString()); }
16,068
public Selector(int axis, List tests) { this.axis = axis; this.tests = new Test[tests.size()]; tests.toArray(this.tests); if (axis == NAMESPACE && this.tests.length > 0 && this.tests[0] instanceof NameTest) { NameTest nt = (NameTest) this.tests[0]; this.tests[0] = new NamespaceTest(nt.qName, nt.anyLocalName, nt.any); } }
public Selector(int axis, List tests) { this.axis = axis; int len = tests.size(); this.tests = new Test[(len == 0) ? 1 : len]; if (len > 0) tests.toArray(this.tests); if (axis == NAMESPACE && this.tests.length > 0 && this.tests[0] instanceof NameTest) { NameTest nt = (NameTest) this.tests[0]; this.tests[0] = new NamespaceTest(nt.qName, nt.anyLocalName, nt.any); } }
16,069
public Selector(int axis, List tests) { this.axis = axis; this.tests = new Test[tests.size()]; tests.toArray(this.tests); if (axis == NAMESPACE && this.tests.length > 0 && this.tests[0] instanceof NameTest) { NameTest nt = (NameTest) this.tests[0]; this.tests[0] = new NamespaceTest(nt.qName, nt.anyLocalName, nt.any); } }
public Selector(int axis, List tests) { this.axis = axis; this.tests = new Test[tests.size()]; tests.toArray(this.tests); if (axis == NAMESPACE && this.tests.length > 0 && this.tests[0] instanceof NameTest) { NameTest nt = (NameTest) this.tests[0]; this.tests[0] = new NamespaceTest(nt.qName, nt.anyLocalName, nt.any); } }
16,070
void addChildNodes(Node context, Collection acc, boolean recurse) { Node child = context.getFirstChild(); while (child != null) { acc.add(child); if (recurse) { addChildNodes(child, acc, recurse); } child = child.getNextSibling(); } }
void addChildNodes(Node context, Collection acc, boolean recurse) Node child = context.getFirstChild(); while (child != null) acc.add(child); if (recurse) addChildNodes(child, acc, recurse); } child = child.getNextSibling(); } }
16,071
void addChildNodes(Node context, Collection acc, boolean recurse) { Node child = context.getFirstChild(); while (child != null) { acc.add(child); if (recurse) { addChildNodes(child, acc, recurse); } child = child.getNextSibling(); } }
void addChildNodes(Node context, Collection acc, boolean recurse) { Node child = context.getFirstChild(); while (child != null) { acc.add(child); if (recurse) { addChildNodes(child, acc, recurse); child = child.getNextSibling();
16,072
void addFollowingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getNextSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addFollowingNodes(context, acc, recurse); } } }
void addFollowingNodes(Node context, Collection acc, boolean recurse) { if (context != null && recurse) addChildNodes(context, acc, true); Node cur = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? null : context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getNextSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addFollowingNodes(context, acc, recurse); } } }
16,073
void addFollowingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getNextSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addFollowingNodes(context, acc, recurse); } } }
void addFollowingNodes(Node context, Collection acc, boolean recurse) Node cur = context.getNextSibling(); while (cur != null) acc.add(cur); if (recurse) addChildNodes(cur, acc, true); } cur = cur.getNextSibling(); } if (recurse) context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) addFollowingNodes(context, acc, recurse); } } }
16,074
void addFollowingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getNextSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addFollowingNodes(context, acc, recurse); } } }
void addFollowingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); cur = cur.getNextSibling(); if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addFollowingNodes(context, acc, recurse);
16,075
void addFollowingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getNextSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addFollowingNodes(context, acc, recurse); } } }
void addFollowingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getNextSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { cur = context.getNextSibling(); while (cur != null) { acc.add(cur); if (recurse) addChildNodes(cur, acc, true); cur = cur.getNextSibling(); } } } } }
16,076
void addNamespaceAttributes(Node context, Collection acc) { NamedNodeMap attrs = context.getAttributes(); if (attrs != null) { int attrLen = attrs.getLength(); for (int i = 0; i < attrLen; i++) { Node attr = attrs.item(i); if (isNamespaceAttribute(attr)) { acc.add(attr); } } } }
void addNamespaceAttributes(Node context, Collection acc) NamedNodeMap attrs = context.getAttributes(); if (attrs != null) int attrLen = attrs.getLength(); for (int i = 0; i < attrLen; i++) Node attr = attrs.item(i); if (isNamespaceAttribute(attr)) acc.add(attr); } } } }
16,077
void addNamespaceAttributes(Node context, Collection acc) { NamedNodeMap attrs = context.getAttributes(); if (attrs != null) { int attrLen = attrs.getLength(); for (int i = 0; i < attrLen; i++) { Node attr = attrs.item(i); if (isNamespaceAttribute(attr)) { acc.add(attr); } } } }
void addNamespaceAttributes(Node context, Collection acc) { NamedNodeMap attrs = context.getAttributes(); if (attrs != null) { int attrLen = attrs.getLength(); for (int i = 0; i < attrLen; i++) { Node attr = attrs.item(i); if (isNamespaceAttribute(attr)) { acc.add(attr);
16,078
void addParentNode(Node context, Collection acc, boolean recurse) { Node parent = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (parent != null) { acc.add(parent); if (recurse) { addParentNode(parent, acc, recurse); } } }
void addParentNode(Node context, Collection acc, boolean recurse) Node parent = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (parent != null) acc.add(parent); if (recurse) addParentNode(parent, acc, recurse); } } }
16,079
void addParentNode(Node context, Collection acc, boolean recurse) { Node parent = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (parent != null) { acc.add(parent); if (recurse) { addParentNode(parent, acc, recurse); } } }
void addParentNode(Node context, Collection acc, boolean recurse) { Node parent = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (parent != null) { acc.add(parent); if (recurse) { addParentNode(parent, acc, recurse);
16,080
void addPrecedingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getPreviousSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getPreviousSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addPrecedingNodes(context, acc, recurse); } } }
void addPrecedingNodes(Node context, Collection acc, boolean recurse) { Node cur = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? null : context.getPreviousSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getPreviousSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addPrecedingNodes(context, acc, recurse); } } }
16,081
void addPrecedingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getPreviousSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getPreviousSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addPrecedingNodes(context, acc, recurse); } } }
void addPrecedingNodes(Node context, Collection acc, boolean recurse) Node cur = context.getPreviousSibling(); while (cur != null) acc.add(cur); if (recurse) addChildNodes(cur, acc, true); } cur = cur.getPreviousSibling(); } if (recurse) context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) addPrecedingNodes(context, acc, recurse); } } }
16,082
void addPrecedingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getPreviousSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getPreviousSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addPrecedingNodes(context, acc, recurse); } } }
void addPrecedingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getPreviousSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); cur = cur.getPreviousSibling(); if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addPrecedingNodes(context, acc, recurse);
16,083
void addPrecedingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getPreviousSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getPreviousSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addPrecedingNodes(context, acc, recurse); } } }
void addPrecedingNodes(Node context, Collection acc, boolean recurse) { Node cur = context.getPreviousSibling(); while (cur != null) { acc.add(cur); if (recurse) { addChildNodes(cur, acc, true); } cur = cur.getPreviousSibling(); } if (recurse) { context = (context.getNodeType() == Node.ATTRIBUTE_NODE) ? ((Attr) context).getOwnerElement() : context.getParentNode(); if (context != null) { addPrecedingNodes(context, acc, recurse); } } }
16,084
public Expr clone(Object context) { int len = tests.length; List tests2 = new ArrayList(len); for (int i = 0; i < len; i++) { tests2.add(tests[i].clone(context)); } return new Selector(axis, tests2); }
public Expr clone(Object context) int len = tests.length; List tests2 = new ArrayList(len); for (int i = 0; i < len; i++) tests2.add(tests[i].clone(context)); } return new Selector(axis, tests2); }
16,085
public Expr clone(Object context) { int len = tests.length; List tests2 = new ArrayList(len); for (int i = 0; i < len; i++) { tests2.add(tests[i].clone(context)); } return new Selector(axis, tests2); }
public Expr clone(Object context) { int len = tests.length; List tests2 = new ArrayList(len); for (int i = 0; i < len; i++) { tests2.add(tests[i].clone(context)); return new Selector(axis, tests2);
16,086
List filterCandidates(List candidates, boolean cascade) { int len = candidates.size(); int tlen = tests.length; if (tlen > 0 && len > 0) { // Present the result of each successful generation to the next test for (int j = 0; j < tlen && len > 0; j++) { Test test = tests[j]; List successful = new ArrayList(len); for (int i = 0; i < len; i++) { Node node = (Node) candidates.get(i); if (cascade) { // Documents and DocumentFragments should be considered // if part of a location path where the axis involves // the SELF concept short nodeType = node.getNodeType(); if ((nodeType == Node.DOCUMENT_NODE || nodeType == Node.DOCUMENT_FRAGMENT_NODE) && (axis == DESCENDANT_OR_SELF || axis == ANCESTOR_OR_SELF || axis == SELF) && (tests.length == 1 && tests[0] instanceof NodeTypeTest && ((NodeTypeTest) tests[0]).type == (short) 0)) { successful.add(node); continue; } } if (test.matches(node, i + 1, len)) { successful.add(node); } /* System.err.println("Testing "+node); int p = getContextPosition(node); int l = getContextSize(node); if (test.matches(node, p, l)) { successful.add(node); }*/ } candidates = successful; len = candidates.size(); } } return candidates; }
List filterCandidates(List candidates, boolean cascade) int len = candidates.size(); int tlen = tests.length; if (tlen > 0 && len > 0) // Present the result of each successful generation to the next test for (int j = 0; j < tlen && len > 0; j++) Test test = tests[j]; List successful = new ArrayList(len); for (int i = 0; i < len; i++) Node node = (Node) candidates.get(i); if (cascade) // Documents and DocumentFragments should be considered // if part of a location path where the axis involves // the SELF concept short nodeType = node.getNodeType(); if ((nodeType == Node.DOCUMENT_NODE || nodeType == Node.DOCUMENT_FRAGMENT_NODE) && (axis == DESCENDANT_OR_SELF || axis == ANCESTOR_OR_SELF || axis == SELF) && (tests.length == 1 && tests[0] instanceof NodeTypeTest && ((NodeTypeTest) tests[0]).type == (short) 0)) successful.add(node); continue; } } if (test.matches(node, i + 1, len)) successful.add(node); } /* System.err.println("Testing "+node); int p = getContextPosition(node); int l = getContextSize(node); if (test.matches(node, p, l)) successful.add(node); }*/ } candidates = successful; len = candidates.size(); } } return candidates; }
16,087
List filterCandidates(List candidates, boolean cascade) { int len = candidates.size(); int tlen = tests.length; if (tlen > 0 && len > 0) { // Present the result of each successful generation to the next test for (int j = 0; j < tlen && len > 0; j++) { Test test = tests[j]; List successful = new ArrayList(len); for (int i = 0; i < len; i++) { Node node = (Node) candidates.get(i); if (cascade) { // Documents and DocumentFragments should be considered // if part of a location path where the axis involves // the SELF concept short nodeType = node.getNodeType(); if ((nodeType == Node.DOCUMENT_NODE || nodeType == Node.DOCUMENT_FRAGMENT_NODE) && (axis == DESCENDANT_OR_SELF || axis == ANCESTOR_OR_SELF || axis == SELF) && (tests.length == 1 && tests[0] instanceof NodeTypeTest && ((NodeTypeTest) tests[0]).type == (short) 0)) { successful.add(node); continue; } } if (test.matches(node, i + 1, len)) { successful.add(node); } /* System.err.println("Testing "+node); int p = getContextPosition(node); int l = getContextSize(node); if (test.matches(node, p, l)) { successful.add(node); }*/ } candidates = successful; len = candidates.size(); } } return candidates; }
List filterCandidates(List candidates, boolean cascade) { int len = candidates.size(); int tlen = tests.length; if (tlen > 0 && len > 0) { // Present the result of each successful generation to the next test for (int j = 0; j < tlen && len > 0; j++) { Test test = tests[j]; List successful = new ArrayList(len); for (int i = 0; i < len; i++) { Node node = (Node) candidates.get(i); if (cascade) { // Documents and DocumentFragments should be considered // if part of a location path where the axis involves // the SELF concept short nodeType = node.getNodeType(); if ((nodeType == Node.DOCUMENT_NODE || nodeType == Node.DOCUMENT_FRAGMENT_NODE) && (axis == DESCENDANT_OR_SELF || axis == ANCESTOR_OR_SELF || axis == SELF) && (tests.length == 1 && tests[0] instanceof NodeTypeTest && ((NodeTypeTest) tests[0]).type == (short) 0)) { successful.add(node); continue; if (test.matches(node, i + 1, len)) { successful.add(node); /* System.err.println("Testing "+node); int p = getContextPosition(node); int l = getContextSize(node); if (test.matches(node, p, l)) { successful.add(node); */ candidates = successful; len = candidates.size(); return candidates;
16,088
private int getContextPosition(Node ctx) { int pos = 1; for (ctx = ctx.getPreviousSibling(); ctx != null; ctx = ctx.getPreviousSibling()) { pos++; } return pos; }
private int getContextPosition(Node ctx) int pos = 1; for (ctx = ctx.getPreviousSibling(); ctx != null; ctx = ctx.getPreviousSibling()) pos++; } return pos; }
16,089