rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public void setEnabled(boolean enabled); | void setEnabled(boolean enabled); | public void setEnabled(boolean enabled); |
public void handleEvent(AWTEvent e); | void handleEvent(AWTEvent e); | public void handleEvent(AWTEvent e); |
public FontMetrics getFontMetrics(Font f); | FontMetrics getFontMetrics(Font f); | public FontMetrics getFontMetrics(Font f); |
public Graphics getGraphics(); | Graphics getGraphics(); | public Graphics getGraphics(); |
public Point getLocationOnScreen(); | Point getLocationOnScreen(); | public Point getLocationOnScreen(); |
public Toolkit getToolkit(); | Toolkit getToolkit(); | public Toolkit getToolkit(); |
public void setVisible(boolean visible); | void setVisible(boolean visible); | public void setVisible(boolean visible); |
public abstract boolean imageUpdate(Image image, int flags, int x, | boolean imageUpdate(Image image, int flags, int x, | public abstract boolean imageUpdate(Image image, int flags, int x, int y, int width, int height); |
public boolean isFocusTraversable(); | boolean isFocusTraversable(); | public boolean isFocusTraversable(); |
public Dimension getMinimumSize(); | Dimension getMinimumSize(); | public Dimension getMinimumSize(); |
public void setBounds(int x, int y, int width, int height); | void setBounds(int x, int y, int width, int height); | public void setBounds(int x, int y, int width, int height); |
public void paint(Graphics graphics); | void paint(Graphics graphics); | public void paint(Graphics graphics); |
public Dimension getPreferredSize(); | Dimension getPreferredSize(); | public Dimension getPreferredSize(); |
public boolean prepareImage(Image img, int width, int height, | boolean prepareImage(Image img, int width, int height, | public boolean prepareImage(Image img, int width, int height, ImageObserver ob); |
public void dispose(); | void dispose(); | public void dispose(); |
public void repaint(long tm, int x, int y, int width, int height); | void repaint(long tm, int x, int y, int width, int height); | public void repaint(long tm, int x, int y, int width, int height); |
public void requestFocus(); | void requestFocus(); | public void requestFocus(); |
public Window getFocusedWindow() { try | public Window getFocusedWindow () | public Window getFocusedWindow() { // XXX Need an easy way to test if this thread is in the context of the // global focus owner, to avoid creating the exception in the first place. try { return getGlobalFocusedWindow(); } catch (SecurityException e) { return null; } } |
return getGlobalFocusedWindow(); } catch (SecurityException e) { return null; } | return (Window) getObject (currentFocusedWindows); | public Window getFocusedWindow() { // XXX Need an easy way to test if this thread is in the context of the // global focus owner, to avoid creating the exception in the first place. try { return getGlobalFocusedWindow(); } catch (SecurityException e) { return null; } } |
public void setBackground(Color color); | void setBackground(Color color); | public void setBackground(Color color); |
public void setCursor(Cursor cursor); | void setCursor(Cursor cursor); | public void setCursor(Cursor cursor); |
public void setFont(Font font); | void setFont(Font font); | public void setFont(Font font); |
public void setForeground(Color color); | void setForeground(Color color); | public void setForeground(Color color); |
return buf.toString(); | return buf.substring(where, where+len); | public String getString(int where, int len) throws BadLocationException { return buf.toString(); } |
AbstractVmClassLoader clc, | VmClassLoader clc, | private static final VmType decodeClass( byte[] data, int offset, int class_image_length, boolean rejectNatives, AbstractVmClassLoader clc, SelectorMap selectorMap, VmStatics statics) throws ClassFormatError { if (data == null) { throw new ClassFormatError("ClassDecoder.decodeClass: data==null"); } final ... |
public ClassFormatError(String s) | public ClassFormatError() | public ClassFormatError(String s) { super(s); } |
super(s); | public ClassFormatError(String s) { super(s); } | |
AbstractVmClassLoader loader, | VmClassLoader loader, | public VmInterfaceClass( String name, String superClassName, AbstractVmClassLoader loader, int accessFlags) { super(name, superClassName, loader, accessFlags); if (!superClassName.equals("java.lang.Object")) { throw new RuntimeException("Not a valid interface class, super class must be java.lang.Object"); } ... |
public VmNormalClass( String name, String superClassName, AbstractVmClassLoader loader, int accessFlags) { super(name, superClassName, loader, accessFlags); | protected VmNormalClass(String name, VmNormalClass superClass, VmClassLoader loader, boolean primitive, int typeSize) { super(name, superClass, loader, primitive, typeSize); | public VmNormalClass( String name, String superClassName, AbstractVmClassLoader loader, int accessFlags) { super(name, superClassName, loader, accessFlags); testClassType(); } |
protected void setObjectSize(int objectSize) { | protected final void setObjectSize(int objectSize) { | protected void setObjectSize(int objectSize) { if (this.objectSize == 0) { this.objectSize = objectSize; } else { throw new IllegalArgumentException("Cannot overwrite object size"); } } |
if (knownMod != modCount) throw new ConcurrentModificationException(); | public boolean hasNext() { if (knownMod != modCount) throw new ConcurrentModificationException(); return count > 0; } | |
public int getModifiers() { return vmField.getModifiers(); } | public int getModifiers() { return getModifiersInternal() & FIELD_MODIFIERS; } | public int getModifiers() { return vmField.getModifiers(); } |
public GLightweightPeer(Component comp) | public GLightweightPeer() | public GLightweightPeer(Component comp) { this.comp = comp; } |
this.comp = comp; | public GLightweightPeer(Component comp) { this.comp = comp; } | |
return comp.getToolkit().checkImage(img, width, height, o); | return -1; | public int checkImage(Image img, int width, int height, ImageObserver o) { return comp.getToolkit().checkImage(img, width, height, o); } |
return comp.getToolkit().createImage(prod); | return null; | public Image createImage(ImageProducer prod) { return comp.getToolkit().createImage(prod); } |
return comp.getColorModel (); | return null; | public ColorModel getColorModel () { return comp.getColorModel (); } |
return comp.getToolkit().getFontMetrics(f); | return null; | public FontMetrics getFontMetrics(Font f) { return comp.getToolkit().getFontMetrics(f); } |
if (containerInsets == null) containerInsets = new Insets (0,0,0,0); return containerInsets; | return null; | public Insets getInsets() { if (containerInsets == null) containerInsets = new Insets (0,0,0,0); return containerInsets; } |
Point parentLocation = comp.getParent().getLocationOnScreen(); return new Point (parentLocation.x + comp.getX(), parentLocation.y + comp.getY()); | return null; | public Point getLocationOnScreen() { Point parentLocation = comp.getParent().getLocationOnScreen(); return new Point (parentLocation.x + comp.getX(), parentLocation.y + comp.getY()); } |
return new Dimension(comp.getWidth(), comp.getHeight()); | return minimumSize(); | public Dimension getMinimumSize() { return new Dimension(comp.getWidth(), comp.getHeight()); } |
return new Dimension(comp.getWidth(), comp.getHeight()); | return preferredSize(); | public Dimension getPreferredSize() { return new Dimension(comp.getWidth(), comp.getHeight()); } |
return getInsets (); | return null; | public Insets insets() { return getInsets (); } |
return false; | return true; | public boolean isReparentSupported() { return false; } |
return getMinimumSize(); | return new Dimension(0, 0); | public Dimension minimumSize() { return getMinimumSize(); } |
return getPreferredSize(); | return new Dimension(0, 0); | public Dimension preferredSize() { return getPreferredSize(); } |
return comp.getToolkit().prepareImage(img, width, height, o); | return false; | public boolean prepareImage(Image img, int width, int height, ImageObserver o) { return comp.getToolkit().prepareImage(img, width, height, o); } |
Component p = comp.getParent(); if (p != null) p.repaint(tm, x + comp.getX(), y + comp.getY(), width, height); | public void repaint(long tm, int x, int y, int width, int height) { Component p = comp.getParent(); if (p != null) p.repaint(tm, x + comp.getX(), y + comp.getY(), width, height); } | |
Component p = comp.getParent(); while (p != null && p.isLightweight()) p = p.getParent(); if (p != null) { ComponentPeer peer = p.getPeer(); if (peer != null) peer.setCursor(cursor); } | public void setCursor(Cursor cursor) { Component p = comp.getParent(); while (p != null && p.isLightweight()) p = p.getParent(); if (p != null) { // Don't actually change the cursor of the component // otherwise other childs inherit this cursor. ComponentPeer peer = p.getPeer(); if (peer != null) ... | |
public void disable(); | void disable(); | public void disable(); |
public void enable(); | void enable(); | public void enable(); |
public ColorModel getColorModel(); | ColorModel getColorModel(); | public ColorModel getColorModel(); |
public void hide(); | void hide(); | public void hide(); |
public Dimension minimumSize(); | Dimension minimumSize(); | public Dimension minimumSize(); |
public Dimension preferredSize(); | Dimension preferredSize(); | public Dimension preferredSize(); |
public void print(Graphics graphics); | void print(Graphics graphics); | public void print(Graphics graphics); |
public void reshape(int x, int y, int width, int height); | void reshape(int x, int y, int width, int height); | public void reshape(int x, int y, int width, int height); |
public void show(); | void show(); | public void show(); |
setLayout(new BoxLayout(this, axis)); | super.setLayout(new BoxLayout(this, axis)); | public Box(int axis) { setLayout(new BoxLayout(this, axis)); } |
return null; | return new Box(BoxLayout.X_AXIS); | public static Box createHorizontalBox() { return null; } |
return null; | return new Filler(d, d, d); | public static Component createRigidArea(Dimension d) { return null; } |
return null; | return new Box(BoxLayout.Y_AXIS); | public static Box createVerticalBox() { return null; } |
namePair.add(new Integer(name.getTag())); | namePair.add(Integer.valueOf(name.getTag())); | public GeneralNames(final byte[] encoded) throws IOException { names = new LinkedList(); DERReader der = new DERReader(encoded); DERValue nameList = der.read(); if (!nameList.isConstructed()) throw new IOException("malformed GeneralNames"); int len = 0; int i = 0; while (len < nameList.getL... |
dumpDebugInfo(); | public synchronized void transmit(SocketBuffer buf, long timeout) throws InterruptedException, TimeoutException { // Set the source address hwAddress.writeTo(buf, 6); // debug dump for investigating VWWare 3 network problems //dumpDebugInfo(); // ask buffer manager to send out the data bufferManager.transmit(bu... | |
public void dumpData(PrintStream out) { | public void dumpData(Logger out) { | public void dumpData(PrintStream out) { initBlock.dumpData(out); rxRing.dumpData(out); txRing.dumpData(out); } |
if (in instanceof SAXSource) { return ((SAXSource) in).inputSource; } | public static InputSource sourceToInputSource (Source in) { InputSource retval; boolean ok = false; if (in.getSystemId () != null) { retval = new InputSource (in.getSystemId ()); ok = true; } else retval = new InputSource (); if (in instanceof StreamSource) { StreamSource ss = (StreamSourc... | |
public byte[] lastUpdate(byte[] in, int offset, int length) throws TransformerException | public byte[] lastUpdate() throws TransformerException | public byte[] lastUpdate(byte[] in, int offset, int length) throws TransformerException { byte[] result = update(in, offset, length); byte[] rest = lastUpdate(); if (rest.length > 0) { byte[] newResult = new byte[result.length + rest.length]; System.arraycopy(result, 0, newResult, 0,... |
byte[] result = update(in, offset, length); byte[] rest = lastUpdate(); if (rest.length > 0) { byte[] newResult = new byte[result.length + rest.length]; System.arraycopy(result, 0, newResult, 0, result.length); System.arraycopy(rest, 0, newResult, result.length, rest.length); result = newResult; | byte[] result = (wired == Direction.FORWARD ? lastForwardUpdate() : lastInverseUpdate()); if (inBuffer.size() != 0) { throw new TransformerException("lastUpdate(): input buffer not empty"); | public byte[] lastUpdate(byte[] in, int offset, int length) throws TransformerException { byte[] result = update(in, offset, length); byte[] rest = lastUpdate(); if (rest.length > 0) { byte[] newResult = new byte[result.length + rest.length]; System.arraycopy(result, 0, newResult, 0,... |
public byte[] update(byte[] in, int offset, int length) throws TransformerException | public byte[] update(byte b) throws TransformerException | public byte[] update(byte[] in, int offset, int length) throws TransformerException { if (wired == null) { throw new IllegalStateException(); } byte[] result = (wired == Direction.FORWARD ? forwardUpdate(in, offset, length) ... |
if (wired == null) { throw new IllegalStateException(); } byte[] result = (wired == Direction.FORWARD ? forwardUpdate(in, offset, length) : inverseUpdate(in, offset, length)); return result; | return update(new byte[] { b }, 0, 1); | public byte[] update(byte[] in, int offset, int length) throws TransformerException { if (wired == null) { throw new IllegalStateException(); } byte[] result = (wired == Direction.FORWARD ? forwardUpdate(in, offset, length) ... |
public BigDecimal (BigInteger num) | public BigDecimal (int val) | public BigDecimal (BigInteger num) { this (num, 0); } |
this (num, 0); | this.intVal = BigInteger.valueOf(val); this.scale = 0; | public BigDecimal (BigInteger num) { this (num, 0); } |
op1 = op1.multiply (BigInteger.valueOf (10).pow (val.scale - scale)); | op1 = op1.multiply (BigInteger.TEN.pow (val.scale - scale)); | public BigDecimal add (BigDecimal val) { // For addition, need to line up decimals. Note that the movePointRight // method cannot be used for this as it might return a BigDecimal with // scale == 0 instead of the scale we need. BigInteger op1 = intVal; BigInteger op2 = val.intVal; if (scale < val... |
op2 = op2.multiply (BigInteger.valueOf (10).pow (scale - val.scale)); | op2 = op2.multiply (BigInteger.TEN.pow (scale - val.scale)); | public BigDecimal add (BigDecimal val) { // For addition, need to line up decimals. Note that the movePointRight // method cannot be used for this as it might return a BigDecimal with // scale == 0 instead of the scale we need. BigInteger op1 = intVal; BigInteger op2 = val.intVal; if (scale < val... |
public int compareTo (BigDecimal val) | public int compareTo (Object obj) | public int compareTo (BigDecimal val) { if (scale == val.scale) return intVal.compareTo (val.intVal); BigInteger thisParts[] = intVal.divideAndRemainder (BigInteger.valueOf (10).pow (scale)); BigInteger valParts[] = val.intVal.divideAndRemainder (BigInteger.valueOf (10).pow (val.scale)); ... |
if (scale == val.scale) return intVal.compareTo (val.intVal); BigInteger thisParts[] = intVal.divideAndRemainder (BigInteger.valueOf (10).pow (scale)); BigInteger valParts[] = val.intVal.divideAndRemainder (BigInteger.valueOf (10).pow (val.scale)); int compare; if ((compare = thisParts[0].compareTo (valParts[0])) != ... | return compareTo((BigDecimal) obj); | public int compareTo (BigDecimal val) { if (scale == val.scale) return intVal.compareTo (val.intVal); BigInteger thisParts[] = intVal.divideAndRemainder (BigInteger.valueOf (10).pow (scale)); BigInteger valParts[] = val.intVal.divideAndRemainder (BigInteger.valueOf (10).pow (val.scale)); ... |
(BigInteger.valueOf (10).pow (n - scale)), 0); | (BigInteger.TEN.pow (n - scale)), 0); | public BigDecimal movePointRight (int n) { if (n < 0) return movePointLeft (-n); if (scale >= n) return new BigDecimal (intVal, scale - n); return new BigDecimal (intVal.multiply (BigInteger.valueOf (10).pow (n - scale)), 0); } |
return scale == 0 ? intVal : intVal.divide (BigInteger.valueOf (10).pow (scale)); | if (scale > 0) return intVal.divide (BigInteger.TEN.pow (scale)); else if (scale < 0) return intVal.multiply(BigInteger.TEN.pow(-scale)); return intVal; | public BigInteger toBigInteger () { return scale == 0 ? intVal : intVal.divide (BigInteger.valueOf (10).pow (scale)); } |
StringBuffer sb = new StringBuffer(bigStr.length() + 2 + (point <= 0 ? (-point + 1) : 0)); if (point <= 0) | StringBuilder val = new StringBuilder(); if (scale >= 0 && (point - 1) >= -6) | public String toString () { String bigStr = intVal.toString(); if (scale == 0) return bigStr; boolean negative = (bigStr.charAt(0) == '-'); int point = bigStr.length() - scale - (negative ? 1 : 0); StringBuffer sb = new StringBuffer(bigStr.length() + 2 + (point <= 0 ? (-point + 1) : 0... |
if (negative) sb.append('-'); sb.append('0').append('.'); while (point < 0) | if (point <= 0) | public String toString () { String bigStr = intVal.toString(); if (scale == 0) return bigStr; boolean negative = (bigStr.charAt(0) == '-'); int point = bigStr.length() - scale - (negative ? 1 : 0); StringBuffer sb = new StringBuffer(bigStr.length() + 2 + (point <= 0 ? (-point + 1) : 0... |
sb.append('0'); point++; | if (negative) val.append('-'); val.append('0').append('.'); while (point < 0) { val.append('0'); point++; } val.append(bigStr.substring(negative ? 1 : 0)); | public String toString () { String bigStr = intVal.toString(); if (scale == 0) return bigStr; boolean negative = (bigStr.charAt(0) == '-'); int point = bigStr.length() - scale - (negative ? 1 : 0); StringBuffer sb = new StringBuffer(bigStr.length() + 2 + (point <= 0 ? (-point + 1) : 0... |
sb.append(bigStr.substring(negative ? 1 : 0)); | else { val.append(bigStr); val.insert(point + (negative ? 1 : 0), '.'); } | public String toString () { String bigStr = intVal.toString(); if (scale == 0) return bigStr; boolean negative = (bigStr.charAt(0) == '-'); int point = bigStr.length() - scale - (negative ? 1 : 0); StringBuffer sb = new StringBuffer(bigStr.length() + 2 + (point <= 0 ? (-point + 1) : 0... |
sb.append(bigStr); sb.insert(point + (negative ? 1 : 0), '.'); | val.append(bigStr); if (bigStr.length() > 1) val.insert( ( negative ? 2 : 1 ), '.'); val.append('E'); if (point - 1 >= 0) val.append('+'); val.append( point - 1 ); | public String toString () { String bigStr = intVal.toString(); if (scale == 0) return bigStr; boolean negative = (bigStr.charAt(0) == '-'); int point = bigStr.length() - scale - (negative ? 1 : 0); StringBuffer sb = new StringBuffer(bigStr.length() + 2 + (point <= 0 ? (-point + 1) : 0... |
return sb.toString(); | return val.toString(); | public String toString () { String bigStr = intVal.toString(); if (scale == 0) return bigStr; boolean negative = (bigStr.charAt(0) == '-'); int point = bigStr.length() - scale - (negative ? 1 : 0); StringBuffer sb = new StringBuffer(bigStr.length() + 2 + (point <= 0 ? (-point + 1) : 0... |
public StringBuilder insert(int offset, char ch) | public StringBuilder insert(int offset, char[] str, int str_offset, int len) | public StringBuilder insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return this; } |
if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; | if (offset < 0 || offset > count || len < 0 || str_offset < 0 || str_offset > str.length - len) throw new StringIndexOutOfBoundsException(); ensureCapacity(count + len); VMSystem.arraycopy(value, offset, value, offset + len, count - offset); VMSystem.arraycopy(str, str_offset, value, offset, len); count += len; | public StringBuilder insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return this; } |
public static Double valueOf(String s) | public static Double valueOf(double val) | public static Double valueOf(String s) { return new Double(parseDouble(s)); } |
return new Double(parseDouble(s)); | return new Double(val); | public static Double valueOf(String s) { return new Double(parseDouble(s)); } |
perms.setReadOnly(); | public final PermissionCollection getPermissions(CodeSource codeSource) { Permissions perms = new Permissions(); for (Iterator it = cs2pc.entrySet().iterator(); it.hasNext();) { final Map.Entry e = (Map.Entry) it.next(); final CodeSource cs = (CodeSource) e.getKey(); i... | |
public static synchronized Calendar getInstance(TimeZone zone) | public static synchronized Calendar getInstance() | public static synchronized Calendar getInstance(TimeZone zone) { return getInstance(zone, Locale.getDefault()); } |
return getInstance(zone, Locale.getDefault()); | return getInstance(TimeZone.getDefault(), Locale.getDefault()); | public static synchronized Calendar getInstance(TimeZone zone) { return getInstance(zone, Locale.getDefault()); } |
this.target = target; | public OverlayLayout(Container target) { // TODO } | |
return (float) 0.0; | if (target != this.target) throw new AWTError("OverlayLayout can't be shared"); checkTotalRequirements(); return xTotal.alignment; | public float getLayoutAlignmentX(Container target) { return (float) 0.0; // TODO } |
return (float) 0.0; | if (target != this.target) throw new AWTError("OverlayLayout can't be shared"); checkTotalRequirements(); return yTotal.alignment; | public float getLayoutAlignmentY(Container target) { return (float) 0.0; // TODO } |
xChildren = null; yChildren = null; xTotal = null; yTotal = null; offsetsX = null; offsetsY = null; spansX = null; spansY = null; | public void invalidateLayout(Container target) { // TODO } | |
if (target != this.target) throw new AWTError("OverlayLayout can't be shared"); checkLayout(); Component[] children = target.getComponents(); for (int i = 0; i < children.length; i++) children[i].setBounds(offsetsX[i], offsetsY[i], spansX[i], spansY[i]); | public void layoutContainer(Container target) { // TODO } | |
return null; | if (target != this.target) throw new AWTError("OverlayLayout can't be shared"); checkTotalRequirements(); return new Dimension(xTotal.maximum, yTotal.maximum); | public Dimension maximumLayoutSize(Container target) { return null; // TODO } |
return null; | if (target != this.target) throw new AWTError("OverlayLayout can't be shared"); checkTotalRequirements(); return new Dimension(xTotal.minimum, yTotal.minimum); | public Dimension minimumLayoutSize(Container target) { return null; // TODO } |
return null; | if (target != this.target) throw new AWTError("OverlayLayout can't be shared"); checkTotalRequirements(); return new Dimension(xTotal.preferred, yTotal.preferred); | public Dimension preferredLayoutSize(Container target) { return null; // TODO } |
float myPrefRight = children[i].preferred - myMinLeft; | float myPrefRight = children[i].preferred - myPrefLeft; | getAlignedSizeRequirements(SizeRequirements[] children) { float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < children.length; i++) { float myMinLeft = children[i].minimum * children[i].alignment; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.