bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
private void notifyNode(DomEvent e, DomNode current, boolean capture, ListenerRecord[] notificationSet) { int count = 0; // do any of this set of listeners get notified? for (int i = 0; i < current.nListeners; i++) { List...
private void notifyNode(DomEvent e, DomNode current, boolean capture, ListenerRecord[] notificationSet) { int count = 0; // do any of this set of listeners get notified? for (int i = 0; i < current.nListeners; i++) { List...
24,162
private void notifyNode(DomEvent e, DomNode current, boolean capture, ListenerRecord[] notificationSet) { int count = 0; // do any of this set of listeners get notified? for (int i = 0; i < current.nListeners; i++) { List...
private void notifyNode(DomEvent e, DomNode current, boolean capture, ListenerRecord[] notificationSet) { int count = 0; // do any of this set of listeners get notified? for (int i = 0; i < current.nListeners; i++) { List...
24,163
public String toString() { return "lastGCTime " + lastGCTime + "\n" + "lastMarkDuration " + lastMarkDuration + "\n" + "lastSweepDuration " + lastSweepDuration + "\n" + "lastCleanupDuration " + lastCleanupDuration + "\n" + "lastMarkedObjects " + ...
public String toString() { return "lastGCTime " + lastGCTime + "\n" + "lastMarkDuration " + lastMarkDuration + "\n" + "lastSweepDuration " + lastSweepDuration + "\n" + "lastCleanupDuration " + lastCleanupDuration + "\n" + "lastMarkedObjects " + ...
24,164
public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception { // Check if client and server are in the same VM, then local call can be used to // replace remote call, but it's somewhat violating remote semantic. Object svrobj = manager.serverobj; // Make sure that the s...
public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception { // Check if client and server are in the same VM, then local call can be used to // replace remote call, but it's somewhat violating remote semantic. Object svrobj = manager.serverobj; // Make sure that the s...
24,165
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOut...
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOut...
24,167
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOut...
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOut...
24,168
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOut...
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOut...
24,169
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { manager = UnicastConnectionManager.read(in); objid = ObjID.read(in); byte ack = in.readByte(); // This byte is somewhat confusing when interoperating with JDK if (ack != RETURN_ACK && ack != 0/*jdk ack value*/) { throw new IOExceptio...
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { manager = UnicastConnectionManager.read(in); objid = ObjID.read(in); byte ack = in.readByte(); // This byte is somewhat confusing when interoperating with JDK if (ack != RETURN_ACK && ack != 0/*jdk ack value*/) { throw new IOExceptio...
24,170
protected void paintSafely(Graphics g) { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); if (textComponent.isOpaque()) paintBackground(g); if (highlighter != null && textComponent.getSelectionStart() != textComponent.getSelectionEnd()) h...
protected void paintSafely(Graphics g) { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); if (textComponent.isOpaque()) paintBackground(g); if (highlighter != null && textComponent.getSelectionStart() != textComponent.getSelectionEnd()) h...
24,172
public static String[] getAvailableIDs(int rawOffset) { int count = 0; Iterator iter = timezones.entrySet().iterator(); while (iter.hasNext()) { // Don't iterate the values, since we want to count // doubled values (aliases) Map.Entry entry = (Map.Entry)iter.next(); if (((TimeZone)entry.getValue()).getRawO...
public static String[] getAvailableIDs(int rawOffset) { int count = 0; Iterator iter = timezones.entrySet().iterator(); while (iter.hasNext()) { // Don't iterate the values, since we want to count // doubled values (aliases) Map.Entry entry = (Map.Entry)iter.next(); if (((TimeZone)entry.getValue()).getRawO...
24,174
public static String[] getAvailableIDs(int rawOffset) { int count = 0; Iterator iter = timezones.entrySet().iterator(); while (iter.hasNext()) { // Don't iterate the values, since we want to count // doubled values (aliases) Map.Entry entry = (Map.Entry)iter.next(); if (((TimeZone)entry.getValue()).getRawO...
public static String[] getAvailableIDs(int rawOffset) { int count = 0; Iterator iter = timezones.entrySet().iterator(); while (iter.hasNext()) { // Don't iterate the values, since we want to count // doubled values (aliases) Map.Entry entry = (Map.Entry)iter.next(); if (((TimeZone)entry.getValue()).getRawO...
24,175
public static void setDefault(TimeZone zone) { defaultZone = zone; }
public static void setDefault(TimeZone zone) { defaultZone = zone; }
24,176
public void configure (String configArgs, Thread mainThread) { _mainThread = mainThread; _processConfigury (configArgs); }
public void configure (String configArgs) { _mainThread = mainThread; _processConfigury (configArgs); }
24,177
public void configure (String configArgs, Thread mainThread) { _mainThread = mainThread; _processConfigury (configArgs); }
public void configure (String configArgs, Thread mainThread) { _processConfigury (configArgs); }
24,178
public void run () { try { _doInitialization (); _mainThread.start (); _mainThread.join (); } catch (InterruptedException ie) { /* Shutting down. If we're in server mode, we should prepare for a new connection. Otherwise, we should simply exit. */ // FIXME } catch (Throwable t) ...
public void run () { try { _doInitialization (); _mainThread.start (); _mainThread.join (); } catch (InterruptedException ie) { /* Shutting down. If we're in server mode, we should prepare for a new connection. Otherwise, we should simply exit. */ // FIXME } catch (Throwable t) ...
24,179
LeafElement(Element e, AttributeSet a, int s, int end) { super(e, a); }
LeafElement(Element e, AttributeSet a, int s, int end) { super(e, a); }
24,180
AbstractDocument(Content doc) { content = doc; }
AbstractDocument(Content doc) { content = doc; }
24,181
public void addDocumentListener(DocumentListener listener) { doc_list.addElement(listener); }
public void addDocumentListener(DocumentListener listener) { doc_list.addElement(listener); }
24,182
public void addUndoableEditListener(UndoableEditListener listener) { undo_list.addElement(listener); }
public void addUndoableEditListener(UndoableEditListener listener) { undo_list.addElement(listener); }
24,183
protected void fireChangedUpdate(DocumentEvent e) { }
protected void fireChangedUpdate(DocumentEvent event) { }
24,184
protected void fireInsertUpdate(DocumentEvent e) { }
protected void fireInsertUpdate(DocumentEvent event) { }
24,186
protected void fireRemoveUpdate(DocumentEvent e) { }
protected void fireRemoveUpdate(DocumentEvent event) { }
24,188
protected void fireUndoableEditUpdate(UndoableEditEvent e) { }
protected void fireUndoableEditUpdate(UndoableEditEvent event) { }
24,190
int getAsynchronousLoadPriority() { return 0; }
public int getAsynchronousLoadPriority() { return 0; }
24,192
Element getBidiRootElement() { return null; }
public Element getBidiRootElement() { return null; }
24,193
public EventListener[] getListeners(Class listenerType) { return null; }
public EventListener[] getListeners(Class listenerType) { return listenerList.getListeners(listenerType); }
24,194
public void insertString(int offs, String str, AttributeSet a) { try { content.insertString(offs, str); } catch (Exception e) { System.err.println("FAILED TO INSERT-STRING: " + e + ", at:"+offs); } }
public void insertString(int offs, String str, AttributeSet a) { content.insertString(offs, str); } catch (Exception e) { System.err.println("FAILED TO INSERT-STRING: " + e + ", at:"+offs); } }
24,195
public void insertString(int offs, String str, AttributeSet a) { try { content.insertString(offs, str); } catch (Exception e) { System.err.println("FAILED TO INSERT-STRING: " + e + ", at:"+offs); } }
public void insertString(int offs, String str, AttributeSet a) { try { content.insertString(offs, str); } catch (Exception e) { System.err.println("FAILED TO INSERT-STRING: " + e + ", at:"+offs); } }
24,196
public void removeUndoableEditListener(UndoableEditListener listener) { }
public void removeUndoableEditListener(UndoableEditListener listener) { listenerList.remove(UndoableEditListener.class, listener); }
24,198
void setAsynchronousLoadPriority(int p) { }
public void setAsynchronousLoadPriority(int p) { }
24,199
void setDocumentProperties(Dictionary x) { }
public void setDocumentProperties(Dictionary x) { }
24,200
public Object getAttribute(Object key) { return attributes.getAttribute(key); }
public Object getAttribute(Object key) { Object result = attributes.getAttribute(key); if (result == null && element_parent != null) { AttributeSet parentSet = element_parent.getAttributes(); if (parentSet != null) result = parentSet.getAttribute(key); } return result; }
24,203
public final void visit_checkcast(VmConstClass classRef) { // Resolve classRef classRef.resolve(loader); final VmType<?> resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // ClassRef is an interface or array, do the slow test // Pre-claim ECX L1AHelper....
public final void visit_checkcast(VmConstClass classRef) { // Resolve classRef classRef.resolve(loader); final VmType<?> resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // ClassRef is an interface or array, do the slow test // Pre-claim ECX L1AHelper....
24,204
public final void visit_instanceof(VmConstClass classRef) { // Resolve the classRef classRef.resolve(loader); // Prepare final X86RegisterPool pool = eContext.getGPRPool(); final VmType<?> resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // It is an inte...
public final void visit_instanceof(VmConstClass classRef) { // Resolve the classRef classRef.resolve(loader); // Prepare final X86RegisterPool pool = eContext.getGPRPool(); final VmType<?> resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // It is an inte...
24,205
public Raster createGlyphRaster(int fontSize) { final double scale = (double)sumAreaTable.getHeight() / (double)fontSize; final int width = (int)(sumAreaTable.getWidth() / scale); final ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY); final int[] nBits = { 8 }; final ComponentColorModel cm = new Compon...
public Raster createGlyphRaster(int fontSize) { final double scale = (double)sumAreaTable.getHeight() / (double)fontSize; final int width = (int)(sumAreaTable.getWidth() / scale); final ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY); final int[] nBits = { 8 }; final ComponentColorModel cm = new Compon...
24,206
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
24,207
protected void installDefaults() { LookAndFeel.installBorder(menuItem, "MenuItem.border"); LookAndFeel.installColorsAndFont(menuItem, "MenuItem.background", "MenuItem.foreground", "MenuItem.font"); menuItem.setMargin(UIManager.getInsets("MenuItem.margin")); accelerator...
protected void installDefaults() { LookAndFeel.installBorder(menuItem, "MenuItem.border"); LookAndFeel.installColorsAndFont(menuItem, "MenuItem.background", "MenuItem.foreground", "MenuItem.font"); menuItem.setMargin(UIManager.getInsets("MenuItem.margin")); accelerator...
24,208
protected FramePeer createFrame(Frame target) { setTop(target); final int rc = incRefCount(); if (!initialized) { log.debug("createFrame:desktopFramePeer(" + target + ")"); // Only desktop is real frame initialized = true; decRefCount(false); ...
protected FramePeer createFrame(Frame target) { setTop(target); final int rc = incRefCount(); if (!initialized) { log.debug("createFrame:desktopFramePeer(" + target + ")"); // Only desktop is real frame initialized = true; return new DesktopF...
24,209
public static Socket get_socket(Object key) { Socket s = (Socket) sockets.get(key); if (s == null) return null; else if (s.isClosed()) { sockets.remove(key); return null; } else { sockets.remove(key); try { // Set one minute time out tha...
public static Socket get_socket(Object key) { Socket s = (Socket) sockets.get(key); if (s == null) return null; else if (not_reusable(s)) { sockets.remove(key); return null; } else { sockets.remove(key); try { // Set one minute time out ...
24,210
public static Socket get_socket(Object key) { Socket s = (Socket) sockets.get(key); if (s == null) return null; else if (s.isClosed()) { sockets.remove(key); return null; } else { sockets.remove(key); try { // Set one minute time out tha...
public static Socket get_socket(Object key) { Socket s = (Socket) sockets.get(key); if (s == null) return null; else if (s.isClosed()) { return null; } else { try { // Set one minute time out that will be changed later. s.se...
24,211
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
public void layoutContainer(Container parent) // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition d...
24,214
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
24,215
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
24,216
private static final DateFormat computeInstance (int style, Locale loc, boolean use_date, boolean use_time) { return computeInstance (style, style, loc, use_date, use_time); }
private static final DateFormat computeInstance (int style, Locale loc, boolean use_date, boolean use_time) { return computeInstance (style, style, loc, use_date, use_time); }
24,217
public DERValue getDerValue() { List ext = new ArrayList (3); ext.add (new DERValue (DER.OBJECT_IDENTIFIER, oid)); ext.add (new DERValue (DER.BOOLEAN, new Boolean (critical))); ext.add (new DERValue (DER.OCTET_STRING, value.getEncoded())); return new DERValue (DER.CONSTRUCTED|DER.SEQUENCE, ext); }
public DERValue getDerValue() { List ext = new ArrayList (3); ext.add (new DERValue (DER.OBJECT_IDENTIFIER, oid)); ext.add (new DERValue (DER.BOOLEAN, Boolean.valueOf (critical))); ext.add (new DERValue (DER.OCTET_STRING, value.getEncoded())); return new DERValue (DER.CONSTRUCTED|DER.SEQUENCE, ext); ...
24,218
void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordParam(_password); setAlgorithmParams(_keyAlgorithm, _sigAlgorithm); setKeySize(_keySizeStr); setDName(_dName); setValidityParam(_validityStr); log.finer("-...
void setup() throws Exception { setKeyStoreParams(true, _providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordParam(_password); setAlgorithmParams(_keyAlgorithm, _sigAlgorithm); setKeySize(_keySizeStr); setDName(_dName); setValidityParam(_validityStr); log.fi...
24,222
void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordParam(_password); setAlgorithmParams(_keyAlgorithm, _sigAlgorithm); setKeySize(_keySizeStr); setDName(_dName); setValidityParam(_validityStr); log.finer("-...
void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordParam(_password); setAlgorithmParams(_keyAlgorithm, _sigAlgorithm); setKeySize(_keySizeStr); setDName(_dName); setValidityParam(_validityStr); log.finer("-...
24,223
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair //$NON-NLS-1$ keyPairGenerator.initialize(keySize); Key...
24,225
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
24,226
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
24,227
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
24,228
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
24,229
protected void initializeLocalVars() { this.autoCreateColumnsFromModel = false; if (columnModel == null) { this.autoCreateColumnsFromModel = true; createColumnsFromModel(); } this.columnModel.addColumnModelListener(this); this.defaultRenderersByColumnClass = new Hashtable(); ...
protected void initializeLocalVars() { this.autoCreateColumnsFromModel = false; if (columnModel == null) { this.autoCreateColumnsFromModel = true; createColumnsFromModel(); } this.columnModel.addColumnModelListener(this); this.defaultRenderersByColumnClass = new Hashtable(); ...
24,231
protected Window getGlobalActiveWindow() { // XXX Need a way to test if this thread is in the context of the focus // owner, and throw a SecurityException if that is the case. // XXX Implement. return activeWindow; }
protected Window getGlobalActiveWindow() { // XXX Need a way to test if this thread is in the context of the focus // owner, and throw a SecurityException if that is the case. // XXX Implement. return (Window) getGlobalObject (currentActiveWindows); }
24,234
protected Container getGlobalCurrentFocusCycleRoot() { // XXX Need a way to test if this thread is in the context of the focus // owner, and throw a SecurityException if that is the case. // XXX Implement. return focusCycleRoot; }
protected Container getGlobalCurrentFocusCycleRoot() { // XXX Need a way to test if this thread is in the context of the focus // owner, and throw a SecurityException if that is the case. // XXX Implement. return (Container) getGlobalObject (currentFocusCycleRoots); }
24,235
public CharsetEncoder newEncoder () { return new UTF_16Encoder (this, UTF_16Encoder.LITTLE_ENDIAN, true); }
public CharsetEncoder newEncoder () { return new UTF_16Encoder (this, UTF_16Encoder.LITTLE_ENDIAN, false); }
24,236
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); viewRect ...
24,237
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
24,238
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
24,239
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
24,240
public String toString() { return (addr == null ? hostname : addr.getHostName()) + ":" + port; }
public String toString() { return (addr == null ? hostname : addr.toString()) + ":" + port; }
24,241
private void checkZipFile() throws IOException, ZipException { byte[] magicBuf = new byte[4]; raf.read(magicBuf); if (readLeInt(magicBuf, 0) != LOCSIG) { raf.close(); throw new ZipException("Not a valid zip file"); } }
private void checkZipFile() throws IOException, ZipException { byte[] magicBuf = new byte[4]; boolean validRead = true; if (readLeInt(magicBuf, 0) != LOCSIG) { raf.close(); throw new ZipException("Not a valid zip file"); } }
24,242
private void checkZipFile() throws IOException, ZipException { byte[] magicBuf = new byte[4]; raf.read(magicBuf); if (readLeInt(magicBuf, 0) != LOCSIG) { raf.close(); throw new ZipException("Not a valid zip file"); } }
private void checkZipFile() throws IOException, ZipException { byte[] magicBuf = new byte[4]; raf.read(magicBuf); try { raf.readFully(magicBuf); } catch (EOFException eof) { validRead = false; } if (validRead == false || readLeInt(magicBuf, 0) != LOCSIG) { raf.close(); throw new ZipException("Not a va...
24,243
protected int getSpan(int axis, int childIndex) { if (axis == X_AXIS) return spansX[childIndex]; else return spansY[childIndex]; }
protected int getSpan(int axis, int childIndex) { if (axis == X_AXIS) return spansX[childIndex]; else return spansY[childIndex]; }
24,244
protected void childAllocation(int index, Rectangle a) { if (! isAllocationValid()) layout(a.width, a.height); a.x += offsetsX[index]; a.y += offsetsY[index]; a.width = spansX[index]; a.height = spansY[index]; }
protected void childAllocation(int index, Rectangle a) { if (! isAllocationValid()) layout(a.width, a.height); a.x += offsetsX[index]; a.y += offsetsY[index]; a.width = spansX[index]; a.height = spansY[index]; }
24,245
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
24,249
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
24,250
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
24,251
private Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight(...
private Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight(...
24,252
void reindent(Document doc, Node node, int offset) { if (node.hasChildNodes()) { boolean markupContent = false; boolean textContent = false; List children = new LinkedList(); Node ctx = node.getFirstChild(); while (ctx != null) { switch (ctx.getNodeType(...
void reindent(Document doc, Node node, int offset) { if (node.hasChildNodes()) { boolean markupContent = false; boolean textContent = false; List children = new LinkedList(); Node ctx = node.getFirstChild(); while (ctx != null) { switch (ctx.getNodeType(...
24,253
void reindent(Document doc, Node node, int offset) { if (node.hasChildNodes()) { boolean markupContent = false; boolean textContent = false; List children = new LinkedList(); Node ctx = node.getFirstChild(); while (ctx != null) { switch (ctx.getNodeType(...
void reindent(Document doc, Node node, int offset) { if (node.hasChildNodes()) { boolean markupContent = false; boolean textContent = false; List children = new LinkedList(); Node ctx = node.getFirstChild(); while (ctx != null) { switch (ctx.getNodeType(...
24,254
private static void log(Level level, String msg, Object param, Throwable t) { LogRecord rec; // Return quickly if no log message will be produced. if (!LOGGER.isLoggable(level)) return; rec = new LogRecord(level, msg); if (param != null && param.getClass().isArray()) rec.setParameters((Objec...
static void log(Level level, String msg, Object param, Throwable t) { LogRecord rec; // Return quickly if no log message will be produced. if (!LOGGER.isLoggable(level)) return; rec = new LogRecord(level, msg); if (param != null && param.getClass().isArray()) rec.setParameters((Object[]) par...
24,256
public SimpleAttributeSet() { this(null); }
public SimpleAttributeSet() { tab = new Hashtable(); }
24,257
public boolean containsAttribute(Object name, Object value) { return (tab.containsKey(name) && tab.get(name).equals(value)) || (getResolveParent() != null && getResolveParent(). containsAttribute(name, value)); }
public boolean containsAttribute(Object name, Object value) { return (tab.containsKey(name) && tab.get(name).equals(value)) || (getResolveParent() != null && getResolveParent(). containsAttribute(name, value)); }
24,258
public Object getAttribute(Object name) { Object val = tab.get(name); if (val != null) return val; Object p = getResolveParent(); if (p != null && p instanceof AttributeSet) return (((AttributeSet)p).getAttribute(name)); return null; }
public Object getAttribute(Object name) { Object val = tab.get(name); if (val != null) return val; Object p = getResolveParent(); if (p != null && p instanceof AttributeSet) return (((AttributeSet)p).getAttribute(name)); return null; }
24,259
public void unexportObject(Remote target) throws NoSuchObjectException { synchronized (m_Ties) { synchronized (m_Targets) { TieTargetRecord r = ((TieTargetRecord) m_Targets.get(target)); if (r != null) { if (target instanceof org.omg.CORBA....
public void unexportObject(Remote target) throws NoSuchObjectException { synchronized (m_Ties) { synchronized (m_Targets) { TieTargetRecord r = ((TieTargetRecord) m_Targets.get(target)); if (r != null) { if (target instanceof org.omg.CORBA....
24,260
public void writeAny(OutputStream output, Object object) { Any any = output.orb().create_any(); if (object == null) { generalTypeCode t = new generalTypeCode(TCKind.tk_abstract_interface); t.setId("IDL:omg.org/CORBA/AbstractBase:1.0"); t.setName(""); any.type(t); output....
public void writeAny(OutputStream output, Object object) { Any any = output.orb().create_any(); if (object == null) { GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_abstract_interface); t.setId("IDL:omg.org/CORBA/AbstractBase:1.0"); t.setName(""); any.type(t); output....
24,261
void writeAnyAsRemote(OutputStream output, Object object) { generalTypeCode t = new generalTypeCode(TCKind.tk_objref); t.setId(m_ValueHandler.getRMIRepositoryID(object.getClass())); t.setName(object.getClass().getName()); // Writing Any (typecode, followed by value). output.write_TypeCode(t); write...
void writeAnyAsRemote(OutputStream output, Object object) { GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_objref); t.setId(m_ValueHandler.getRMIRepositoryID(object.getClass())); t.setName(object.getClass().getName()); // Writing Any (typecode, followed by value). output.write_TypeCode(t); write...
24,262
public JTree() { treeModel = createTreeModel(null); }
public JTree() { this(createTreeModel(null)); }
24,263
protected static TreeModel createTreeModel(Object value) { // FIXME: Implement this. return null; }
protected static TreeModel createTreeModel(Object value) { // FIXME: Implement this. return new DefaultTreeModel(new DynamicUtilTreeNode(value, value)); }
24,264
public void setEditable(boolean flag) { if (editable == flag) return; boolean oldValue = editable; editable = flag; firePropertyChange("editable", oldValue, editable); }
public void setEditable(boolean flag) { if (editable == flag) return; boolean oldValue = editable; editable = flag; firePropertyChange(EDITABLE_PROPERTY, oldValue, editable); }
24,267
CompletionInfo complete(String partial) { // workaround to set the currentShell to this shell try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } completion = new CompletionInfo(); String result = null; try { ...
CompletionInfo complete(String partial) { // workaround to set the currentShell to this shell try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } completion = new CompletionInfo(); String result = null; try { ...
24,279
private static final int scanFormat (String pat, int index, StringBuffer buffer, Vector elts, Locale locale) { MessageFormatElement mfe = new MessageFormatElement (); elts.addElement(mfe); int max = pat.length(); // Skip the opening `{'. ++index; // Fetch the argument number. ...
private static final int scanFormat (String pat, int index, StringBuffer buffer, Vector elts, Locale locale) { MessageFormatElement mfe = new MessageFormatElement (); elts.addElement(mfe); int max = pat.length(); // Skip the opening `{'. ++index; // Fetch the argument number. ...
24,280
private static final int scanFormatElement (String pat, int index, StringBuffer buffer, char term) { int max = pat.length(); buffer.setLength(0); int brace_depth = 1; for (; index < max; ++index) { char c = pat.charAt(index); if (c == '\'' && index + 2 < max && pat.charAt(index +...
private static final int scanFormatElement (String pat, int index, StringBuffer buffer, char term) { int max = pat.length(); buffer.setLength(0); int brace_depth = 1; for (; index < max; ++index) { char c = pat.charAt(index); if (c == '\'' && index + 2 < max && pat.charAt(index +...
24,281
private static final int scanString (String pat, int index, StringBuffer buffer) { int max = pat.length(); buffer.setLength(0); for (; index < max; ++index) { char c = pat.charAt(index); if (c == '\'' && index + 2 < max && pat.charAt(index + 2) == '\'') { buffer.append(pat.charAt(index ...
private static final int scanString (String pat, int index, StringBuffer buffer) { int max = pat.length(); buffer.setLength(0); for (; index < max; ++index) { char c = pat.charAt(index); if (c == '\'' && index + 2 < max && pat.charAt(index + 2) == '\'') { buffer.append(pat.charAt(index ...
24,282
public static short reverseBytes(int val) { return (short) (((val >> 8) & 0xff) | ((val << 8) & 0xff00)); }
public static short reverseBytes(short val) { return (short) (((val >> 8) & 0xff) | ((val << 8) & 0xff00)); }
24,283
public BMPDecoder(BMPFileHeader fh, BMPInfoHeader ih){ fileHeader = fh; infoHeader = ih; offset = fh.SIZE + ih.SIZE; }
public BMPDecoder(BMPFileHeader fh, BMPInfoHeader ih){ fileHeader = fh; infoHeader = ih; offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE; }
24,284
public CRLFInputStream(InputStream in) { super(in.markSupported() ? in : new BufferedInputStream(in)); }
public CRLFInputStream(InputStream in) { this.in = in.markSupported() ? in : new BufferedInputStream(in); }
24,285
public static final Action[] augmentList(Action[] list1, Action[] list2) { return null; // TODO }
public static final Action[] augmentList(Action[] list1, Action[] list2) { HashSet actionSet = new HashSet(); for (int i = 0; i < list1.length; ++i) actionSet.add(list1[i]); for (int i = 0; i < list2.length; ++i) actionSet.add(list2[i]); ArrayList list = new ArrayList(actionSet); return (Action[]) list.toArray(n...
24,286
protected final JTextComponent getTextComponent(ActionEvent event) { if (event.getSource() != null && event.getSource() instanceof JTextComponent) return (JTextComponent) event.getSource(); else return getFocusedComponent(); }
protected final JTextComponent getTextComponent(ActionEvent event) { if (event.getSource() != null && event.getSource() instanceof JTextComponent) return (JTextComponent) event.getSource(); else return getFocusedComponent(); }
24,287
protected final JTextComponent getTextComponent(ActionEvent event) { if (event.getSource() != null && event.getSource() instanceof JTextComponent) return (JTextComponent) event.getSource(); else return getFocusedComponent(); }
protected final JTextComponent getTextComponent(ActionEvent event) { if (event.getSource() != null && event.getSource() instanceof JTextComponent) return (JTextComponent) event.getSource(); return getFocusedComponent(); }
24,288
public final void debugStackTrace() { Address f = Unsafe.getCurrentFrame(); Unsafe.debug("Debug stacktrace: "); boolean first = true; int max = 10; while (isValid(f) && (max > 0)) { if (first) { first = false; } else { Unsafe.debug(", "); } final VmMethod method = getMethod(f); final VmType vmClas...
public final void debugStackTrace() { Address f = Unsafe.getCurrentFrame(); Unsafe.debug("Debug stacktrace: "); boolean first = true; int max = 20; while (isValid(f) && (max > 0)) { if (first) { first = false; } else { Unsafe.debug(", "); } final VmMethod method = getMethod(f); final VmType vmClas...
24,291
public static synchronized TypeCode type() { if (typeCode == null) { synchronized (TypeCode.class) { if (typeCode == null) { if (active) { return ORB.init().create_recursive_tc(id()); } ...
public static synchronized TypeCode type() { if (typeCode == null) { synchronized (TypeCode.class) { if (typeCode == null) { if (active) { return ORB.init().create_recursive_tc(id()); } ...
24,293
public static CertPathBuilder getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) ...
public static CertPathBuilder getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException e) ...
24,294
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
24,296
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
24,297
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
24,298
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
24,299
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight(); int x0 =...
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight(); int x0 =...
24,301
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
24,302