bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 22,097 |
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 22,098 |
public ElementChange getChange(Element elem) { return (ElementChange) changes.get(elem); } | public DocumentEvent.ElementChange getChange(Element elem) { return (ElementChange) changes.get(elem); } | 22,099 |
public ElementChange getChange(Element elem) { return (ElementChange) changes.get(elem); } | public ElementChange getChange(Element elem) { return (DocumentEvent.ElementChange) changes.get(elem); } | 22,100 |
private void emitMethod(int i, Class[] e) { // First, we precalculate the method length and other information. Method m = methods[i]; Class[] paramtypes = m.getParameterTypes(); int wrap_overhead = 0; // max words taken by wrapped primitive int param_count = 1; //... | private void emitMethod(int i, Class[] e) { // First, we precalculate the method length and other information. Method m = methods[i]; Class[] paramtypes = m.getParameterTypes(); int wrap_overhead = 0; // max words taken by wrapped primitive int param_count = 1; //... | 22,101 |
private void emitMethod(int i, Class[] e) { // First, we precalculate the method length and other information. Method m = methods[i]; Class[] paramtypes = m.getParameterTypes(); int wrap_overhead = 0; // max words taken by wrapped primitive int param_count = 1; //... | private void emitMethod(int i, Class[] e) { // First, we precalculate the method length and other information. Method m = methods[i]; Class[] paramtypes = m.getParameterTypes(); int wrap_overhead = 0; // max words taken by wrapped primitive int param_count = 1; //... | 22,102 |
private void emitMethod(int i, Class[] e) { // First, we precalculate the method length and other information. Method m = methods[i]; Class[] paramtypes = m.getParameterTypes(); int wrap_overhead = 0; // max words taken by wrapped primitive int param_count = 1; //... | private void emitMethod(int i, Class[] e) { // First, we precalculate the method length and other information. Method m = methods[i]; Class[] paramtypes = m.getParameterTypes(); int wrap_overhead = 0; // max words taken by wrapped primitive int param_count = 1; //... | 22,103 |
static ProxyData getProxyData(ProxyType pt) { Map method_set = (Map) ProxySignature.coreMethods.clone(); boolean in_package = false; // true if we encounter non-public interface ProxyData data = new ProxyData(); data.interfaces = pt.interfaces; // if interfaces is... | static ProxyData getProxyData(ProxyType pt) { Map method_set = (Map) ProxySignature.coreMethods.clone(); boolean in_package = false; // true if we encounter non-public interface ProxyData data = new ProxyData(); data.interfaces = pt.interfaces; // if interfaces is... | 22,104 |
private static boolean isCoreObjectMethod(Method method) { String methodName = method.getName(); if (methodName.equals("equals")) { return Arrays.equals(method.getParameterTypes(), new Class[] { Object.class }); } if (methodName.equals("hashCode... | private static boolean isCoreObjectMethod(Method method) { String methodName = method.getName(); if (methodName.equals("equals")) { return Arrays.equals(method.getParameterTypes(), new Class[] { Object.class }); } if (methodName.equals("hashCode... | 22,105 |
private static boolean isCoreObjectMethod(Method method) { String methodName = method.getName(); if (methodName.equals("equals")) { return Arrays.equals(method.getParameterTypes(), new Class[] { Object.class }); } if (methodName.equals("hashCode... | private static boolean isCoreObjectMethod(Method method) { String methodName = method.getName(); if (methodName.equals("equals")) { return Arrays.equals(method.getParameterTypes(), new Class[] { Object.class }); } if (methodName.equals("hashCode... | 22,106 |
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return fm.getHeight(); String text; Element elem = getElement(); try { text = elem.getDocument().getText(elem.g... | public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument().... | 22,107 |
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return fm.getHeight(); String text; Element elem = getElement(); try { text = elem.getDocument().getText(elem.g... | public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return fm.getHeight(); String text; Element elem = getElement(); try { text = elem.getDocument().getText(elem.g... | 22,108 |
private static ORB createORB(Properties props, String orbClassName) { ORB orb = null; if (orbClassName == null) { orbClassName = getORBName(props, FUNCTIONAL_ORB); if (orbClassName == null) orbClassName = DEFAULT_FUNCTIONAL_ORB; } try { orb = (ORB) ObjectCreator.... | private static ORB createORB(Properties props, String orbClassName) { ORB orb = null; if (orbClassName == null) { orbClassName = getCumulatedProperty(props, FUNCTIONAL_ORB); if (orbClassName == null) orbClassName = DEFAULT_FUNCTIONAL_ORB; } try { orb = (ORB) Obje... | 22,109 |
public TypeCode create_abstract_interface_tc(String id, String name) { generalTypeCode t = new generalTypeCode(TCKind.tk_abstract_interface); t.setName(name); t.setId(id); return t; } | public TypeCode create_abstract_interface_tc(String id, String name) { GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_abstract_interface); t.setName(name); t.setId(id); return t; } | 22,111 |
public TypeCode create_fixed_tc(short digits, short scale) { fixedTypeCode r = new fixedTypeCode(); r.setDigits(digits); r.setScale(scale); return r; } | public TypeCode create_fixed_tc(short digits, short scale) { FixedTypeCode r = new FixedTypeCode(); r.setDigits(digits); r.setScale(scale); return r; } | 22,112 |
public TypeCode create_native_tc(String id, String name) { generalTypeCode t = new generalTypeCode(TCKind.tk_native); t.setName(name); t.setId(id); return t; } | public TypeCode create_native_tc(String id, String name) { GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_native); t.setName(name); t.setId(id); return t; } | 22,113 |
public TypeCode create_recursive_sequence_tc(int bound, int offset) { recordTypeCode r = new recordTypeCode(TCKind.tk_struct); for (int i = 0; i < offset; i++) r.add(new StructMember()); TypeCode recurs = new primitiveTypeCode(TCKind.tk_sequence); r.add(new StructMember("", recurs, null)); return... | public TypeCode create_recursive_sequence_tc(int bound, int offset) { RecordTypeCode r = new RecordTypeCode(TCKind.tk_struct); for (int i = 0; i < offset; i++) r.add(new StructMember()); TypeCode recurs = new primitiveTypeCode(TCKind.tk_sequence); r.add(new StructMember("", recurs, null)); return... | 22,114 |
public TypeCode create_recursive_sequence_tc(int bound, int offset) { recordTypeCode r = new recordTypeCode(TCKind.tk_struct); for (int i = 0; i < offset; i++) r.add(new StructMember()); TypeCode recurs = new primitiveTypeCode(TCKind.tk_sequence); r.add(new StructMember("", recurs, null)); return... | public TypeCode create_recursive_sequence_tc(int bound, int offset) { recordTypeCode r = new recordTypeCode(TCKind.tk_struct); for (int i = 0; i < offset; i++) r.add(new StructMember()); TypeCode recurs = new PrimitiveTypeCode(TCKind.tk_sequence); r.add(new StructMember("", recurs, null)); return... | 22,115 |
public TypeCode create_recursive_tc(String id) { return new recursiveTypeCode(id); } | public TypeCode create_recursive_tc(String id) { return new RecursiveTypeCode(id); } | 22,116 |
public TypeCode create_value_box_tc(String id, String name, TypeCode boxed_type ) { generalTypeCode t = new generalTypeCode(TCKind.tk_value_box); t.setName(name); t.setId(id); t.setContentType(boxed_type); return t; } | public TypeCode create_value_box_tc(String id, String name, TypeCode boxed_type ) { GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_value_box); t.setName(name); t.setId(id); t.setContentType(boxed_type); return t; } | 22,117 |
public TypeCode create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members ) { recordTypeCode r = new recordTypeCode(TCKind.tk_value); r.setId(id); r.setName(name); r.setTypeModifier(type_modi... | public TypeCode create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members ) { RecordTypeCode r = new RecordTypeCode(TCKind.tk_value); r.setId(id); r.setName(name); r.setTypeModifier(type_modi... | 22,118 |
public static ORB init() { String orb_cn = getORBName(null, RESTRICTED_ORB); if (orb_cn == null) return Restricted_ORB.Singleton; else return createORB(null, orb_cn); } | public static ORB init() { String orb_cn = getCumulatedProperty(null, RESTRICTED_ORB); if (orb_cn == null) return Restricted_ORB.Singleton; else return createORB(null, orb_cn); } | 22,119 |
public static ORB init() { String orb_cn = getORBName(null, RESTRICTED_ORB); if (orb_cn == null) return Restricted_ORB.Singleton; else return createORB(null, orb_cn); } | public static ORB init() { String orb_cn = getORBName(null, RESTRICTED_ORB); if (orb_cn == null) return OrbRestricted.Singleton; else return createORB(null, orb_cn); } | 22,120 |
public void installDefaults(JPanel p) { LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); p.setOpaque(true); } | protected void installDefaults(JPanel p) { LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); p.setOpaque(true); } | 22,121 |
public void installDefaults(JPanel p) { LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); p.setOpaque(true); } | public void installDefaults(JPanel p) { LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); } | 22,122 |
public String paramString() { StringBuffer s = new StringBuffer(id == ACTION_PERFORMED ? "ACTION_PERFORMED,cmd=" : "unknown type,cmd="); s.append(actionCommand).append(",when=").append(when).append("modifiers"); int len = s.length(); ... | public String paramString() { StringBuffer s = new StringBuffer(id == ACTION_PERFORMED ? "ACTION_PERFORMED,cmd=" : "unknown type,cmd="); s.append(actionCommand).append(",when=").append(when).append(",modifiers"); int len = s.length();... | 22,123 |
public CertStoreSpi(CertStoreParameters params) throws java.security.InvalidAlgorithmParameterException { super(); } | public CertStoreSpi(CertStoreParameters params) throws InvalidAlgorithmParameterException { super(); } | 22,124 |
public void setLocation(Point p) { this.x = p.x; this.y = p.y; } | public void setLocation(Point p) { this.x = p.x; this.y = p.y; } | 22,125 |
public void setSize(Dimension d) { width = d.width; height = d.height; } | public void setSize(Dimension d) { width = d.width; height = d.height; } | 22,126 |
public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) { if (this.isAlphaPremultiplied == isAlphaPremultiplied) return this; /* TODO: provide better implementation based on the assumptions we can make due to the specific type of the color model. */ super.coerceData(raster, isAlp... | public final ColorModel coerceData (WritableRaster raster, boolean isAlphaPremultiplied) { if (this.isAlphaPremultiplied == isAlphaPremultiplied) return this; /* TODO: provide better implementation based on the assumptions we can make due to the specific type of the color model. */ super.coerceData(raster... | 22,127 |
public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterEnd not implemente... | public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("inse... | 22,159 |
public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterStart not implem... | public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("in... | 22,160 |
public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeEnd not implemen... | public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("ins... | 22,161 |
public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeStart not impl... | public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("i... | 22,162 |
public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException { if (elem.isLeaf()) throw new IllegalArgumentException("Element is a leaf"); if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use In... | public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (elem.isLeaf()) throw new IllegalArgumentException("Element is a leaf"); if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not ... | 22,163 |
public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("setOuterHTML not implem... | public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println... | 22,164 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static synchronized final int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 22,166 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 22,167 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("document")) { Document oldDoc = (Document) e.getOldValue(); oldDoc.removeDocumentListener(documentListener); Document newDoc = (Document) e.getNewValue(); newDoc.addDocumentListener... | public void propertyChange(PropertyChangeEvent e) { String name = e.getPropertyName(); if (name.equals("document")) { Document oldDoc = (Document) e.getOldValue(); oldDoc.removeDocumentListener(documentListener); Document newDoc = (Document) e.getNewValue(); newDo... | 22,168 |
public void focusLost(FocusEvent event) { if (event.isTemporary() == false) { setVisible(false); // Stop the blinker, if running. if (blinkTimer != null && blinkTimer.isRunning()) blinkTimer.stop(); } } | public void focusLost(FocusEvent event) { if (textComponent.isEditable() && event.isTemporary() == false) { setVisible(false); // Stop the blinker, if running. if (blinkTimer != null && blinkTimer.isRunning()) blinkTimer.stop(); } } | 22,171 |
public boolean isVisible() { return visible; } | public boolean isVisible() { return visible && active; } | 22,173 |
public void paint(Graphics g) { JTextComponent comp = getComponent(); if (comp == null) return; // Make sure the dot has a sane position. dot = Math.min(dot, textComponent.getDocument().getLength()); dot = Math.max(dot, 0); Rectangle rect = null; try { rect = textComponent.modelToView(... | public void paint(Graphics g) { JTextComponent comp = getComponent(); if (comp == null) return; // Make sure the dot has a sane position. dot = Math.min(dot, textComponent.getDocument().getLength()); dot = Math.max(dot, 0); Rectangle rect = null; try { rect = textComponent.modelToView(... | 22,176 |
public Object evaluate(Node context, int pos, int len) { Object left = lhs.evaluate(context, pos, len); Object right = rhs.evaluate(context, pos, len); double ln = _number(context, left); double rn = _number(context, right); switch (op) { case ADD: return new Double(ln + rn); cas... | public Object evaluate(Node context, int pos, int len) { Object left = lhs.evaluate(context, pos, len); Object right = rhs.evaluate(context, pos, len); double ln = _number(context, left); double rn = _number(context, right); switch (op) { case ADD: return new Double(ln + rn); cas... | 22,177 |
public URL getCodeBase() { try { return tag.prependCodeBase(""); } catch (MalformedURLException e) { throw new RuntimeException("unknown codebase"); } } | public URL getCodeBase() { try { return tag.prependCodeBase(""); } catch (MalformedURLException e) { throw new RuntimeException("Attempted to create" + " invalid codebase URL.", e); } } | 22,179 |
public synchronized void replaceSelection(String content) { int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = getSelectionStart(); int end = getSelectionEnd(); // Remove s... | public synchronized void replaceSelection(String content) { int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = getSelectionStart(); int end = getSelectionEnd(); // Remove s... | 22,180 |
private static final void appendTag(StringBuffer buf, int indent, String tag, String content) { int i; if (content == null) return; for (i = 0; i < indent * 2; i++) buf.append(' '); buf.append("<"); buf.append(tag); buf.append('>'); /* Append the content, but escape for XML by r... | private static final void appendTag(StringBuffer buf, int indent, String tag, String content) { int i; if (content == null) return; for (i = 0; i < indent * 2; i++) buf.append(' '); buf.append("<"); buf.append(tag); buf.append('>'); /* Append the content, but escape for XML by r... | 22,181 |
public boolean intersects(Rectangle r) { return width > 0 && height > 0 && r.width > 0 && r.height > 0 && r.x < x + width && r.x + r.width > x && r.y < y + height && r.y + r.height > y; } | public boolean intersects(Rectangle r) { return r.width > 0 && r.height > 0 && width > 0 && height > 0 && r.x < x + width && r.x + r.width > x && r.y < y + height && r.y + r.height > y; } | 22,183 |
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); // When the layoutOrientatio... | public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); // When the layoutOrientatio... | 22,185 |
public void paint(Graphics g, JComponent c) { int nrows = list.getModel().getSize(); if (nrows == 0) return; maybeUpdateLayoutState(); ListCellRenderer render = list.getCellRenderer(); ListModel model = list.getModel(); ListSelectionModel sel = list.getSelectionModel(); int lead = sel.getLe... | public void paint(Graphics g, JComponent c) { int nrows = list.getModel().getSize(); if (nrows == 0) return; maybeUpdateLayoutState(); ListCellRenderer render = list.getCellRenderer(); ListModel model = list.getModel(); ListSelectionModel sel = list.getSelectionModel(); int lead = sel.getLe... | 22,186 |
public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; } | public static TypeCode type() { RecordTypeCode r = new RecordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; } | 22,187 |
public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; } | public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new PrimitiveTypeCode(TCKind.tk_short)); return r; } | 22,188 |
public KeyPair generate() { BigInteger p, q, n, d; // 1. Generate a prime p in the interval [2**(M-1), 2**M - 1], where // M = CEILING(L/2), and such that GCD(p, e) = 1 int M = (L + 1) / 2; BigInteger lower = TWO.pow(M - 1); BigInteger upper = TWO.pow(M).subtract(ONE); byte[] kb = new byte[(M + ... | public KeyPair generate() { BigInteger p, q, n, d; // 1. Generate a prime p in the interval [2**(M-1), 2**M - 1], where // M = CEILING(L/2), and such that GCD(p, e) = 1 int M = (L + 1) / 2; BigInteger lower = TWO.pow(M - 1); BigInteger upper = TWO.pow(M).subtract(ONE); byte[] kb = new byte[(M + ... | 22,189 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, br); SwingUtilities.calculate... | 22,191 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | 22,192 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | 22,193 |
public void addRow(Object[] rowData) { addRow(convertToVector(rowData)); } | public void addRow(Object[] rowData) { addRow(convertToVector(rowData)); } | 22,195 |
public final Class getCategory() { return DateTimeAtCreation.class; } | public Class getCategory() { return DateTimeAtCreation.class; } | 22,196 |
public final String getName() { return "date-time-at-creation"; } | public String getName() { return "date-time-at-creation"; } | 22,197 |
public static ComponentUI createUI(JComponent x) { return new BasicPanelUI(); } | public static ComponentUI createUI(JComponent panel) { return new BasicPanelUI(); } | 22,198 |
public static ComponentUI createUI(JComponent x) { return new BasicPanelUI(); } | public static ComponentUI createUI(JComponent x) { if (sharedUI == null) sharedUI = new BasicPanelUI(); return sharedUI; } | 22,199 |
public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | 22,202 |
public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | 22,203 |
public static ComponentUI createUI(final JComponent component) { return new BasicToggleButtonUI(); } | public static ComponentUI createUI(JComponent component) { return new BasicToggleButtonUI(); } | 22,204 |
public final void cancel() { if (isValid()) { ((AbstractSelector) selector()).cancelKey(this); cancelled = true; } } | public final synchronized void cancel() { if (isValid()) { ((AbstractSelector) selector()).cancelKey(this); cancelled = true; } } | 22,205 |
public final boolean isValid() { return ! cancelled; } | public final synchronized boolean isValid() { return ! cancelled; } | 22,206 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | 22,207 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmExce... | 22,208 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | 22,209 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); if (lastException != null) thro... | 22,210 |
public void actionPerformed(ActionEvent ev) { Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.Attribute.TYPE); ... | public void actionPerformed(ActionEvent ev) { Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.Attribute.TYPE); ... | 22,213 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); AttributeSet atts = el.getAttributes(); Object tag = atts.getAttribute(StyleConstants.NameAttribute); Object model = atts.getAttribute(StyleConstants.ModelAttribute); if (tag.equals(HTML.Tag.INPUT)) { At... | 22,214 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { String type = (String) atts.getAttribute(HTML.Attribute.TYPE); String value = ... | 22,215 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,216 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,217 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,218 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,219 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,220 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,221 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,222 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,223 |
protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | protected Component createComponent() { Component comp = null; Element el = getElement(); Object tag = el.getAttributes().getAttribute(StyleConstants.NameAttribute); if (tag.equals(HTML.Tag.INPUT)) { AttributeSet atts = el.getAttributes(); String type = (String) atts.getAttribute(HTML.... | 22,224 |
public float getMaximumSpan(int axis) { // FIXME: The specs say that for some components the maximum span == the // preferred span of the component. This should be figured out and // implemented accordingly. float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if ... | public float getMaximumSpan(int axis) { // FIXME: The specs say that for some components the maximum span == the // preferred span of the component. This should be figured out and // implemented accordingly. float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if ... | 22,226 |
public float getMaximumSpan(int axis) { // FIXME: The specs say that for some components the maximum span == the // preferred span of the component. This should be figured out and // implemented accordingly. float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if ... | public float getMaximumSpan(int axis) { // FIXME: The specs say that for some components the maximum span == the // preferred span of the component. This should be figured out and // implemented accordingly. float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if ... | 22,227 |
public Image getOffscreenBuffer(Component component, int proposedWidth, int proposedHeight) { Component root = SwingUtilities.getRoot(component); Image buffer = (Image) offscreenBuffers.get(root); if (buffer == null || buffer.getWidth(null) < proposedWidth ||... | public Image getOffscreenBuffer(Component component, int proposedWidth, int proposedHeight) { Component root = getRoot(component); Image buffer = (Image) offscreenBuffers.get(root); if (buffer == null || buffer.getWidth(null) < proposedWidth || buffer.getHeig... | 22,229 |
public final boolean visit(Object object) { final int gcColor = helper.getObjectColor(object); if (gcColor == GC_WHITE) { final boolean finalized = helper.isFinalized(object); if (finalized) { // Already finalized, we can free it now currentHeap.free... | public final boolean visit(Object object) { final int gcColor = helper.getObjectColor(object); if (gcColor == GC_WHITE) { final boolean finalized = helper.isFinalized(object); if (finalized) { // Already finalized, we can free it now currentHeap.free... | 22,230 |
public static byte[] getSeed(int numBytes) { byte[] tmp = new byte[numBytes]; new Random().nextBytes(tmp); return tmp; //return secureRandomSpi.engineGenerateSeed( numBytes ); } | public static byte[] getSeed(int numBytes) { byte[] tmp = new byte[numBytes]; generateSeed(tmp); return tmp; //return secureRandomSpi.engineGenerateSeed( numBytes ); } | 22,232 |
public String getAccessibleName() { return null; // TODO } | public String getAccessibleName() { String result = super.getAccessibleName(); if (result == null) result = text; return result; // TODO } | 22,238 |
public void setContentAreaFilled(boolean b) { if (contentAreaFilled == b) return; boolean old = contentAreaFilled; contentAreaFilled = b; firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b); // The JDK sets the opaque property to the value of the contentAreaFilled ... | public void setContentAreaFilled(boolean b) { if (contentAreaFilled == b) return; boolean old = contentAreaFilled; contentAreaFilled = b; firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b); // The JDK sets the opaque property to the value of the contentAreaFilled ... | 22,259 |
public void setIconTextGap(int i) { if (iconTextGap == i) return; int old = iconTextGap; iconTextGap = i; fireStateChanged(); revalidate(); repaint(); } | public void setIconTextGap(int i) { if (iconTextGap == i) return; int old = iconTextGap; iconTextGap = i; firePropertyChange("iconTextGap", new Integer(old), new Integer(i)); revalidate(); repaint(); } | 22,261 |
private Cache () { // If we didn't synchronize on this, then cache would be initialized // without holding a lock. Undefined behavior would occur if the // first thread to call get(int) was not the same as the one that // called the constructor. synchronized (this) { cac... | private Cache () { // If we didn't synchronize on this, then cache would be initialized // without holding a lock. Undefined behavior would occur if the // first thread to call get(int) was not the same as the one that // called the constructor. synchronized (this) { cac... | 22,262 |
private Cache () { // If we didn't synchronize on this, then cache would be initialized // without holding a lock. Undefined behavior would occur if the // first thread to call get(int) was not the same as the one that // called the constructor. synchronized (this) { cac... | private Cache () { // If we didn't synchronize on this, then cache would be initialized // without holding a lock. Undefined behavior would occur if the // first thread to call get(int) was not the same as the one that // called the constructor. synchronized (this) { cac... | 22,263 |
private synchronized CoderResult get (int length) { if (length <= 0) throw new IllegalArgumentException ("Non-positive length"); Integer len = new Integer (length); CoderResult cr = null; Object o; if ((o = cache.get (len)) != null) cr = (CoderResult) ((WeakReference) o).ge... | synchronized CoderResult get (int length) { if (length <= 0) throw new IllegalArgumentException ("Non-positive length"); Integer len = new Integer (length); CoderResult cr = null; Object o; if ((o = cache.get (len)) != null) cr = (CoderResult) ((WeakReference) o).get (); ... | 22,264 |
private CoderResult (int type, int length) { this.type = type; this.length = length; } | CoderResult (int type, int length) { this.type = type; this.length = length; } | 22,265 |
public void setImage(Image image) { this.image = Toolkit.getDefaultToolkit().createImage(image.getSource()); } | public void setImage(Image image) { loadImage(image); this.image = image; } | 22,266 |
public void updateUI() { setUI((SliderUI) UIManager.getUI(this)); invalidate(); repaint(); } | public void updateUI() { setUI((SliderUI) UIManager.getUI(this)); invalidate(); repaint(); } | 22,267 |
public final Object attach(Object obj) { Object old = attached; attached = obj; return old; } | public final synchronized Object attach(Object obj) { Object old = attached; attached = obj; return old; } | 22,270 |
private void _doInitialization () throws TransportException { _group = new ThreadGroup ("JDWP threads"); // initialize transport ITransport transport = TransportFactory.newInstance (_properties); _connection = new JdwpConnection (_group, transport); _connection.initialize (); _connection.start (... | private void _doInitialization () throws TransportException { _group = new ThreadGroup ("JDWP threads"); // initialize transport ITransport transport = TransportFactory.newInstance (_properties); _connection = new JdwpConnection (_group, transport); _connection.initialize (); _connection.start (... | 22,271 |
private void _enforceSuspendPolicy (byte suspendPolicy) throws JdwpException { switch (suspendPolicy) { case EventRequest.SUSPEND_NONE: // do nothing break; case EventRequest.SUSPEND_THREAD: VMVirtualMachine.suspendThread (this); break; case EventRequest.SUSPEND_ALL: VMVirtualMachine.suspen... | private void _enforceSuspendPolicy (byte suspendPolicy) throws JdwpException { switch (suspendPolicy) { case EventRequest.SUSPEND_NONE: // do nothing break; case EventRequest.SUSPEND_THREAD: VMVirtualMachine.suspendThread (Thread.currentThread ()); break; case EventRequest.SUSPEND_ALL: VMVi... | 22,272 |
public final Class getCategory() { return Compression.class; } | public Class getCategory() { return Compression.class; } | 22,273 |
public final String getName() { return "compression"; } | public String getName() { return "compression"; } | 22,274 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.