bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
public boolean equals(Object o) { if (! (o instanceof BundleKey)) return false; BundleKey key = (BundleKey) o; return hashcode == key.hashcode && baseName.equals(key.baseName) && locale.equals(key.locale) && classLoader.equals(key.classLoader); } | public boolean equals(Object o) { if (! (o instanceof BundleKey)) return false; BundleKey key = (BundleKey) o; return hashcode == key.hashcode && baseName.equals(key.baseName) && locale.equals(key.locale) && classLoader.equals(key.classLoader); } | 23,318 |
void set(String s, Locale l, ClassLoader cl) { baseName = s; locale = l; classLoader = cl; hashcode = baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode(); } | void set(Locale dl, String s, Locale l, ClassLoader cl) { baseName = s; locale = l; classLoader = cl; hashcode = baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode(); } | 23,319 |
void set(String s, Locale l, ClassLoader cl) { baseName = s; locale = l; classLoader = cl; hashcode = baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode(); } | void set(String s, Locale l, ClassLoader cl) { baseName = s; locale = l; classLoader = cl; hashcode = baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode(); } | 23,320 |
protected AccessibleCellRendererPane(CellRendererPane component) { super(); // TODO } // AccessibleCellRendererPane() | protected AccessibleCellRendererPane(CellRendererPane component) { super(); // TODO } // AccessibleCellRendererPane() | 23,321 |
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleCellRendererPane(this); } // if return accessibleContext; } // getAccessibleContext() | public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleCellRendererPane(this); } // if return accessibleContext; } // getAccessibleContext() | 23,322 |
Iterator iterator(final int type) { return new Iterator() { /** The current Entry. */ LinkedHashEntry current = root; /** The previous Entry returned by next(). */ LinkedHashEntry last; /** The number of known modifications to the backing Map. */ int knownMod = modCount; /** ... | Iterator iterator(final int type) { return new Iterator() { /** The current Entry. */ LinkedHashEntry current = root; /** The previous Entry returned by next(). */ LinkedHashEntry last; /** The number of known modifications to the backing Map. */ int knownMod = modCount; /** ... | 23,323 |
Iterator iterator(final int type) { return new Iterator() { /** The current Entry. */ LinkedHashEntry current = root; /** The previous Entry returned by next(). */ LinkedHashEntry last; /** The number of known modifications to the backing Map. */ int knownMod = modCount; /** ... | Iterator iterator(final int type) { return new Iterator() { /** The current Entry. */ LinkedHashEntry current = root; /** The previous Entry returned by next(). */ LinkedHashEntry last; /** The number of known modifications to the backing Map. */ int knownMod = modCount; /** ... | 23,324 |
public boolean hasNext() { if (knownMod != modCount) throw new ConcurrentModificationException(); return current != null; } | public boolean hasNext() { if (knownMod != modCount) throw new ConcurrentModificationException(); return current != null; } | 23,325 |
public DataBufferByte(int size) { super(TYPE_BYTE, size); data = new byte[size]; } | public DataBufferByte(int size) { super(TYPE_BYTE, size, 1, 0); bankData = new byte[1][]; data = new byte[size]; } | 23,326 |
public void insertString(int offset, String text, AttributeSet attributes) throws BadLocationException { // Just return when no text to insert was given. if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), Documen... | public void insertString(int offset, String text, AttributeSet attributes) throws BadLocationException { // Just return when no text to insert was given. if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), Documen... | 23,328 |
public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ... | public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ... | 23,330 |
public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ... | public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ... | 23,331 |
public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ... | public void remove(int offset, int length) throws BadLocationException { DefaultDocumentEvent event = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.REMOVE); removeUpdate(event); boolean shouldFire = content.getString(offset, length).length() != 0; writeLock(); ... | 23,332 |
private DHPrivateKey decodeDHPrivateKey(DHPrivateKeySpec spec) throws InvalidKeySpecException { BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger x = spec.getX(); Object[] params = new Object[] {new Integer(Registry.PKCS8_ENCODING_ID), null, p, g, ... | private DHPrivateKey decodeDHPrivateKey(DHPrivateKeySpec spec) throws InvalidKeySpecException { BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger x = spec.getX(); Object[] params = new Object[] {Integer.valueOf(Registry.PKCS8_ENCODING_ID), null, p,... | 23,334 |
private DHPublicKey decodeDHPublicKey(DHPublicKeySpec spec) throws InvalidKeySpecException { BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger y = spec.getY(); Object[] params = new Object[] {new Integer(Registry.X509_ENCODING_ID), null, p, g, y}; ... | private DHPublicKey decodeDHPublicKey(DHPublicKeySpec spec) throws InvalidKeySpecException { BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger y = spec.getY(); Object[] params = new Object[] {Integer.valueOf(Registry.X509_ENCODING_ID), null, p, g, ... | 23,335 |
private static Class getConcreteClass(String className) throws InvalidKeySpecException { try { Class result = Class.forName(className); return result; } catch (ClassNotFoundException x) { InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); ... | private static Class getConcreteClass(String className) throws InvalidKeySpecException { try { Class result = Class.forName(className); return result; } catch (ClassNotFoundException x) { InvalidKeySpecException y = new InvalidKeySpecException(); y.initCause(x); ... | 23,338 |
private static Constructor getConcreteCtor(Class clazz) throws InvalidKeySpecException { try { Constructor result = clazz.getConstructor(new Class[] {int.class, BigInteger.class, ... | private static Constructor getConcreteCtor(Class clazz) throws InvalidKeySpecException { try { Constructor result = clazz.getConstructor(new Class[] {int.class, BigInteger.class, ... | 23,339 |
private static Method getValueOfMethod(Class clazz) throws InvalidKeySpecException { try { Method result = clazz.getMethod("valueOf", new Class[] {byte[].class}); return result; } catch (NoSuchMethodException x) { InvalidKeySpecException y = new InvalidKeySpecException(... | private static Method getValueOfMethod(Class clazz) throws InvalidKeySpecException { try { Method result = clazz.getMethod("valueOf", new Class[] {byte[].class}); return result; } catch (NoSuchMethodException x) { InvalidKeySpecException y = new InvalidKeySpecException(... | 23,340 |
private static Object invokeConstructor(String className, Object[] params) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Constructor ctor = getConcreteCtor(clazz); Object result = ctor.newInstance(params); return result; } catch (Instan... | private static Object invokeConstructor(String className, Object[] params) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Constructor ctor = getConcreteCtor(clazz); Object result = ctor.newInstance(params); return result; } catch (Instan... | 23,341 |
private static Object invokeConstructor(String className, Object[] params) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Constructor ctor = getConcreteCtor(clazz); Object result = ctor.newInstance(params); return result; } catch (Instan... | private static Object invokeConstructor(String className, Object[] params) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Constructor ctor = getConcreteCtor(clazz); Object result = ctor.newInstance(params); return result; } catch (Instan... | 23,342 |
private static Object invokeValueOf(String className, byte[] encoded) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Method valueOf = getValueOfMethod(clazz); Object result = valueOf.invoke(null, new Object[] { encoded }); return result; } ... | private static Object invokeValueOf(String className, byte[] encoded) throws InvalidKeySpecException { Class clazz = getConcreteClass(className); try { Method valueOf = getValueOfMethod(clazz); Object result = valueOf.invoke(null, new Object[] { encoded }); return result; } ... | 23,343 |
public void setElem(int i, int val) { data[i + offset] = val; } | public void setElem(int i, int val) { data[i + offset] = val; } | 23,344 |
public float[] fromCIEXYZ(float[] in) { return null; } | public float[] fromCIEXYZ(float[] in) { throw new UnsupportedOperationException(); } | 23,345 |
public float[] fromRGB(float[] in) { return null; } | public float[] fromRGB(float[] in) { throw new UnsupportedOperationException(); } | 23,346 |
public float[] toCIEXYZ(float[] in) { return null; } | public float[] toCIEXYZ(float[] in) { throw new UnsupportedOperationException(); } | 23,347 |
public float[] toRGB(float[] in) { return null; } | public float[] toRGB(float[] in) { throw new UnsupportedOperationException(); } | 23,348 |
public DropTargetDropEvent (DropTargetContext dtc, Point location, int dropAction, int srcActions) { super (dtc); this.dropAction = dropAction; this.srcActions = srcActions; this.location = location; this.isLocal = false; } | public DropTargetDropEvent (DropTargetContext dtc, Point location, int dropAction, int actions) { super (dtc); this.dropAction = dropAction; this.srcActions = srcActions; this.location = location; this.isLocal = false; } | 23,349 |
public DropTargetDropEvent (DropTargetContext dtc, Point location, int dropAction, int srcActions) { super (dtc); this.dropAction = dropAction; this.srcActions = srcActions; this.location = location; this.isLocal = false; } | public DropTargetDropEvent (DropTargetContext dtc, Point location, int dropAction, int srcActions) { super (dtc); this.dropAction = dropAction; this.srcActions = srcActions; this.location = location; this.isLocal = false; } | 23,350 |
public int getDropAction () { // FIXME: implement this return 0; } | public int getDropAction () { // FIXME: implement this return dropAction; } | 23,352 |
public int getSourceActions () { // FIXME: implement this return 0; } | public int getSourceActions () { // FIXME: implement this return actions; } | 23,353 |
public Transferable getTransferable () { // FIXME: implement this return null; } | public Transferable getTransferable () { // FIXME: implement this return context.getTransferable (); } | 23,354 |
public boolean isDataFlavorSupported (DataFlavor flavor) { // FIXME: implement this return false; } | public boolean isDataFlavorSupported (DataFlavor flavor) { // FIXME: implement this return context.isDataFlavorSupported (flavor); } | 23,355 |
public boolean isLocalTransfer() { return isLocal; } | public boolean isLocalTransfer() { return isLocalTx; } | 23,356 |
public final String getCAName() { if (caName != null) return caName.toRFC2253(); return null; } | public final String getCAName() { if (caName != null) return caName.toString(); return null; } | 23,361 |
public String toString() { if (trustedCert == null) return "[ Trusted CA Public Key=" + caKey + ", Trusted CA Issuer Name=" + caName.toRFC2253() + " ]"; return "[ Trusted CA Certificate=" + trustedCert + " ]"; } | public String toString() { if (trustedCert == null) return "[ Trusted CA Public Key=" + caKey + ", Trusted CA Issuer Name=" + caName.toString() + " ]"; return "[ Trusted CA Certificate=" + trustedCert + " ]"; } | 23,362 |
private void distributeSpill(TableColumn[] cols, int spill) { int average = spill / cols.length; for (int i = 0; i < cols.length; i++) { if (cols[i] != null) cols[i].setWidth(cols[i].getWidth() + average); } } | private void distributeSpill(TableColumn[] cols, int spill) { int average = spill / cols.length; for (int i = 0; i < cols.length; i++) { if (cols[i] != null) cols[i].setWidth(cols[i].getPreferredWidth() + average); } } | 23,366 |
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) { TableColumn col ... | 23,367 |
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | 23,368 |
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | 23,369 |
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | 23,370 |
public TableCellEditor getCellEditor(int row, int column) { TableCellEditor editor = columnModel.getColumn(column).getCellEditor(); if (editor == null) editor = getDefaultEditor(dataModel.getColumnClass(column)); return editor; } | public TableCellEditor getCellEditor(int row, int column) { TableCellEditor editor = columnModel.getColumn(column).getCellEditor(); if (editor == null) { int mcolumn = convertColumnIndexToModel(column); editor = getDefaultEditor(dataModel.getColumnClass(mcolumn)); } return editor; } | 23,372 |
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.... | public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.... | 23,373 |
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.... | public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.... | 23,374 |
public TableCellRenderer getCellRenderer(int row, int column) { TableCellRenderer renderer = columnModel.getColumn(column).getCellRenderer(); if (renderer == null) renderer = getDefaultRenderer(getColumnClass(column)); return renderer; } | public TableCellRenderer getCellRenderer(int row, int column) { TableCellRenderer renderer = columnModel.getColumn(column).getCellRenderer(); if (renderer == null) { int mcolumn = convertColumnIndexToModel(column); renderer = getDefaultRenderer(dataModel.getColumnClass(mcolumn)); } return rend... | 23,375 |
public Class getColumnClass(int column) { return getModel().getColumnClass(column); } | public Class getColumnClass(int column) { return getModel().getColumnClass(convertColumnIndexToModel(column)); } | 23,376 |
private void moveToCellBeingEdited(Component component) { Rectangle r = getCellRect(editingRow, editingColumn, true); // Place the text field so that it would not touch the table // border. int m = getRowMargin(); r.translate(m,m); r.width-=m; component.setBounds(r); } | private void moveToCellBeingEdited(Component component) { Rectangle r = getCellRect(editingRow, editingColumn, true); // Place the text field so that it would not touch the table // border. int m = getRowMargin(); r.translate(m,m); r.width-=m; component.setBounds(r); } | 23,377 |
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight() + getRowMargin(); int y = point.y; int r = y / height; if (r < 0 || r > nrows) return -1; else return r; } else return -1; } | public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight() + getRowMargin(); int y = point.y; int r = y / height; if (r < 0 || r >= nrows) return -1; else return r; } else return -1; ... | 23,378 |
public void setColumnModel(TableColumnModel c) { if (c == null) throw new IllegalArgumentException(); TableColumnModel tmp = columnModel; if (tmp != null) tmp.removeColumnModelListener(this); if (c != null) c.addColumnModelListener(this); columnModel = c; if (dataModel != null && col... | public void setColumnModel(TableColumnModel c) { if (c == null) throw new IllegalArgumentException(); TableColumnModel tmp = columnModel; if (tmp != null) tmp.removeColumnModelListener(this); if (c != null) c.addColumnModelListener(this); columnModel = c; if (dataModel != null && col... | 23,379 |
public void setEditingRow(int column) { editingRow = column; } | public void setEditingRow(int row) { editingRow = column; } | 23,380 |
public void setEditingRow(int column) { editingRow = column; } | public void setEditingRow(int column) { editingRow = row; } | 23,381 |
protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target); | createCheckboxMenuItem(CheckboxMenuItem target); | 23,382 |
protected LightweightPeer createComponent(Component target) { return null; } | protected LightweightPeer createComponent(Component target) { return null; } | 23,383 |
public DragGestureRecognizer createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) { return null; } | createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l) { return null; } | 23,384 |
public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent e); | createDragSourceContextPeer(DragGestureEvent e); | 23,385 |
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; //final String toolkit_name = (String)AccessController.doPrivileged(new GetPropertyAction("awt.toolkit", default_toolkit_name)); final String toolkit_name = "org.jnode.awt.peer.JNodeToolkit"; //final String toolkit_name ... | public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; //final String toolkit_name = (String)AccessController.doPrivileged(new GetPropertyAction("awt.toolkit", default_toolkit_name)); final String toolkit_name = "org.jnode.awt.peer.JNodeToolkit"; //final String toolkit_name ... | 23,386 |
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; //final String toolkit_name = (String)AccessController.doPrivileged(new GetPropertyAction("awt.toolkit", default_toolkit_name)); final String toolkit_name = "org.jnode.awt.peer.JNodeToolkit"; //final String toolkit_name ... | public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; //final String toolkit_name = (String)AccessController.doPrivileged(new GetPropertyAction("awt.toolkit", default_toolkit_name)); final String toolkit_name = "org.jnode.awt.peer.JNodeToolkit"; //final String toolkit_name ... | 23,387 |
public final EventQueue getSystemEventQueue() { return getSystemEventQueueImpl(); } | public final EventQueue getSystemEventQueue() { SecurityManager sm; sm = System.getSecurityManager(); if (sm != null) sm.checkAwtEventQueueAccess(); return getSystemEventQueueImpl(); } | 23,388 |
protected void loadSystemColors(int systemColors[]) { // XXX Implement. } | protected void loadSystemColors(int systemColors[]) { systemColors[SystemColor.DESKTOP] = 0xFF005C5C; systemColors[SystemColor.ACTIVE_CAPTION] = 0xFF000080; systemColors[SystemColor.ACTIVE_CAPTION_TEXT] = 0xFFFFFFFF; systemColors[SystemColor.ACTIVE_CAPTION_BORDER] = 0xFFC0C0C0; systemCol... | 23,389 |
public Enumeration children(); | Enumeration children(); | 23,390 |
public abstract boolean getAllowsChildren(); | boolean getAllowsChildren(); | 23,391 |
public TreeNode getChildAt(int index); | TreeNode getChildAt(int index); | 23,392 |
public int getChildCount(); | int getChildCount(); | 23,393 |
public int getIndex(TreeNode node); | int getIndex(TreeNode node); | 23,394 |
public TreeNode getParent(); | TreeNode getParent(); | 23,395 |
public boolean isLeaf(); | boolean isLeaf(); | 23,396 |
protected int elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag) { // FIXME: Not implemented. return -1; } | protected int elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag) { // FIXME: Not implemented. Element root = doc.getDefaultRootElement(); int num = -1; Element next = root.getElement(root.getElementIndex(offset)); while (!next.isLeaf()) { num++; ... | 23,397 |
protected Element findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag) { // FIXME: Not implemented. return null; } | protected Element findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag) { // FIXME: Not implemented. Element element = doc.getDefaultRootElement(); Element tagElement = null; while (element != null) { Object otag = element.getAttribute... | 23,398 |
protected Element[] getElementsAt(HTMLDocument doc, int offset) { // More efficent than using a Vector Element[] roots = doc.getRootElements(); int size = 0; int rootSize = roots.length; // Get total size for (int i = 0;... | protected Element[] getElementsAt(HTMLDocument doc, int offset) { // More efficent than using a Vector Element[] roots = doc.getRootElements(); int size = 0; int rootSize = roots.length; // Get total size for (int i = 0;... | 23,399 |
protected HTMLDocument getHTMLDocument(JEditorPane e) { return (HTMLDocument) e.getDocument(); } | protected HTMLDocument getHTMLDocument(JEditorPane e) { Document d = e.getDocument(); if (d instanceof HTMLDocument) return (HTMLDocument) d; throw new IllegalArgumentException("Document is not a HTMLDocument."); } | 23,400 |
protected HTMLEditorKit getHTMLEditorKit(JEditorPane e) { return (HTMLEditorKit) e.getEditorKit(); } | protected HTMLEditorKit getHTMLEditorKit(JEditorPane e) { EditorKit d = e.getEditorKit(); if (d instanceof HTMLEditorKit) return (HTMLEditorKit) d; throw new IllegalArgumentException("EditorKit is not a HTMLEditorKit."); } | 23,401 |
protected void insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) { try { super.getHTMLEditorKit(editor).insertHTML(doc, of... | protected void insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) { try { super.getHTMLEditorKit(editor).insertHTML(doc, of... | 23,403 |
protected void insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) { try { super.getHTMLEditorKit(editor).insertHTML(doc, of... | protected void insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) { try { super.getHTMLEditorKit(editor).insertHTML(doc, of... | 23,404 |
protected void createInputAttributes(Element element, MutableAttributeSet set) { // FIXME: Not implemented. super.createInputAttributes(element, set); } | protected void createInputAttributes(Element element, MutableAttributeSet set) { // FIXME: Not implemented. set.addAttributes(element.getAttributes()); } | 23,407 |
public Action[] getActions() { // FIXME: should return different actions? return super.getActions(); } | public Action[] getActions() { // FIXME: should return different actions? return TextAction.augmentList(super.getActions(), defaultActions); } | 23,409 |
public String getContentType() { return "text/html"; } | public String getContentType() { return contentType; } | 23,410 |
public MutableAttributeSet getInputAttributes() { // FIXME: Anything else to do here? return super.getInputAttributes(); } | public MutableAttributeSet getInputAttributes() { // FIXME: Anything else to do here? return inputAttributes; } | 23,411 |
protected Parser getParser() { return new ParserDelegator(); } | protected Parser getParser() { if (parser == null) parser = new ParserDelegator(); return parser; } | 23,412 |
public Dimension getMinimumSize(JComponent c) { Dimension d = getDisplaySize(); int arrowButtonWidth = d.height; Dimension result = new Dimension(d.width + arrowButtonWidth, d.height); return result; } | public Dimension getMinimumSize(JComponent c) { Dimension d = getDisplaySize(); int arrowButtonWidth = d.height; Dimension result = new Dimension(d.width + arrowButtonWidth, d.height); return result; } | 23,424 |
public static Binding[] extract(Any a) { try { return ((BindingListHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION("Binding list expected"); } } | public static Binding[] extract(Any a) { try { return ((BindingListHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION("Binding list expected"); bad.initCause(ex); throw bad; } } | 23,426 |
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); DerUtil.checkIsConstructed(derPKI, "... | public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); DerUtil.checkIsConstructed(derPKI, "... | 23,427 |
public byte[] encodePrivateKey(PrivateKey key) { if (! (key instanceof DSSPrivateKey)) throw new InvalidParameterException("Wrong key type"); DERValue derVersion = new DERValue(DER.INTEGER, BigInteger.ZERO); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPrivateKey pk = (DSSP... | public byte[] encodePrivateKey(PrivateKey key) { if (! (key instanceof DSSPrivateKey)) throw new InvalidParameterException("Wrong key type"); DERValue derVersion = new DERValue(DER.INTEGER, BigInteger.ZERO); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPrivateKey pk = (DSSP... | 23,429 |
public DragSourceDropEvent (DragSourceContext context) { super (context); this.dropAction = 0; this.success = false; } | public DragSourceDropEvent (DragSourceContext context) { super (context); this.dropAction = 0; this.dropSuccess = false; } | 23,432 |
public boolean getDropSuccess() { return success; } | public boolean getDropSuccess() { return dropSuccess; } | 23,433 |
public final Class getCategory() { return JobKOctetsSupported.class; } | public Class getCategory() { return JobKOctetsSupported.class; } | 23,435 |
public final String getName() { return "job-k-octets-supported"; } | public String getName() { return "job-k-octets-supported"; } | 23,436 |
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, X.509 Certificates"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Sig... | public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provi... | 23,437 |
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, X.509 Certificates"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Sig... | public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, X.509 Certificates"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Sig... | 23,438 |
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, X.509 Certificates"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Sig... | public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, X.509 Certificates"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Sig... | 23,439 |
public JComboBox(ComboBoxModel model) { setEditable(false); setEnabled(true); setMaximumRowCount(DEFAULT_MAXIMUM_ROW_COUNT); setModel(model); setActionCommand("comboBoxChanged"); // by default set selected item to the first element in the combo box if (getItemCount() != 0) setSelectedIt... | public JComboBox(ComboBoxModel model) { setEditable(false); setEnabled(true); setMaximumRowCount(DEFAULT_MAXIMUM_ROW_COUNT); setModel(model); setActionCommand("comboBoxChanged"); // by default set selected item to the first element in the combo box if (getItemCount() != 0) setSelectedIt... | 23,440 |
public Object getItemAt(int index) { return ((MutableComboBoxModel) dataModel).getElementAt(index); } | public Object getItemAt(int index) { return dataModel.getElementAt(index); } | 23,442 |
public int getItemCount() { return ((DefaultComboBoxModel) dataModel).getSize(); } | public int getItemCount() { return dataModel.getSize(); } | 23,443 |
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null && (dataModel instanceof DefaultComboBoxModel)) return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); return -1; } | public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); return -1; } | 23,444 |
public Object getSelectedItem() { Object item = dataModel.getSelectedItem(); if (item == null && getItemCount() != 0) item = getItemAt(0); return item; } | public Object getSelectedItem() { Object item = dataModel.getSelectedItem(); if (item == null && getItemCount() != 0) item = getItemAt(0); return item; } | 23,445 |
public Object[] getSelectedObjects() { Object selectedObject = getSelectedItem(); return new Object[] { selectedObject }; } | public Object[] getSelectedObjects() { Object selectedObject = getSelectedItem(); return new Object[] { selectedObject }; } | 23,446 |
public void removeAllItems() { if (dataModel instanceof DefaultComboBoxModel) ((DefaultComboBoxModel) dataModel).removeAllElements(); } | public void removeAllItems() { if (dataModel instanceof DefaultComboBoxModel) { ((DefaultComboBoxModel) dataModel).removeAllElements(); } | 23,448 |
public void setEditable(boolean editable) { if (this.isEditable != editable) { this.isEditable = editable; firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable); } } | public void setEditable(boolean editable) { if (isEditable != editable) { this.isEditable = editable; firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable); } } | 23,452 |
public void setEditable(boolean editable) { if (this.isEditable != editable) { this.isEditable = editable; firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable); } } | public void setEditable(boolean editable) { if (this.isEditable != editable) { isEditable = editable; firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable); } } | 23,453 |
public void setLightWeightPopupEnabled(boolean enabled) { this.lightWeightPopupEnabled = enabled; } | public void setLightWeightPopupEnabled(boolean enabled) { lightWeightPopupEnabled = enabled; } | 23,454 |
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = this.maximumRowCount; this.maximumRowCount = rowCount; firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY, oldMaximumRowCount, this.maximumRowCount); } } | public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = this.maximumRowCount; this.maximumRowCount = rowCount; firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY, oldMaximumRowCount, this.maximumRowCount); } } | 23,455 |
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = this.maximumRowCount; this.maximumRowCount = rowCount; firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY, oldMaximumRowCount, this.maximumRowCount); } } | public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = this.maximumRowCount; this.maximumRowCount = rowCount; firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY, oldMaximumRowCount, maximumRowCount); } } | 23,456 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.