bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
private static int loadLib(String filename) { SecurityManager sm = securityManager; // Be thread-safe! if (sm != null) sm.checkRead(filename); return VMRuntime.nativeLoad(filename); } | private static int loadLib(String filename) { SecurityManager sm = SecurityManager.current; // Be thread-safe! if (sm != null) sm.checkRead(filename); return VMRuntime.nativeLoad(filename); } | 25,287 |
boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ... | boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ... | 25,288 |
boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ... | boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ... | 25,289 |
boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ... | boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ... | 25,290 |
private final int readLeByte() throws IOException { if (avail <= 0) { fillBuf(); if (avail <= 0) throw new ZipException("EOF in header"); } return buf[len - avail--] & 0xff; } | private int readLeByte() throws IOException { if (avail <= 0) { fillBuf(); if (avail <= 0) throw new ZipException("EOF in header"); } return buf[len - avail--] & 0xff; } | 25,291 |
private final int readLeInt() throws IOException { return readLeShort() | (readLeShort() << 16); } | private int readLeInt() throws IOException { return readLeShort() | (readLeShort() << 16); } | 25,292 |
private final int readLeShort() throws IOException { return readLeByte() | (readLeByte() << 8); } | private int readLeShort() throws IOException { return readLeByte() | (readLeByte() << 8); } | 25,293 |
public Font(String name, int style, int size) { this.name = name; this.style = style; this.size = size; this.pointSize = size; } | public Font(String name, int style, int size) { this.name = name; this.style = style; this.size = size; this.pointSize = size; } | 25,294 |
public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")... | public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")... | 25,295 |
public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")... | public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")... | 25,296 |
public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")... | public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")... | 25,297 |
public Font deriveFont(int style) { return new Font(name, style, size); } | public Font deriveFont(int style) { return new Font(name, style, size); } | 25,298 |
public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof Font)) return (false); Font f = (Font) obj; if (!f.name.equals(name)) return (false); if (f.size != size) return (false); if (f.style != style) return (false); return (true); } | equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof Font)) return (false); Font f = (Font) obj; if (!f.name.equals(name)) return (false); if (f.size != size) return (false); if (f.style != style) return (false); return (true); } | 25,299 |
public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof Font)) return (false); Font f = (Font) obj; if (!f.name.equals(name)) return (false); if (f.size != size) return (false); if (f.style != style) return (false); return (true); } | public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof Font)) return (false); Font f = (Font) obj; if (!f.name.equals(name)) return (false); if (f.size != size) return (false); if (f.style != style) return (false); return (true); } | 25,300 |
public String getFamily() { // FIXME: How do I implement this? return (name); } | public String getFamily() { // FIXME: How do I implement this? return (name); } | 25,301 |
public static Font getFont(String propname, Font defval) { String propval = System.getProperty(propname); if (propval != null) return (decode(propval)); return (defval); } | public static Font getFont(String propname, Font defval) { String propval = System.getProperty(propname); if (propval != null) return (decode(propval)); return (defval); } | 25,302 |
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { throw new RuntimeException("Not implemented yet"); } | public LineMetrics getLineMetrics(String str, FontRenderContext frc) { throw new RuntimeException("Not implemented yet"); } | 25,303 |
public String getName() { return (name); } | public String getName() { return (name); } | 25,304 |
public FontPeer getPeer() { if (peer != null) return (peer); peer = Toolkit.getDefaultToolkit().getFontPeer(name, style); return (peer); } | public FontPeer getPeer() { if (peer != null) return (peer); peer = Toolkit.getDefaultToolkit().getFontPeer(name, style); return (peer); } | 25,305 |
public int getSize() { return (size); } | public int getSize() { return (size); } | 25,306 |
public float getSize2D() { return pointSize; } | public float getSize2D() { return pointSize; } | 25,307 |
public int getStyle() { return style; } | public int getStyle() { return style; } | 25,308 |
public int hashCode() { return ((new String(name + size + style)).hashCode()); } | public int hashCode() { return ((new String(name + size + style)).hashCode()); } | 25,309 |
public boolean isBold() { if ((style == BOLD) || (style == (BOLD + ITALIC))) return (true); else return (false); } | public boolean isBold() { if ((style == BOLD) || (style == (BOLD + ITALIC))) return (true); else return (false); } | 25,310 |
public boolean isItalic() { if ((style == ITALIC) || (style == (BOLD + ITALIC))) return (true); else return (false); } | public boolean isItalic() { if ((style == ITALIC) || (style == (BOLD + ITALIC))) return (true); else return (false); } | 25,311 |
public boolean isPlain() { if (style == PLAIN) return (true); else return (false); } | public boolean isPlain() { if (style == PLAIN) return (true); else return (false); } | 25,312 |
public String toString() { return (getClass().getName() + "(name=" + name + ",style=" + style + ",size=" + size + ")"); } | public String toString() { return (getClass().getName() + "(name=" + name + ",style=" + style + ",size=" + size + ")"); } | 25,313 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { if (val == Spring.UNSET) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | 25,314 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { if (val > getMaximumValue()) { if (value != Spring.UNSET) { s1.setValue(Spring.UNSET); s2.setValue(Spring.UNSET); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; ... | 25,315 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | 25,316 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { value = val; int p1 = s1.getPreferredValue(); int p2 = s2.getPreferredValue(); if (p1 < p2) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; ... | 25,318 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | 25,319 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { s1.setValue(val); s2.setValue(Math.min(val, p2)); } } | 25,320 |
protected MinusSpring(Spring s) { super(); this.s = s; value = Spring.UNSET; } | protected MinusSpring(Spring s) { super(); this.s = s; } | 25,321 |
public int getValue() { if (value == Spring.UNSET) { value = -s.getValue(); } return value; } | public int getValue() { if (value == Spring.UNSET) { value = -s.getValue(); } return value; } | 25,322 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | 25,323 |
public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | public void setValue(int val) { if (val > getMaximumValue()) { value = getMaximumValue(); } else if (val < getMinimumValue()) { value = getMinimumValue(); } else { value = val; } } | 25,324 |
public SimpleSpring(int newMin, int newPref, int newMax) { min = newMin; pref = newPref; max = newMax; value = Spring.UNSET; } | public SimpleSpring(int newMin, int newPref, int newMax) { min = newMin; pref = newPref; max = newMax; value = newPref; } | 25,325 |
public int getValue() { if (value == Spring.UNSET) { value = pref; } return value; } | public int getValue() { if (value == Spring.UNSET) { value = pref; } return value; } | 25,326 |
public void setValue(int val) { if (val > max) { value = max; } else if (val < min) { value = min; } else { value = val; } } | public void setValue(int val) { if (val > max) { value = max; } else if (val < min) { value = min; } else { value = val; } } | 25,327 |
public void setValue(int val) { if (val > max) { value = max; } else if (val < min) { value = min; } else { value = val; } } | public void setValue(int val) { if (val > max) { value = max; else if (val < min) { value = min; else { value = val; | 25,328 |
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 ... | 25,329 |
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 ... | 25,330 |
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 ... | 25,331 |
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 ... | 25,332 |
public AccessibleStateSet getAccessibleStateSet() { return null; } | public AccessibleStateSet getAccessibleStateSet() { AccessibleStateSet result = super.getAccessibleStateSet(); if (orientation == JProgressBar.HORIZONTAL) result.add(AccessibleState.HORIZONTAL); else if (orientation == JProgressBar.VERTICAL) result.add(AccessibleState.VERTICAL); return result; } | 25,333 |
public int getLayer() { JDesktopPane pane = getDesktopPane(); if (pane != null) return pane.getLayer(this).intValue(); return -1; } | public int getLayer() { JDesktopPane pane = getDesktopPane(); if (pane != null) return pane.getLayer(this); return -1; } | 25,334 |
public void setDefaultCloseOperation(int operation) { if (operation != DO_NOTHING_ON_CLOSE || operation != HIDE_ON_CLOSE || operation != DISPOSE_ON_CLOSE) throw new Error("Close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE"); defaultCloseOperation = operation; } | public void setDefaultCloseOperation(int operation) { if (operation != DO_NOTHING_ON_CLOSE || operation != HIDE_ON_CLOSE || operation != DISPOSE_ON_CLOSE) throw new Error("Close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE"); defaultCloseOperation = operation; } | 25,335 |
public int getColumnCount() { return dataModel.getColumnCount(); } | public int getColumnCount() { return columnModel.getColumnCount(); } | 25,336 |
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { boolean rsa = getRowSelectionAllowed(); boolean csa = getColumnSelectionAllowed(); boolean rs = rsa ? getSelectionModel().isSelectedIndex(row) : false; b... | public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { boolean rsa = getRowSelectionAllowed(); boolean csa = getColumnSelectionAllowed(); boolean rs = rsa ? getSelectionModel().isSelectedIndex(row) : false; b... | 25,337 |
public void layoutContainer(Container c) { Dimension dims = frame.getSize(); Insets insets = frame.getInsets(); dims.width -= insets.left + insets.right; dims.height -= insets.top + insets.bottom; frame.getRootPane().getGlassPane().setBounds(0, 0, dims.width, ... | public void layoutContainer(Container c) { Dimension dims = frame.getSize(); Insets insets = frame.getInsets(); dims.width -= insets.left + insets.right; dims.height -= insets.top + insets.bottom; frame.getRootPane().getGlassPane().setBounds(0, 0, dims.width, ... | 25,343 |
protected void installDefaults() { internalFrameLayout = createLayoutManager(); frame.setLayout(internalFrameLayout); LookAndFeel.installBorder(frame, "InternalFrame.border"); frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon")); // InternalFrames are invisible by default. fram... | protected void installDefaults() { internalFrameLayout = createLayoutManager(); frame.setLayout(internalFrameLayout); LookAndFeel.installBorder(frame, "InternalFrame.border"); frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon")); // InternalFrames are invisible by default. } | 25,344 |
public void installUI(JComponent c) { if (c instanceof JInternalFrame) { frame = (JInternalFrame) c; ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); installDefaults(); installListeners(); instal... | public void installUI(JComponent c) { if (c instanceof JInternalFrame) { frame = (JInternalFrame) c; ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); installDefaults(); installListeners(); instal... | 25,345 |
public void installUI(JComponent c) { if (c instanceof JInternalFrame) { frame = (JInternalFrame) c; ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); installDefaults(); installListeners(); instal... | public void installUI(JComponent c) { if (c instanceof JInternalFrame) { frame = (JInternalFrame) c; ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); installDefaults(); installListeners(); instal... | 25,346 |
public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallComponents(); uninstallListeners(); uninstallDefaults(); ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(true); frame.getRootPane().getGlassPane().setVisible(false); frame = null; } | public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallComponents(); uninstallListeners(); uninstallDefaults(); frame.getRootPane().getGlassPane().setVisible(false); frame = null; } | 25,347 |
private void markThreadStack(VmThread thread) { // For now do it stupid, but safe, just scan the whole stack. final int stackSize = thread.getStackSize(); final Object stack = helper.getStack(thread); for (int i = 0; i < stackSize; i += slotSize) { Address child = Unsafe.getAd... | private void markThreadStack(VmThread thread) { // For now do it stupid, but safe, just scan the whole stack. final int stackSize = thread.getStackSize(); final Object stack = helper.getStack(thread); for (int i = 0; i < stackSize; i += slotSize) { Address child = Unsafe.getAd... | 25,348 |
protected void uninstallDefaults() { table.setFont(null); table.setGridColor(null); table.setForeground(null); table.setBackground(null); table.setSelectionForeground(null); table.setSelectionBackground(null); } | protected void uninstallDefaults() { table.setFont(null); table.setGridColor(null); table.setForeground(null); table.setBackground(null); table.setSelectionForeground(null); table.setSelectionBackground(null); } | 25,352 |
void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); os.log("LongItem.log called "+Integer.toString(kind)); myAssert(lsb != msb); switch (kind) { case REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (ms... | void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); os.log("LongItem.log called "+Integer.toString(kind)); myAssert(lsb != msb); switch (kind) { case REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (ms... | 25,354 |
void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case REGISTER: os.writePUSH(lsb); os.writePUSH(msb); break; case LOCAL: os.writePUSH(FP, offsetToFP+4); os.writePUSH(FP, offsetToFP); ... | void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case REGISTER: os.writePUSH(lsb); break; case LOCAL: os.writePUSH(FP, offsetToFP+4); os.writePUSH(FP, offsetToFP); break; cas... | 25,355 |
void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case REGISTER: os.writePUSH(lsb); os.writePUSH(msb); break; case LOCAL: os.writePUSH(FP, offsetToFP+4); os.writePUSH(FP, offsetToFP); ... | void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case REGISTER: os.writePUSH(lsb); os.writePUSH(msb); break; case LOCAL: os.writePUSH(FP, offsetToFP+4); os.writePUSH(FP, offsetToFP); ... | 25,356 |
private void configureFinder(List<DeviceFinder> finders, ConfigurationElement element) { final String className = element.getAttribute("class"); BootLog.debug("Configure finder: class=" + className); if (className != null) { try { final Class cls = Thread.currentThread... | private void configureFinder(List<DeviceFinder> finders, ConfigurationElement element) { final String className = element.getAttribute("class"); if (className != null) { try { final Class cls = Thread.currentThread() .getContextClassLoader().loa... | 25,357 |
private void configureMapper(List<DeviceToDriverMapper> mappers, ConfigurationElement element) { final String className = element.getAttribute("class"); BootLog.debug("Configure mapper: class=" + className); if (className != null) { try { final Class cls = Thread.curre... | private void configureMapper(List<DeviceToDriverMapper> mappers, ConfigurationElement element) { final String className = element.getAttribute("class"); if (className != null) { try { final Class cls = Thread.currentThread() .getContextClassLoad... | 25,358 |
protected void setupForSigning(final PrivateKey k) throws IllegalArgumentException { if (!(k instanceof RSAPrivateKey)) { throw new IllegalArgumentException(); } privateKey = k; } | protected void setupForSigning(final PrivateKey k) throws IllegalArgumentException { if (!(k instanceof RSAPrivateKey)) { throw new IllegalArgumentException(); } privateKey = k; } | 25,359 |
protected void setupForSigning(final PrivateKey k) throws IllegalArgumentException { if (!(k instanceof RSAPrivateKey)) { throw new IllegalArgumentException(); } privateKey = k; } | protected void setupForSigning(final PrivateKey k) throws IllegalArgumentException { if (!(k instanceof RSAPrivateKey)) { throw new IllegalArgumentException(); privateKey = k; | 25,360 |
protected void setupForVerification(final PublicKey k) throws IllegalArgumentException { if (!(k instanceof RSAPublicKey)) { throw new IllegalArgumentException(); } publicKey = k; } | protected void setupForVerification(final PublicKey k) throws IllegalArgumentException { if (!(k instanceof RSAPublicKey)) { throw new IllegalArgumentException(); } publicKey = k; } | 25,361 |
protected void setupForVerification(final PublicKey k) throws IllegalArgumentException { if (!(k instanceof RSAPublicKey)) { throw new IllegalArgumentException(); } publicKey = k; } | protected void setupForVerification(final PublicKey k) throws IllegalArgumentException { if (!(k instanceof RSAPublicKey)) { throw new IllegalArgumentException(); publicKey = k; | 25,362 |
protected boolean verifySignature(final Object sig) throws IllegalStateException { if (publicKey == null) { throw new IllegalStateException(); } final byte[] S = (byte[]) sig; // 1. Length checking: If the length of the signature S is not k octets, // output "invalid signature" a... | protected boolean verifySignature(final Object sig) throws IllegalStateException if (publicKey == null) throw new IllegalStateException(); } final byte[] S = (byte[]) sig; // 1. Length checking: If the length of the signature S is not k octets, // output "invalid signature" and... | 25,363 |
protected boolean verifySignature(final Object sig) throws IllegalStateException { if (publicKey == null) { throw new IllegalStateException(); } final byte[] S = (byte[]) sig; // 1. Length checking: If the length of the signature S is not k octets, // output "invalid signature" a... | protected boolean verifySignature(final Object sig) throws IllegalStateException { if (publicKey == null) { throw new IllegalStateException(); final byte[] S = (byte[]) sig; // 1. Length checking: If the length of the signature S is not k octets, // output "invalid signature" an... | 25,364 |
private int mapPixels() { int end = value.indexOf("pt"); String number = value.substring(0, end); int intVal = Integer.parseInt(number); return intVal; } | private int mapPixels() { int end = value.indexOf("px"); if (end == -1) end = value.length(); String number = value.substring(0, end); int intVal = Integer.parseInt(number); return intVal; } | 25,366 |
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(... | public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event == null || (event.getFirstRow() == TableModelEvent.HEADER_ROW)) && autoCreateColumnsFromModel) createDefa... | 25,368 |
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(... | public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(... | 25,369 |
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(... | public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createDefaultColumnsFromModel(... | 25,370 |
private Component postEvent(Component source, int id, int button) { if (source == null) { final JNodeToolkit tk = (JNodeToolkit) Toolkit.getDefaultToolkit(); source = tk.getTopComponentAt(x, y); } //log.debug("Source: " + source.getClass().getName()); //TODO full support for modifiers if (source.isVisible()) ... | private Component postEvent(Component source, int id, int button) { if (source == null) { final JNodeToolkit tk = (JNodeToolkit) Toolkit.getDefaultToolkit(); source = tk.getTopComponentAt(x, y); } //log.debug("Source: " + source.getClass().getName()); //TODO full support for modifiers if (source.isVisible()) ... | 25,371 |
public void installComponents(JFileChooser fc) { JLabel look = new JLabel("Look In:"); parents = new JComboBox(); parents.setRenderer(new CBLabelRenderer()); boxEntries(); look.setLabelFor(parents); JPanel parentsPanel = new JPanel(); parentsPanel.add(look); parentsPanel.add(parents); JPan... | public void installComponents(JFileChooser fc) { JLabel look = new JLabel("Look In:"); parents = new JComboBox(); parents.setRenderer(new CBLabelRenderer()); boxEntries(); look.setLabelFor(parents); JPanel parentsPanel = new JPanel(); parentsPanel.add(look); parentsPanel.add(parents); JPan... | 25,373 |
protected AccessibleJPopupMenu(JPopupMenu component) { super(component); } | protected AccessibleJPopupMenu() { super(component); } | 25,374 |
protected AccessibleJPopupMenu(JPopupMenu component) { super(component); } | protected AccessibleJPopupMenu(JPopupMenu component) { } | 25,375 |
public void hide() { this.hide(); } | public void hide() { super.hide(); } | 25,376 |
public LightWeightPopup(Container c) { this.add(c); } | public LightWeightPopup(Container c) { this.c = c; } | 25,377 |
public void hide() { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); int index = layeredPane.getIndexOf(this); layeredPane.remove(index); } | public void hide() { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); int index = layeredPane.getIndexOf(c); layeredPane.remove(index); } | 25,378 |
public void show(int x, int y, int width, int height) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); this.setBounds(x, y, width, height); layeredPane.add(this, JLayeredPane.POPUP_LAYER, 0); } | public void show(int x, int y, int width, int height) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); this.setBounds(x, y, width, height); layeredPane.add(this, JLayeredPane.POPUP_LAYER, 0); } | 25,379 |
public String getUIClassID() { return null; } | public String getUIClassID() { return "PopupMenuSeparatorUI"; } | 25,380 |
public JPopupMenu() { updateUI(); lightWeightPopupEnabled = defaultLWPopupEnabled; selectionModel = new DefaultSingleSelectionModel(); } | public JPopupMenu() { updateUI(); lightWeightPopupEnabled = DefaultLightWeightPopupEnabled; selectionModel = new DefaultSingleSelectionModel(); } | 25,381 |
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPopupMenu(this); return accessibleContext; } | public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPopupMenu(); return accessibleContext; } | 25,384 |
public static boolean getDefaultLightWeightPopupEnabled() { return defaultLWPopupEnabled; } | public static boolean getDefaultLightWeightPopupEnabled() { return DefaultLightWeightPopupEnabled; } | 25,385 |
public void setBorderPainted(boolean painted) { paintBorder = painted; } | public void setBorderPainted(boolean painted) { borderPainted = painted; } | 25,387 |
public static void setDefaultLightWeightPopupEnabled(boolean enabled) { defaultLWPopupEnabled = enabled; } | public static void setDefaultLightWeightPopupEnabled(boolean enabled) { DefaultLightWeightPopupEnabled = enabled; } | 25,388 |
public void setLocation(int x, int y) { locationX = x; locationY = y; } | public void setLocation(int x, int y) { locationX = x; locationY = y; } | 25,389 |
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.... | public void setVisible(boolean visible) { super.setVisible(visible); if (old != isVisible()) { firePropertyChange(VISIBLE_CHANGED_PROPERTY, old, (boolean) isVisible()); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine... | 25,390 |
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.... | public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.... | 25,391 |
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.... | public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.... | 25,392 |
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.... | public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.... | 25,393 |
public void show(Component component, int x, int y) { setInvoker(component); Point rootOnScreen; rootOnScreen = SwingUtilities.getRoot(invoker).getLocationOnScreen(); Point invokerOnScreen = invoker.getLocationOnScreen(); int popupX = (invokerOnScreen.x - rootOnScreen.x) + x; int popupY = (invo... | public void show(Component component, int x, int y) { setInvoker(component); Point rootOnScreen; rootOnScreen = SwingUtilities.getRoot(invoker).getLocationOnScreen(); Point invokerOnScreen = invoker.getLocationOnScreen(); int popupX = (invokerOnScreen.x - rootOnScreen.x) + x; int popupY = (invo... | 25,395 |
createCheckboxMenuItem(CheckboxMenuItem target); | protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target); | 25,396 |
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; } | 25,397 |
createDragSourceContextPeer(DragGestureEvent e); | public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent e); | 25,398 |
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { Class cls = Class.forName(toolkit_name); Object obj = cls.newInstance(); ... | public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { Class cls = Class.forName(toolkit_name); Object obj = cls.newInstance(); ... | 25,399 |
protected FontMetrics(Font font) { this.font = font; } | FontMetrics(Font font) { this.font = font; } | 25,400 |
public int bytesWidth(byte buf[], int offset, int len) { int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth((char) buf[i]); return (total_width); } | bytesWidth(byte buf[], int offset, int len) { int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth((char) buf[i]); return (total_width); } | 25,401 |
public int charWidth(int ch) { return (charWidth((char) ch)); } | public int charWidth(int ch) { return (charWidth((char) ch)); } | 25,402 |
public int charsWidth(char buf[], int offset, int len) { int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth(buf[i]); return (total_width); } | charsWidth(char buf[], int offset, int len) { int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth(buf[i]); return (total_width); } | 25,403 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.