bugged stringlengths 6 599k | fixed stringlengths 6 40.8M | __index_level_0__ int64 0 3.24M |
|---|---|---|
protected void fireInsertUpdate(DocumentEvent e) { } | protected void fireInsertUpdate(DocumentEvent event) { } | 38,667 |
protected void fireRemoveUpdate(DocumentEvent e) { } | protected void fireRemoveUpdate(DocumentEvent event) { } | 38,669 |
protected void fireUndoableEditUpdate(UndoableEditEvent e) { } | protected void fireUndoableEditUpdate(UndoableEditEvent event) { } | 38,671 |
int getAsynchronousLoadPriority() { return 0; } | public int getAsynchronousLoadPriority() { return 0; } | 38,673 |
Element getBidiRootElement() { return null; } | public Element getBidiRootElement() { return null; } | 38,674 |
public abstract Element getDefaultRootElement(); | public abstract Element getDefaultRootElement(); | 38,675 |
public EventListener[] getListeners(Class listenerType) { return null; } | public EventListener[] getListeners(Class listenerType) { return listenerList.getListeners(listenerType); } | 38,676 |
public abstract Element getParagraphElement(int pos); | public abstract Element getParagraphElement(int pos); | 38,677 |
public String getText(int offset, int length) { try { return content.getString(offset, length); } catch (Exception e) { System.out.println("Hmmm, fail to getText: " + offset + " -> " + length); return null; } } | public String getText(int offset, int length) { try { return content.getString(offset, length); } catch (Exception e) { System.out.println("Hmmm, fail to getText: " + offset + " -> " + length); return null; } } | 38,678 |
public String getText(int offset, int length) { try { return content.getString(offset, length); } catch (Exception e) { System.out.println("Hmmm, fail to getText: " + offset + " -> " + length); return null; } } | public String getText(int offset, int length) { try { return content.getString(offset, length); } catch (Exception e) { System.out.println("Hmmm, fail to getText: " + offset + " -> " + length); return null; } } | 38,679 |
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); } } | 38,680 |
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); } } | 38,681 |
public void removeUndoableEditListener(UndoableEditListener listener) { } | public void removeUndoableEditListener(UndoableEditListener listener) { } | 38,683 |
void setAsynchronousLoadPriority(int p) { } | public void setAsynchronousLoadPriority(int p) { } | 38,684 |
void setDocumentProperties(Dictionary x) { } | public void setDocumentProperties(Dictionary x) { } | 38,685 |
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; } | 38,688 |
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.... | 38,689 |
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... | 38,690 |
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... | 38,691 |
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, ... | 38,692 |
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... | 38,693 |
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... | 38,694 |
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 ou... | 38,695 |
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.setS... | 38,696 |
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 do... | 38,699 |
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 ... | 38,700 |
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 do... | 38,701 |
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 ... | 38,702 |
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 ... | 38,703 |
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); } | 38,704 |
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); ... | 38,705 |
Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.GENKEY_CMD, true); result.setHeader(Messages.getString("GenKeyCmd.57")); //$NON-NLS-1$ result.setFooter(Messages.getString("GenKeyCmd.58")); //$NON-NLS-1$ OptionGroup o... | ParsergetParser(){log.entering(this.getClass().getName(),"getParser");//$NON-NLS-1$Parserresult=newClasspathToolParser(Main.GENKEY_CMD,true);result.setHeader(Messages.getString("GenKeyCmd.57"));//$NON-NLS-1$result.setFooter(Messages.getString("GenKeyCmd.58"));//$NON-NLS-1$OptionGroupoptions=newOptionGroup(Messages.getS... | 38,709 |
Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.GENKEY_CMD, true); result.setHeader(Messages.getString("GenKeyCmd.57")); //$NON-NLS-1$ result.setFooter(Messages.getString("GenKeyCmd.58")); //$NON-NLS-1$ OptionGroup o... | if (Configuration.DEBUG) if (Configuration.DEBUG) Parserif (Configuration.DEBUG) getParser()if (Configuration.DEBUG) if (Configuration.DEBUG) {if (Configuration.DEBUG) if (Configuration.DEBUG) if (Configuration.DEBUG) if (Configuration.DEBUG) log.entering(this.getClass().getName(),if (Configuration.DEBUG) "getParser");... | 38,710 |
private void setDName(String name) throws IOException, UnsupportedCallbackException { if (name != null && name.trim().length() > 0) name = name.trim(); else { // prompt user to provide one String dnTxt = Messages.getString("GenKeyCmd.0"); //$NON-NLS-1$ String oDefault = Mes... | if (Configuration.DEBUG) if (Configuration.DEBUG) privateif (Configuration.DEBUG) voidif (Configuration.DEBUG) setDName(Stringif (Configuration.DEBUG) name)if (Configuration.DEBUG) throwsif (Configuration.DEBUG) IOException,if (Configuration.DEBUG) if (Configuration.DEBUG) if (Configuration.DEBUG) if (Configuration.DEB... | 38,711 |
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... | 38,712 |
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("-... | 38,713 |
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... | log.fine("About to generate key-pair..."); } log.fine("About to generate key-pair..."); } voidlog.fine("About to generate key-pair..."); } start()log.fine("About to generate key-pair..."); } throwslog.fine("About to generate key-pair..."); } CertificateException,log.fine("About to generate key-pair..."); } KeyStoreExce... | 38,714 |
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); KeyP... | 38,715 |
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... | 38,716 |
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... | 38,717 |
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... | 38,718 |
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... | 38,719 |
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... | if (Configuration.DEBUG) if (Configuration.DEBUG) voidif (Configuration.DEBUG) start()if (Configuration.DEBUG) throwsif (Configuration.DEBUG) CertificateException,if (Configuration.DEBUG) KeyStoreException,if (Configuration.DEBUG) if (Configuration.DEBUG) if (Configuration.DEBUG) if (Configuration.DEBUG) if (Configurat... | 38,720 |
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(); ... | 38,721 |
public KeyboardFocusManager() { } | public KeyboardFocusManager () { } | 38,724 |
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); } | 38,725 |
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 focusCycleRoot; } | 38,726 |
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); } | 38,727 |
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, true); } | 38,728 |
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 =... | 38,729 |
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... | 38,730 |
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... | 38,731 |
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... | 38,732 |
public String toString() { return (addr == null ? hostname : addr.getHostName()) + ":" + port; } | public String toString() { return (addr == null ? hostname : addr.toString()) + ":" + port; } | 38,733 |
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"); } } | 38,734 |
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... | 38,735 |
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]; } | 38,736 |
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]; } | 38,737 |
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... | 38,741 |
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... | 38,742 |
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... | 38,743 |
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(... | 38,744 |
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(... | 38,745 |
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(... | 38,746 |
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... | 38,748 |
public SimpleAttributeSet() { this(null); } | public SimpleAttributeSet() { tab = new Hashtable(); } | 38,749 |
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)); } | 38,750 |
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; } | 38,751 |
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.... | 38,752 |
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.... | 38,753 |
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... | 38,754 |
public JTree() { treeModel = createTreeModel(null); } | public JTree() { this(createTreeModel(null)); } | 38,755 |
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)); } | 38,756 |
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); } | 38,759 |
protected EnumSyntax[] getEnumValueTable() { // FIXME return (EnumSyntax[])null; } | protected EnumSyntax[] getEnumValueTable() { // FIXME return enumValueTable; } | 38,771 |
protected String[] getStringTable() { // FIXME return (String[])null; } | protected String[] getStringTable() { // FIXME return stringTable; } | 38,772 |
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 { ... | 38,773 |
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. ... | 38,774 |
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 +... | 38,775 |
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 ... | 38,776 |
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)); } | 38,777 |
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; } | 38,778 |
public CRLFInputStream(InputStream in) { super(in.markSupported() ? in : new BufferedInputStream(in)); } | public CRLFInputStream(InputStream in) { this.in = in.markSupported() ? in : new BufferedInputStream(in); } | 38,779 |
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... | 38,780 |
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(); } | 38,781 |
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(); } | 38,782 |
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 = 10; while (isValid(f) && (max > 0)) { if (first) { first = false; } else { Unsafe.debug(", "); } final VmMethod method = getMethod(f); final VmType vmClas... | 38,785 |
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()); } ... | 38,787 |
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) ... | 38,788 |
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... | 38,791 |
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... | 38,792 |
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... | 38,793 |
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... | 38,794 |
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... | 38,795 |
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... | 38,796 |
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... | 38,797 |
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... | 38,798 |
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... | 38,799 |
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... | 38,800 |
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 =... | 38,802 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.