rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return new DirectByteBufferImpl (owner, adjustAddress(address, position()), rem, rem, 0, isReadOnly ()); | if (isReadOnly()) return new DirectByteBufferImpl.ReadOnly (owner, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0); else return new DirectByteBufferImpl.ReadWrite (owner, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0); | public ByteBuffer slice () { int rem = remaining(); return new DirectByteBufferImpl (owner, adjustAddress(address, position()), rem, rem, 0, isReadOnly ()); } |
public final void initialize(AbstractVmClassLoader loader) { | public final void initialize(VmClassLoader loader) { | public final void initialize(AbstractVmClassLoader loader) { if (context == null) { context = new X86CompilerContext(loader); } } |
if (bytecode != null) { | /*if (bytecode != null) { | public VmCompiledCode(NativeCodeCompiler compiler, VmByteCode bytecode, Address nativeCode, Object compiledCode, int size, VmCompiledExceptionHandler[] eTable, Address defaultExceptionHandler, VmAddressMap addressTable) { this.compiler = compiler; this.magic = compiler... |
} | }*/ | public VmCompiledCode(NativeCodeCompiler compiler, VmByteCode bytecode, Address nativeCode, Object compiledCode, int size, VmCompiledExceptionHandler[] eTable, Address defaultExceptionHandler, VmAddressMap addressTable) { this.compiler = compiler; this.magic = compiler... |
public CompoundBorder(Border outsideBorder, Border insideBorder) | public CompoundBorder() | public CompoundBorder(Border outsideBorder, Border insideBorder) { this.outsideBorder = outsideBorder; this.insideBorder = insideBorder; } |
this.outsideBorder = outsideBorder; this.insideBorder = insideBorder; | this (null, null); | public CompoundBorder(Border outsideBorder, Border insideBorder) { this.outsideBorder = outsideBorder; this.insideBorder = insideBorder; } |
valid = Boolean.valueOf(DIGEST0.equals(Util.toString(new Tiger().digest()))); | String d = Util.toString(new Tiger().digest()); valid = Boolean.valueOf(DIGEST0.equals(d)); | public boolean selfTest() { if (valid == null) { valid = Boolean.valueOf(DIGEST0.equals(Util.toString(new Tiger().digest()))); } return valid.booleanValue(); } |
throw new InternalError ("not implemented"); | return textField.getActions(); | protected Action[] getActions () { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | return textField; | protected JFormattedTextField getFormattedTextField () { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | return textField.getNavigationFilter(); | protected NavigationFilter getNavigationFilter () { throw new InternalError ("not implemented"); } |
public void install (JFormattedTextField ftf) | public void install(JFormattedTextField textField) | public void install (JFormattedTextField ftf) { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | if (this.textField != null) uninstall(); this.textField = textField; | public void install (JFormattedTextField ftf) { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | textField.invalidEdit(); | protected void invalidEdit () { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | textField.editValid = valid; | protected void setEditValid (boolean valid) { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | this.textField = null; | public void uninstall () { throw new InternalError ("not implemented"); } |
this((AbstractFormatterFactory) null); | this((AbstractFormatterFactory) null, null); | public JFormattedTextField () { this((AbstractFormatterFactory) null); } |
throw new InternalError ("not implemented"); | if (formatterFactory == null) return null; return formatterFactory.getFormatter(this); | public AbstractFormatter getFormatter () { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | return formatterFactory; | public AbstractFormatterFactory getFormatterFactory () { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | UIManager.getLookAndFeel().provideErrorFeedback(this); | protected void invalidEdit () { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | return editValid; | public boolean isEditValid () { throw new InternalError ("not implemented"); } |
public void setDocument(Document newdoc) | public void setDocument(Document newDocument) | public void setDocument(Document newdoc) { Document document = getDocument(); if (document == newdoc) return; setDocument(newdoc); firePropertyChange("document", document, newdoc); } |
Document document = getDocument(); | Document oldDocument = getDocument(); | public void setDocument(Document newdoc) { Document document = getDocument(); if (document == newdoc) return; setDocument(newdoc); firePropertyChange("document", document, newdoc); } |
if (document == newdoc) | if (oldDocument == newDocument) | public void setDocument(Document newdoc) { Document document = getDocument(); if (document == newdoc) return; setDocument(newdoc); firePropertyChange("document", document, newdoc); } |
setDocument(newdoc); firePropertyChange("document", document, newdoc); | super.setDocument(newDocument); | public void setDocument(Document newdoc) { Document document = getDocument(); if (document == newdoc) return; setDocument(newdoc); firePropertyChange("document", document, newdoc); } |
throw new InternalError ("not implemented"); | AbstractFormatter oldFormatter = null; if (formatterFactory != null) oldFormatter = formatterFactory.getFormatter(this); if (oldFormatter == formatter) return; setFormatterFactory(new FormatterFactoryWrapper(formatter)); firePropertyChange("formatter", oldFormatter, formatter); | protected void setFormatter (AbstractFormatter formatter) { throw new InternalError ("not implemented"); } |
throw new InternalError ("not implemented"); | if (formatterFactory == factory) return; AbstractFormatterFactory oldFactory = formatterFactory; formatterFactory = factory; firePropertyChange("formatterFactory", oldFactory, factory); | public void setFormatterFactory (AbstractFormatterFactory factory) { throw new InternalError ("not implemented"); } |
firePropertyChange("value", oldValue, newValue); | public void setValue (Object newValue) { value = newValue; } | |
{ | public boolean equals(Object obj) { if (obj == null) { return false; } if (!(obj instanceof DSAPublicKey)) { return false; } DSAPublicKey that = (DSAPublicKey) obj; return super.equals(that) && y.equals(that.getY()); } | |
} if (!(obj instanceof DSAPublicKey)) { | if (! (obj instanceof DSAPublicKey)) | public boolean equals(Object obj) { if (obj == null) { return false; } if (!(obj instanceof DSAPublicKey)) { return false; } DSAPublicKey that = (DSAPublicKey) obj; return super.equals(that) && y.equals(that.getY()); } |
} | public boolean equals(Object obj) { if (obj == null) { return false; } if (!(obj instanceof DSAPublicKey)) { return false; } DSAPublicKey that = (DSAPublicKey) obj; return super.equals(that) && y.equals(that.getY()); } | |
String ls = SystemProperties.getProperty("line.separator"); | String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); | public String toString() { if (str == null) { String ls = SystemProperties.getProperty("line.separator"); str = new StringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append("y=0x").append(y.toString(16)).append(ls) .appen... |
ORB orb = Restricted_ORB.Singleton; | ORB orb = OrbRestricted.Singleton; | public static TypeCode type() { if (typecode == null) { ORB orb = Restricted_ORB.Singleton; typecode = orb.create_value_box_tc(id(), "WStringValue", twString); } return typecode; } |
StringContent.this.insertString(this.start, this.redoContent); | insertString(start, redoContent); redoContent = null; if (positions != null) { updateUndoPositions(positions); positions = null; } | public void redo() { super.redo(); try { StringContent.this.insertString(this.start, this.redoContent); } catch (BadLocationException b) { throw new CannotRedoException(); } } |
StringContent.this.checkLocation(this.start, this.length); this.redoContent = new String(StringContent.this.content, this.start, this.length); StringContent.this.remove(this.start, this.length); | if (marks != null) positions = getPositionsInRange(null, start, length); redoContent = getString(start, length); remove(start, length); | public void undo() { super.undo(); try { StringContent.this.checkLocation(this.start, this.length); this.redoContent = new String(StringContent.this.content, this.start, this.length); StringContent.this.remove(this.start, this.length); } catch ... |
if (marks != null) positions = getPositionsInRange(null, start, str.length()); | public RemoveUndo(int start, String str) { super(); this.start = start; this.undoString = str; } | |
int end = this.undoString.length(); StringContent.this.remove(this.start, end); | undoString = getString(start, len); if (marks != null) positions = getPositionsInRange(null, start, len); remove(this.start, len); | public void redo() { super.redo(); try { int end = this.undoString.length(); StringContent.this.remove(this.start, end); } catch (BadLocationException bad) { throw new CannotRedoException(); } } |
if (positions != null) { updateUndoPositions(positions); positions = null; } undoString = null; | public void undo() { super.undo(); try { StringContent.this.insertString(this.start, this.undoString); } catch (BadLocationException bad) { throw new CannotUndoException(); } } | |
this.offset = offset; | garbageCollect(); mark = new Mark(offset); mark.refCount++; marks.add(mark); new WeakReference(this, queueOfDeath); | public StickyPosition(int offset) { this.offset = offset; } |
return offset < 0 ? 0 : offset; | return mark.mark; | public int getOffset() { return offset < 0 ? 0 : offset; } |
if (offset < this.count || offset > this.count) checkLocation(offset, 0); | if (marks == null) marks = new Vector(); | public Position createPosition(int offset) throws BadLocationException { if (offset < this.count || offset > this.count) checkLocation(offset, 0); StickyPosition sp = new StickyPosition(offset); this.positions.add(sp); return sp; } |
this.positions.add(sp); | public Position createPosition(int offset) throws BadLocationException { if (offset < this.count || offset > this.count) checkLocation(offset, 0); StickyPosition sp = new StickyPosition(offset); this.positions.add(sp); return sp; } | |
checkLocation(where, len); txt.array = this.content; | if (where + len > count) throw new BadLocationException("Invalid location", where + len); txt.array = content; | public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); txt.array = this.content; txt.offset = where; txt.count = len; } |
Vector refPos = new Vector(); Iterator iter = this.positions.iterator(); | Vector refPos = v == null ? new Vector() : v; Iterator iter = marks.iterator(); | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector refPos = new Vector(); Iterator iter = this.positions.iterator(); while(iter.hasNext()) { Position p = (Position) iter.next(); if ((o... |
Position p = (Position) iter.next(); if ((offset <= p.getOffset()) && (p.getOffset() <= (offset + length))) refPos.add(p); | Mark m = (Mark) iter.next(); if (offset <= m.mark && m.mark <= offset + length) refPos.add(new UndoPosRef(m)); | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector refPos = new Vector(); Iterator iter = this.positions.iterator(); while(iter.hasNext()) { Position p = (Position) iter.next(); if ((o... |
char[] temp = new char[this.content.length + insert.length]; this.count += insert.length; if (where > 0) System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(insert, 0, temp, where, insert.length); System.arraycopy(this.content, where, temp, (where + insert.length), (temp.length - where - insert.length)... | replace(where, 0, insert); | public UndoableEdit insertString(int where, String str) throws BadLocationException { checkLocation(where, 0); if (where == this.count) throw new BadLocationException("Invalid location", 1); if (str == null) throw new NullPointerException(); char[] insert = str.toCharArray(); char[] temp ... |
Vector refPos = getPositionsInRange(this.positions, where, temp.length - where); Iterator iter = refPos.iterator(); | if (marks != null) { Iterator iter = marks.iterator(); int start = where; if (start == 0) start = 1; | public UndoableEdit insertString(int where, String str) throws BadLocationException { checkLocation(where, 0); if (where == this.count) throw new BadLocationException("Invalid location", 1); if (str == null) throw new NullPointerException(); char[] insert = str.toCharArray(); char[] temp ... |
StickyPosition p = (StickyPosition)iter.next(); p.setOffset(p.getOffset() + str.length()); | Mark m = (Mark) iter.next(); if (m.mark >= start) m.mark += str.length(); | public UndoableEdit insertString(int where, String str) throws BadLocationException { checkLocation(where, 0); if (where == this.count) throw new BadLocationException("Invalid location", 1); if (str == null) throw new NullPointerException(); char[] insert = str.toCharArray(); char[] temp ... |
} | public UndoableEdit insertString(int where, String str) throws BadLocationException { checkLocation(where, 0); if (where == this.count) throw new BadLocationException("Invalid location", 1); if (str == null) throw new NullPointerException(); char[] insert = str.toCharArray(); char[] temp ... | |
return this.count; | return count; | public int length() { return this.count; } |
char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems + 1); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy... | |
System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); this.content = new char[temp.length]; System.arraycopy(temp, 0, this.content, 0, this.content.length); | replace(where, nitems, EMPTY); | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems + 1); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy... |
Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); Iterator iter = refPos.iterator(); | if (marks != null) { Iterator iter = marks.iterator(); | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems + 1); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy... |
StickyPosition p = (StickyPosition)iter.next(); int result = p.getOffset() - nitems; p.setOffset(result); if (result < 0) this.positions.remove(p); | Mark m = (Mark) iter.next(); if (m.mark >= where + nitems) m.mark -= nitems; else if (m.mark >= where) m.mark = where; } | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems + 1); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy... |
for (Iterator i = positions.iterator(); i.hasNext();) { UndoPosRef pos = (UndoPosRef) i.next(); pos.reset(); } | protected void updateUndoPositions(Vector positions) { // We do nothing here. } | |
final Object obj = Class.forName(className).newInstance(); | final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Object obj = cl.loadClass(className).newInstance(); | private void createType(Map types, ConfigurationElement element) { final String className = element.getAttribute("class"); if (className != null) { try { final Object obj = Class.forName(className).newInstance(); final FileSystemType type = (FileSystemType)obj; types.put(type.getName(), type); } catch ... |
byte[] result = new byte[] { (byte) (h0 >>> 24), (byte) (h0 >>> 16), (byte) (h0 >>> 8), (byte) h0, (byte) (h1 >>> 24), (byte) (h1 >>> 16), (byte) (h1 >>> 8), (byte) h1, (byte) (h2 >>> 24), (byte) (h2 >>> 16), (byte) (h2 >>> 8), (byte) h2, (byte) (h3 >>> 24), (byte) (h3 >>> 16), (byte) (h3 >>> 8), (byte) h3, (byte) (h4 ... | return new byte[] { (byte)(h0 >>> 24), (byte)(h0 >>> 16), (byte)(h0 >>> 8), (byte) h0, (byte)(h1 >>> 24), (byte)(h1 >>> 16), (byte)(h1 >>> 8), (byte) h1, (byte)(h2 >>> 24), (byte)(h2 >>> 16), (byte)(h2 >>> 8), (byte) h2, (byte)(h3 >>> 24), (byte)(h3 >>> 16), (byte)(h3 >>> 8), (byte) h3, (byte)(h4 >>> 24), (byte)(h4 >>>... | protected byte[] getResult() { byte[] result = new byte[] { (byte) (h0 >>> 24), (byte) (h0 >>> 16), (byte) (h0 >>> 8), (byte) h0, (byte) (h1 >>> 24), (byte) (h1 >>> 16), (byte) (h1 >>> 8), (byte) h1, ... |
sha(int hh0, int hh1, int hh2, int hh3, int hh4, byte[] in, int offset) | private static synchronized final int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, byte[] in, int offset) | sha(int hh0, int hh1, int hh2, int hh3, int hh4, byte[] in, int offset) { int A = hh0; int B = hh1; int C = hh2; int D = hh3; int E = hh4; int r, T; for (r = 0; r < 16; r++) { w[r] = in[offset++] << 24 | (in[offset++] & 0xFF) << 16 | (in[offset++] & 0xFF) << 8 | (in[off... |
{ w[r] = in[offset++] << 24 | (in[offset++] & 0xFF) << 16 | (in[offset++] & 0xFF) << 8 | (in[offset++] & 0xFF); } | w[r] = in[offset++] << 24 | (in[offset++] & 0xFF) << 16 | (in[offset++] & 0xFF) << 8 | (in[offset++] & 0xFF); | sha(int hh0, int hh1, int hh2, int hh3, int hh4, byte[] in, int offset) { int A = hh0; int B = hh1; int C = hh2; int D = hh3; int E = hh4; int r, T; for (r = 0; r < 16; r++) { w[r] = in[offset++] << 24 | (in[offset++] & 0xFF) << 16 | (in[offset++] & 0xFF) << 8 | (in[off... |
super("The type, " + arg + ", is invalid for the conversion character, " + c + "."); if (arg == null) throw new NullPointerException("The supplied type was null."); | public IllegalFormatConversionException(char c, Class<?> arg) { this.c = c; this.arg = arg; } | |
cellEditor = createDefaultCellEditor(); | public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; createdCellEditor = true; ... | |
installListeners(); | public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; createdCellEditor = true; ... | |
installListeners(); | public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; createdCellEditor = true; ... | |
createdCellEditor = true; | protected void setCellEditor(TreeCellEditor editor) { cellEditor = editor; } | |
} | UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap) defaults.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMap(); action = new TreeAction(); Object keys[] = focusInputMap.allKeys(); for (int i = 0... | protected void installKeyboardActions() { } |
public abstract void addTreeModelListener(TreeModelListener listener); | void addTreeModelListener(TreeModelListener listener); | public abstract void addTreeModelListener(TreeModelListener listener); |
public abstract Object getRoot(); | Object getRoot(); | public abstract Object getRoot(); |
public abstract void removeTreeModelListener(TreeModelListener listener); | void removeTreeModelListener(TreeModelListener listener); | public abstract void removeTreeModelListener(TreeModelListener listener); |
String range = p.hostport.substring(hostport.indexOf(":") + 1); if (range.startsWith("-")) | String range = p.hostport.substring(p.hostport.indexOf(":") + 1); if (range.startsWith("-")) | public boolean implies(Permission perm) { SocketPermission p; // First make sure we are the right object type if (perm instanceof SocketPermission) p = (SocketPermission) perm; else return false; // Next check the actions String ourlist = getActions(); String theirlist = ... |
if (ourhost.equals("*")) return true; | public boolean implies(Permission perm) { SocketPermission p; // First make sure we are the right object type if (perm instanceof SocketPermission) p = (SocketPermission) perm; else return false; // Next check the actions String ourlist = getActions(); String theirlist = ... | |
public Image getScaledInstance(int width, int height, int flags) { | public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, height)); return Toolkit.getDefaultToolkit().createImage(producer); case SCALE... | public Image getScaledInstance(int width, int height, int flags) { throw new Error("not implemented"); } |
} | public Image getScaledInstance(int width, int height, int flags) { throw new Error("not implemented"); } | |
g.drawLine(1, 1, 1, h - 1); g.drawLine(1, 1, w - 1, 1); | g.drawLine(1, 1, 1, h - 2); g.drawLine(1, 1, w - 3, 1); | private void paintNorthBorderFreeStanding(Graphics g, int w, int h) { if (isEnabled()) { g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(0, 0, w - 2, 0); g.drawLine(0, 0, 0, h - 1); g.drawLine(2, h - 1, w - 2, h - 1); g.drawLine(w - 2, 2, w - 2, h - 1); ... |
g.drawLine(w - 1, 1, w - 1, 1); | g.drawLine(w - 2, 1, w - 2, 1); | private void paintNorthBorderFreeStanding(Graphics g, int w, int h) { if (isEnabled()) { g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(0, 0, w - 2, 0); g.drawLine(0, 0, 0, h - 1); g.drawLine(2, h - 1, w - 2, h - 1); g.drawLine(w - 2, 2, w - 2, h - 1); ... |
if (layerNum == layer) | if (layerNum.intValue() == layer.intValue()) | protected int[] layerToRange (Integer layer) { int[] ret = new int[2]; ret[1] = getComponents ().length; Iterator i = layers.entrySet ().iterator (); while (i.hasNext()) { Map.Entry pair = (Map.Entry) i.next(); Integer layerNum = (Integer) pair.getKey (); Integer layerSz = (Integ... |
int targ = top + position; | int targ = Math.min(top + position, bot-1); | public void setPosition(Component c, int position) { Integer layer = getLayer (c); int[] range = layerToRange (layer); if (range[0] == range[1]) throw new IllegalArgumentException (); int top = range[0]; int bot = range[1]; if (position == -1) position = (bot - top) - 1; int targ = top +... |
"EditorPane.border", new BorderUIResource(BasicBorders.getMarginBorder()), | "EditorPane.border", BasicBorders.getMarginBorder(), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... | |
"TextArea.font", new FontUIResource("Monospaced", Font.PLAIN, 12), | "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
"TextPane.border", new BorderUIResource(BasicBorders.getMarginBorder()), | "TextPane.border", BasicBorders.getMarginBorder(), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU... |
protected void doResolve(AbstractVmClassLoader clc) { | protected void doResolve(VmClassLoader clc) { | protected void doResolve(AbstractVmClassLoader clc) { getConstClass().resolve(clc); doResolveMember(clc); cachedHashCode = VmMember.calcHashCode(getName(), getSignature()); } |
protected abstract void doResolve(AbstractVmClassLoader clc); | protected abstract void doResolve(VmClassLoader clc); | protected abstract void doResolve(AbstractVmClassLoader clc); |
protected AccessibleJFileChooser(JFileChooser component) { super(component); } | protected AccessibleJFileChooser() { } | protected AccessibleJFileChooser(JFileChooser component) { super(component); // TODO } // AccessibleJFileChooser() |
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJFileChooser(this); } return accessibleContext; } | public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJFileChooser(); return accessibleContext; } | public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJFileChooser(this); } // if return accessibleContext; } // getAccessibleContext() |
FSEntry entry = (FSEntry)iterator.next(); | FSEntry entry = iterator.next(); | public FSEntry getEntry(String name) throws IOException{ //parse the directory and search for the file FSEntryIterator iterator=iterator(); while(iterator.hasNext()) { FSEntry entry = (FSEntry)iterator.next(); if(entry.getName().equals(name)) return entry; } return null; } |
synchronized(iNode) { if(len+off>getLength()) throw new IOException("Can't read past the file!"); long blockSize = iNode.getExt2FileSystem().getBlockSize(); long bytesRead=0; while( bytesRead < len ) { long blockNr = (fileOffset+bytesRead) / blockSize; long blockOffset = (fileOffset+bytesRead) % blockSize; long copyLen... | synchronized(iNode) { try{ if(len+off>getLength()) throw new IOException("Can't read past the file!"); long blockSize = iNode.getExt2FileSystem().getBlockSize(); long bytesRead=0; while( bytesRead < len ) { long blockNr = (fileOffset+bytesRead) / blockSize; long blockOffset = (fileOffset+bytesRead) % blockSize; long co... | public void read(long fileOffset, byte[] dest, int off, int len) throws IOException { //a single inode may be represented by more than one Ext2Directory instances, //but each will use the same instance of the underlying inode (see Ext2FileSystem.getINode()), //so synchronize to the inode synchronized(iNode) { ... |
if (expr instanceof Selector) { Selector selector = (Selector) expr; Test[] tests = selector.getTests(); if (tests.length > 0) return tests[0]; } | Test getNodeTest(Expr expr) { if (expr instanceof Selector) { Selector selector = (Selector) expr; Test[] tests = selector.getTests(); if (tests.length > 0) return tests[0]; } return null; } | |
public JIFSDirectory(String name) { this(); label = name; | public JIFSDirectory() { entries = new HashMap<String, FSEntry>(); | public JIFSDirectory(String name) { this(); label = name; } |
return 0; | return System.currentTimeMillis(); | public long getLastModified() { return 0; } |
int sumDelta = 0; | long sumDelta = 0; | private static void adjustGreater(int allocated, SizeRequirements[] children, int[] spans, int span) { // Sum up (maxSize - prefSize) over all children int sumDelta = 0; for (int i = 0; i < children.length; i++) { sumDelta += children[i].maximum - children[i].pre... |
if (sumDelta < 0) sumDelta = Integer.MAX_VALUE; | private static void adjustGreater(int allocated, SizeRequirements[] children, int[] spans, int span) { // Sum up (maxSize - prefSize) over all children int sumDelta = 0; for (int i = 0; i < children.length; i++) { sumDelta += children[i].maximum - children[i].pre... | |
spans[i] -= factor * (span - allocated); | spans[i] += factor * (allocated - span); | private static void adjustGreater(int allocated, SizeRequirements[] children, int[] spans, int span) { // Sum up (maxSize - prefSize) over all children int sumDelta = 0; for (int i = 0; i < children.length; i++) { sumDelta += children[i].maximum - children[i].pre... |
SizeRequirements result = new SizeRequirements(); | long minimum = 0; long preferred = 0; long maximum = 0; | getTiledSizeRequirements(SizeRequirements[] children) { SizeRequirements result = new SizeRequirements(); for (int i = 0; i < children.length; i++) { result.minimum += children[i].minimum; result.preferred += children[i].preferred; result.maximum += children[i].maximum; } retu... |
result.minimum += children[i].minimum; result.preferred += children[i].preferred; result.maximum += children[i].maximum; | minimum += children[i].minimum; preferred += children[i].preferred; maximum += children[i].maximum; | getTiledSizeRequirements(SizeRequirements[] children) { SizeRequirements result = new SizeRequirements(); for (int i = 0; i < children.length; i++) { result.minimum += children[i].minimum; result.preferred += children[i].preferred; result.maximum += children[i].maximum; } retu... |
if (minimum > Integer.MAX_VALUE) minimum = Integer.MAX_VALUE; if (preferred > Integer.MAX_VALUE) preferred = Integer.MAX_VALUE; if (maximum > Integer.MAX_VALUE) maximum = Integer.MAX_VALUE; SizeRequirements result = new SizeRequirements((int) minimum, (int) preferred, (int) maximum, 0.5F); | getTiledSizeRequirements(SizeRequirements[] children) { SizeRequirements result = new SizeRequirements(); for (int i = 0; i < children.length; i++) { result.minimum += children[i].minimum; result.preferred += children[i].preferred; result.maximum += children[i].maximum; } retu... | |
private final boolean expect (String source, ParsePosition pos, char ch) | private boolean expect(String source, ParsePosition pos, char ch) | private final boolean expect (String source, ParsePosition pos, char ch) { int x = pos.getIndex(); boolean r = x < source.length() && source.charAt(x) == ch; if (r) pos.setIndex(x + 1); else pos.setErrorIndex(x); return r; } |
final private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) | private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) | final private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos) { String temp; AttributedCharacterIterator.Attribute attribute; calendar.setTime(date); // go through vector, filling in fields where applicable, else toString Iterator iter = tokens.iterator(); while (ite... |
public final String getDisplayName(boolean dst, int style) { return (getDisplayName(dst, style, Locale.getDefault())); | public final String getDisplayName() { return (getDisplayName(false, LONG, Locale.getDefault())); | public final String getDisplayName(boolean dst, int style) { return (getDisplayName(dst, style, Locale.getDefault())); } |
public abstract Date parse (String source, ParsePosition pos); | public Date parse (String source) throws ParseException { ParsePosition pos = new ParsePosition(0); Date result = parse (source, pos); if (result == null) { int index = pos.getErrorIndex(); if (index < 0) index = pos.getIndex(); throw new ParseException("invalid Date syntax in \"" + source + '\"', index); } return resu... | public abstract Date parse (String source, ParsePosition pos); |
for(int i = 0; i < components.length; i++) | Component lastComp = null; int cellx = 0; int celly = 0; int cellw = 0; int cellh = 0; for (int i = 0; i < components.length; i++) | protected void ArrangeGrid (Container parent) { Component[] components = parent.getComponents(); if (components.length == 0) return; GridBagLayoutInfo info = getLayoutInfo (parent, PREFERREDSIZE); if (info.cols == 0 && info.rows == 0) return; // DEBUG //dumpLayoutInfo ... |
GridBagConstraints constraints = lookupInternalConstraints(component); | Dimension dim = component.getPreferredSize(); GridBagConstraints constraints = lookupInternalConstraints(component); if (lastComp != null && constraints.gridheight == GridBagConstraints.REMAINDER) celly += cellh; else celly = sumIntArray(info.rowHeights, constraints.gridy); if (lastComp != null && constraints.gridwid... | protected void ArrangeGrid (Container parent) { Component[] components = parent.getComponents(); if (components.length == 0) return; GridBagLayoutInfo info = getLayoutInfo (parent, PREFERREDSIZE); if (info.cols == 0 && info.rows == 0) return; // DEBUG //dumpLayoutInfo ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.