rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
return page.openStream(); | URLConnection conn = page.openConnection(); String type = conn.getContentType(); if (type != null) setContentType(type); InputStream stream = conn.getInputStream(); return new BufferedInputStream(stream); | protected InputStream getStream(URL page) throws IOException { return page.openStream(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java |
registerMap = new HashMap(); registerEditorKitForContentType("application/rtf", "javax.swing.text.rtf.RTFEditorKit"); registerEditorKitForContentType("text/plain", "javax.swing.JEditorPane$PlainEditorKit"); registerEditorKitForContentType("text/html", "javax.swing.text.html.HTMLEditorKit"); registerEditorKitForContentType("text/rtf", "javax.swing.text.rtf.RTFEditorKit"); | void init() { editorMap = new HashMap(); registerMap = new HashMap(); registerEditorKitForContentType("application/rtf", "javax.swing.text.rtf.RTFEditorKit"); registerEditorKitForContentType("text/plain", "javax.swing.JEditorPane$PlainEditorKit"); registerEditorKitForContentType("text/html", "javax.swing.text.html.HTMLEditorKit"); registerEditorKitForContentType("text/rtf", "javax.swing.text.rtf.RTFEditorKit"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java |
|
Document doc = (Document) desc; | HTMLDocument doc = (HTMLDocument) desc; setDocument(doc); | public void read(InputStream in, Object desc) throws IOException { EditorKit kit = getEditorKit(); if (kit instanceof HTMLEditorKit && desc instanceof HTMLDocument) { Document doc = (Document) desc; try { kit.read(in, doc, 0); } catch (BadLocationException ex) { assert false : "BadLocationException must not be thrown here."; } } else { Reader inRead = new InputStreamReader(in); super.read(inRead, desc); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java |
kit.read(in, doc, 0); | InputStreamReader reader = new InputStreamReader(in); kit.read(reader, doc, 0); | public void read(InputStream in, Object desc) throws IOException { EditorKit kit = getEditorKit(); if (kit instanceof HTMLEditorKit && desc instanceof HTMLDocument) { Document doc = (Document) desc; try { kit.read(in, doc, 0); } catch (BadLocationException ex) { assert false : "BadLocationException must not be thrown here."; } } else { Reader inRead = new InputStreamReader(in); super.read(inRead, desc); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java |
registerMap.put(type, classname); | registerEditorKitForContentType(type, classname, Thread.currentThread().getContextClassLoader()); | public static void registerEditorKitForContentType(String type, String classname) { registerMap.put(type, classname); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java |
int paramIndex = type.indexOf(';'); if (paramIndex > -1) { type = type.substring(0, paramIndex).trim(); } | public final void setContentType(String type) { if (editorKit != null && editorKit.getContentType().equals(type)) return; EditorKit kit = getEditorKitForContentType(type); if (kit != null) setEditorKit(kit); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java |
|
pool.request(reg); | assertCondition(pool.request(reg), "Request of register failed: ", reg); | static final void requestRegister(EmitterContext eContext, X86Register reg) { final X86RegisterPool pool = eContext.getGPRPool(); if (!pool.isFree(reg)) { final Item i = (Item) pool.getOwner(reg); i.spill(eContext, reg); assertCondition(pool.isFree(reg), "register is not free after spill"); } pool.request(reg); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6ad6198b74c08d19e793bf52867682597f899f43/L1AHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/L1AHelper.java |
public IllegalModeException(String s) { super(s); | public IllegalModeException() { super(); | public IllegalModeException(String s) { super(s); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d36502b201c4e617dca04de74e3ddf678c51fa7e/IllegalModeException.java/buggy/core/src/core/org/jnode/vm/compiler/IllegalModeException.java |
checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); | DerUtil.checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); | 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(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/DSSKeyPairPKCS8Codec.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java |
checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); | DerUtil.checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); | 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(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/DSSKeyPairPKCS8Codec.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java |
checkIsConstructed(derParams, "Wrong DSS Parameters field"); | DerUtil.checkIsConstructed(derParams, "Wrong DSS Parameters field"); | 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(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/DSSKeyPairPKCS8Codec.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java |
checkIsBigInteger(val, "Wrong P field"); | DerUtil.checkIsBigInteger(val, "Wrong P field"); | 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(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/DSSKeyPairPKCS8Codec.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java |
checkIsBigInteger(val, "Wrong Q field"); | DerUtil.checkIsBigInteger(val, "Wrong Q field"); | 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(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/DSSKeyPairPKCS8Codec.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java |
checkIsBigInteger(val, "Wrong G field"); | DerUtil.checkIsBigInteger(val, "Wrong G field"); | 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(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/DSSKeyPairPKCS8Codec.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java |
public int compareTo(BigInteger val) | private static int compareTo(BigInteger x, BigInteger y) | public int compareTo(BigInteger val) { return compareTo(this, val); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java |
return compareTo(this, val); | if (x.words == null && y.words == null) return x.ival < y.ival ? -1 : x.ival > y.ival ? 1 : 0; boolean x_negative = x.isNegative(); boolean y_negative = y.isNegative(); if (x_negative != y_negative) return x_negative ? -1 : 1; int x_len = x.words == null ? 1 : x.ival; int y_len = y.words == null ? 1 : y.ival; if (x_len != y_len) return (x_len > y_len) != x_negative ? 1 : -1; return MPN.cmp(x.words, y.words, x_len); | public int compareTo(BigInteger val) { return compareTo(this, val); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java |
public BigInteger(int signum, byte[] magnitude) | private BigInteger() | public BigInteger(int signum, byte[] magnitude) { if (magnitude == null || signum > 1 || signum < -1) throw new NumberFormatException(); if (signum == 0) { int i; for (i = magnitude.length - 1; i >= 0 && magnitude[i] == 0; --i) ; if (i >= 0) throw new NumberFormatException(); return; } // Magnitude is always positive, so don't ever pass a sign of -1. words = byteArrayToIntArray(magnitude, 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; if (signum < 0) setNegative(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java |
if (magnitude == null || signum > 1 || signum < -1) throw new NumberFormatException(); if (signum == 0) { int i; for (i = magnitude.length - 1; i >= 0 && magnitude[i] == 0; --i) ; if (i >= 0) throw new NumberFormatException(); return; } words = byteArrayToIntArray(magnitude, 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; if (signum < 0) setNegative(); | public BigInteger(int signum, byte[] magnitude) { if (magnitude == null || signum > 1 || signum < -1) throw new NumberFormatException(); if (signum == 0) { int i; for (i = magnitude.length - 1; i >= 0 && magnitude[i] == 0; --i) ; if (i >= 0) throw new NumberFormatException(); return; } // Magnitude is always positive, so don't ever pass a sign of -1. words = byteArrayToIntArray(magnitude, 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; if (signum < 0) setNegative(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java |
|
public DERValue(int tag, Object value) | public DERValue(int tag, int length, Object value, byte[] encoded) | public DERValue(int tag, Object value) { this(tag, 0, value, null); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DERValue.java/buggy/core/src/classpath/gnu/gnu/java/security/der/DERValue.java |
this(tag, 0, value, null); | tagClass = tag & 0xC0; this.tag = tag & 0x1F; constructed = (tag & CONSTRUCTED) == CONSTRUCTED; this.length = length; this.value = value; if (encoded != null) this.encoded = (byte[]) encoded.clone(); | public DERValue(int tag, Object value) { this(tag, 0, value, null); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DERValue.java/buggy/core/src/classpath/gnu/gnu/java/security/der/DERValue.java |
if (DER.CONSTRUCTED_VALUE.equals (object.getValue ())) { out.write (object.getEncoded ()); return object.getLength (); } | public static int write(OutputStream out, DERValue object) throws IOException { out.write(object.getExternalTag()); Object value = object.getValue(); if (value == null) { writeLength(out, 0); return 0; } if (value instanceof Boolean) return writeBoolean(out, (Boolean) value); else if (value instanceof BigInteger) return writeInteger(out, (BigInteger) value); else if (value instanceof Date) return writeDate(out, object.getExternalTag(), (Date) value); else if (value instanceof String) return writeString(out, object.getExternalTag(), (String) value); else if (value instanceof List) return writeSequence(out, (List) value); else if (value instanceof Set) return writeSet(out, (Set) value); else if (value instanceof BitString) return writeBitString(out, (BitString) value); else if (value instanceof OID) return writeOID(out, (OID) value); else if (value instanceof byte[]) { writeLength(out, ((byte[]) value).length); out.write((byte[]) value); return ((byte[]) value).length; } else if (value instanceof DERValue) { ByteArrayOutputStream bout = new ByteArrayOutputStream(); write(bout, (DERValue) value); byte[] buf = bout.toByteArray(); writeLength(out, buf.length); out.write(buf); return buf.length; } else throw new DEREncodingException("cannot encode " + value.getClass().getName()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DERWriter.java/buggy/core/src/classpath/gnu/gnu/java/security/der/DERWriter.java |
|
public BasicFormattedTextFieldUI() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicFormattedTextFieldUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java |
||
public LongLongSeqHolder(long[] initial_value) | public LongLongSeqHolder() | public LongLongSeqHolder(long[] initial_value) { value = initial_value; typecode.setLength(value.length); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9b55eb78411ab1a82da7ba097b7b93a8cd80865/LongLongSeqHolder.java/buggy/core/src/classpath/org/org/omg/CORBA/LongLongSeqHolder.java |
value = initial_value; typecode.setLength(value.length); | public LongLongSeqHolder(long[] initial_value) { value = initial_value; typecode.setLength(value.length); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9b55eb78411ab1a82da7ba097b7b93a8cd80865/LongLongSeqHolder.java/buggy/core/src/classpath/org/org/omg/CORBA/LongLongSeqHolder.java |
|
try { FileOutputStream out = new FileOutputStream(fileName); props.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} | changes.saveSessionProps(); | private void saveProps() { DefaultMutableTreeNode root = (DefaultMutableTreeNode)tree.getModel().getRoot(); Enumeration e = root.children(); Object child; while (e.hasMoreElements()) { child = e.nextElement(); Object obj = ((DefaultMutableTreeNode)child).getUserObject(); if (obj instanceof AttributesPanel) { ((AttributesPanel)obj).save(); } } try { FileOutputStream out = new FileOutputStream(fileName); props.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/cf233bb7b435e40f202bf1f9e79caf9a1b1747bf/SessionAttributes.java/buggy/tn5250j/src/org/tn5250j/SessionAttributes.java |
public DefaultMutableTreeNode(Object userObject) | public DefaultMutableTreeNode() | public DefaultMutableTreeNode(Object userObject) { this(userObject, true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/DefaultMutableTreeNode.java/buggy/core/src/classpath/javax/javax/swing/tree/DefaultMutableTreeNode.java |
this(userObject, true); | this(null, true); | public DefaultMutableTreeNode(Object userObject) { this(userObject, true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/DefaultMutableTreeNode.java/buggy/core/src/classpath/javax/javax/swing/tree/DefaultMutableTreeNode.java |
public _PolicyStub(Delegate delegate) | public _PolicyStub() | public _PolicyStub(Delegate delegate) { _set_delegate(delegate); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9b55eb78411ab1a82da7ba097b7b93a8cd80865/_PolicyStub.java/buggy/core/src/classpath/org/org/omg/CORBA/_PolicyStub.java |
_set_delegate(delegate); | public _PolicyStub(Delegate delegate) { _set_delegate(delegate); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9b55eb78411ab1a82da7ba097b7b93a8cd80865/_PolicyStub.java/buggy/core/src/classpath/org/org/omg/CORBA/_PolicyStub.java |
|
throw new MARSHAL(); | MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; | public static ServantActivator read(InputStream input) { throw new MARSHAL(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ServantActivatorHelper.java/buggy/core/src/classpath/org/org/omg/PortableServer/ServantActivatorHelper.java |
throw new MARSHAL(); | MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; | public static void write(OutputStream output, ServantActivator value) { throw new MARSHAL(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ServantActivatorHelper.java/buggy/core/src/classpath/org/org/omg/PortableServer/ServantActivatorHelper.java |
public abstract void insert_Object(org.omg.CORBA.Object x); | public abstract void insert_Object(org.omg.CORBA.Object x, TypeCode typecode); | public abstract void insert_Object(org.omg.CORBA.Object x); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72c2f223affb33a2850592b25490f4663c651bee/Any.java/buggy/core/src/classpath/org/org/omg/CORBA/Any.java |
public ObjID(int num) { objNum = (long)num; space = new UID((short)0); } | public ObjID() { synchronized (lock) { objNum = next++; } space = new UID(); } | public ObjID(int num) { objNum = (long)num; space = new UID((short)0);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ObjID.java/buggy/core/src/classpath/java/java/rmi/server/ObjID.java |
public UnicastServerRef(ObjID id, int port, RMIServerSocketFactory ssf) { super(id); manager = UnicastConnectionManager.getInstance(port, ssf); | UnicastServerRef() { | public UnicastServerRef(ObjID id, int port, RMIServerSocketFactory ssf) { super(id); manager = UnicastConnectionManager.getInstance(port, ssf);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastServerRef.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastServerRef.java |
stub = (RemoteStub)getHelperClass(cls, "_Stub"); | Class expCls; try { expCls = findStubSkelClass(cls); } catch (Exception ex) { throw new RemoteException("can not find stubs for class: " + cls, ex); } stub = (RemoteStub)getHelperClass(expCls, "_Stub"); | public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); stub = (RemoteStub)getHelperClass(cls, "_Stub"); if (stub == null) { throw new RemoteException("failed to export: " + cls); } // Find and install the skeleton (if there is one) skel = (Skeleton)getHelperClass(cls, "_Skel"); // Build hash of methods which may be called. buildMethodHash(obj.getClass(), true); // Export it. UnicastServer.exportObject(this); } return (stub);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastServerRef.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastServerRef.java |
skel = (Skeleton)getHelperClass(cls, "_Skel"); | skel = (Skeleton)getHelperClass(expCls, "_Skel"); | public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); stub = (RemoteStub)getHelperClass(cls, "_Stub"); if (stub == null) { throw new RemoteException("failed to export: " + cls); } // Find and install the skeleton (if there is one) skel = (Skeleton)getHelperClass(cls, "_Skel"); // Build hash of methods which may be called. buildMethodHash(obj.getClass(), true); // Export it. UnicastServer.exportObject(this); } return (stub);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastServerRef.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastServerRef.java |
throw new MARSHAL("IOException while writing message header"); | MARSHAL m = new MARSHAL("IOException while writing message header"); m.minor = Minor.Header; m.initCause(ex); throw m; | public void write(java.io.OutputStream out) { try { out.write(major & 0xFF); out.write(minor & 0xFF); } catch (IOException ex) { throw new MARSHAL("IOException while writing message header"); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Version.java/buggy/core/src/classpath/gnu/gnu/CORBA/Version.java |
m.minor = Minor.Encapsulation; | public static void write(OutputStream output, TaggedComponent value) { output.write_long(value.tag); output.write_long(value.component_data.length); try { output.write(value.component_data); } catch (IOException e) { MARSHAL m = new MARSHAL(); m.initCause(e); throw m; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/TaggedComponentHelper.java/buggy/core/src/classpath/org/org/omg/IOP/TaggedComponentHelper.java |
|
throw new MARSHAL("IOException while reading message header"); | MARSHAL m = new MARSHAL("IOException while reading message header"); m.initCause(ex); m.minor = Minor.Header; throw m; | public static Version read_version(java.io.InputStream in) { try { int major = in.read() & 0xFF; int minor = in.read() & 0xFF; return new Version(major, minor); } catch (IOException ex) { throw new MARSHAL("IOException while reading message header"); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Version.java/buggy/core/src/classpath/gnu/gnu/CORBA/Version.java |
m.minor = Minor.Encapsulation; | public static TaggedComponent read(InputStream input) { TaggedComponent value = new TaggedComponent(); value.tag = input.read_long(); value.component_data = new byte[input.read_long()]; try { input.read(value.component_data); } catch (IOException e) { MARSHAL m = new MARSHAL(); m.initCause(e); throw m; } return value; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/TaggedComponentHelper.java/buggy/core/src/classpath/org/org/omg/IOP/TaggedComponentHelper.java |
|
public int hashCode () | public int hashCode() | public int hashCode () { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8b7bd34f9c789e32b3e30b7431e945f2f0ff17f5/DecimalFormat.java/clean/core/src/classpath/java/java/text/DecimalFormat.java |
int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^positivePrefix.hashCode() ^ positiveSuffix.hashCode()); return hash; | return toPattern().hashCode(); | public int hashCode () { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8b7bd34f9c789e32b3e30b7431e945f2f0ff17f5/DecimalFormat.java/clean/core/src/classpath/java/java/text/DecimalFormat.java |
public String[] split(String regex) | public String[] split(String regex, int limit) | public String[] split(String regex) { return Pattern.compile(regex).split(this, 0); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
return Pattern.compile(regex).split(this, 0); | return Pattern.compile(regex).split(this, limit); | public String[] split(String regex) { return Pattern.compile(regex).split(this, 0); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
protected VmImplementedInterface(VmType vmClass) { if (vmClass == null) { throw new IllegalArgumentException("vmClass cannot be null"); | protected VmImplementedInterface(String className) { if (className == null) { throw new IllegalArgumentException("className cannot be null"); | protected VmImplementedInterface(VmType vmClass) { if (vmClass == null) { throw new IllegalArgumentException("vmClass cannot be null"); } if (vmClass instanceof VmInterfaceClass) { this.className = vmClass.getName(); this.resolvedClass = (VmInterfaceClass)vmClass; } else { throw new IllegalArgumentException("vmClass must be an interface class"); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/VmImplementedInterface.java/clean/core/src/core/org/jnode/vm/classmgr/VmImplementedInterface.java |
if (vmClass instanceof VmInterfaceClass) { this.className = vmClass.getName(); this.resolvedClass = (VmInterfaceClass)vmClass; } else { throw new IllegalArgumentException("vmClass must be an interface class"); } | this.className = className; this.resolvedClass = null; | protected VmImplementedInterface(VmType vmClass) { if (vmClass == null) { throw new IllegalArgumentException("vmClass cannot be null"); } if (vmClass instanceof VmInterfaceClass) { this.className = vmClass.getName(); this.resolvedClass = (VmInterfaceClass)vmClass; } else { throw new IllegalArgumentException("vmClass must be an interface class"); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/VmImplementedInterface.java/clean/core/src/core/org/jnode/vm/classmgr/VmImplementedInterface.java |
addNotify() { | public void addNotify() { | addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java |
setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); | setPeer(getToolkit().createMenuBar(this)); | addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java |
} | } | addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java |
String param = super.paramString(); | protected String paramString() { String param = super.paramString(); if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); return param; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Container.java/buggy/core/src/classpath/java/java/awt/Container.java |
|
param = param + ",layout=" + layoutMgr.getClass().getName(); | return super.paramString(); | protected String paramString() { String param = super.paramString(); if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); return param; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Container.java/buggy/core/src/classpath/java/java/awt/Container.java |
return param; | StringBuffer sb = new StringBuffer(); sb.append(super.paramString()); sb.append(",layout="); sb.append(layoutMgr.getClass().getName()); return sb.toString(); | protected String paramString() { String param = super.paramString(); if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); return param; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Container.java/buggy/core/src/classpath/java/java/awt/Container.java |
remove(MenuComponent menu) { int index = menus.indexOf(menu); if (index == -1) return; | public synchronized void remove(int index) { Menu m = (Menu) menus.get(index); menus.remove(index); m.removeNotify(); m.parent = null; | remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java |
remove(index); } | if (peer != null) { MenuBarPeer mp = (MenuBarPeer) peer; mp.delMenu(index); } } | remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java |
removeNotify() { | public void removeNotify() { | removeNotify(){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); } super.removeNotify();} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java |
} | } | removeNotify(){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); } super.removeNotify();} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java |
throw new MARSHAL("Not applicable"); | MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; | public static POA read(InputStream input) { throw new MARSHAL("Not applicable"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/POAHelper.java/clean/core/src/classpath/org/org/omg/PortableServer/POAHelper.java |
throw new MARSHAL("Not applicable"); | MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; | public static void write(OutputStream output, POA value) { throw new MARSHAL("Not applicable"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/POAHelper.java/clean/core/src/classpath/org/org/omg/PortableServer/POAHelper.java |
return new BorderUIResource.CompoundBorderUIResource(outer, inner); | buttonBorder = new BorderUIResource.CompoundBorderUIResource (outer, inner); } return buttonBorder; | public static Border getButtonBorder() { Border outer = new MetalButtonBorder(); Border inner = getMarginBorder(); return new BorderUIResource.CompoundBorderUIResource(outer, inner); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java |
static Border getMarginBorder() | static Border getMarginBorder() | static Border getMarginBorder() // intentionally not public { /* Swing is not designed to be thread-safe, so there is no * need to synchronize the access to the global variable. */ if (sharedMarginBorder == null) sharedMarginBorder = new BasicBorders.MarginBorder(); return sharedMarginBorder; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java |
/* Swing is not designed to be thread-safe, so there is no * need to synchronize the access to the global variable. */ if (sharedMarginBorder == null) sharedMarginBorder = new BasicBorders.MarginBorder(); return sharedMarginBorder; | if (marginBorder == null) marginBorder = new BasicBorders.MarginBorder(); return marginBorder; | static Border getMarginBorder() // intentionally not public { /* Swing is not designed to be thread-safe, so there is no * need to synchronize the access to the global variable. */ if (sharedMarginBorder == null) sharedMarginBorder = new BasicBorders.MarginBorder(); return sharedMarginBorder; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java |
public void paintBorder (Component c, Graphics g, int x, int y, int width, int height) | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) | public void paintBorder (Component c, Graphics g, int x, int y, int width, int height) { /* A previous version of Classpath had emitted a warning when * this method was called. The warning was removed because it is * perfectly legal for a subclass to not override the paintBorder * method. An example would be EmptyBorder. */ } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/AbstractBorder.java/buggy/core/src/classpath/javax/javax/swing/border/AbstractBorder.java |
/* A previous version of Classpath had emitted a warning when * this method was called. The warning was removed because it is * perfectly legal for a subclass to not override the paintBorder * method. An example would be EmptyBorder. */ | public void paintBorder (Component c, Graphics g, int x, int y, int width, int height) { /* A previous version of Classpath had emitted a warning when * this method was called. The warning was removed because it is * perfectly legal for a subclass to not override the paintBorder * method. An example would be EmptyBorder. */ } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/AbstractBorder.java/buggy/core/src/classpath/javax/javax/swing/border/AbstractBorder.java |
|
public JarFile(File file) throws FileNotFoundException, IOException | public JarFile(String fileName) throws FileNotFoundException, IOException | public JarFile(File file) throws FileNotFoundException, IOException { this(file, true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/JarFile.java/buggy/core/src/classpath/java/java/util/jar/JarFile.java |
this(file, true); | this(fileName, true); | public JarFile(File file) throws FileNotFoundException, IOException { this(file, true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/JarFile.java/buggy/core/src/classpath/java/java/util/jar/JarFile.java |
else { | public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(screen,enhanced,support132); setVT(vt); vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); addSessionListener(this); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3170313aa7b38f0fe286c0c625c1e35da5245bb1/Session.java/buggy/tn5250j/src/org/tn5250j/Session.java |
|
sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; } | public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(screen,enhanced,support132); setVT(vt); vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); addSessionListener(this); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3170313aa7b38f0fe286c0c625c1e35da5245bb1/Session.java/buggy/tn5250j/src/org/tn5250j/Session.java |
|
{ | { | public void draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
} | } | public void draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
{ | { | public void drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
} | } | public void drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
{ | { | public void drawChars(char data[], int offset, int length, int x, int y){ drawString(new String(data, offset, length), x, y);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
} | } | public void drawChars(char data[], int offset, int length, int x, int y){ drawString(new String(data, offset, length), x, y);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
{ | { | public void fill3DRect(int x, int y, int width, int height, boolean raised){ fillRect(x, y, width, height); draw3DRect(x, y, width-1, height-1, raised);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
} | } | public void fill3DRect(int x, int y, int width, int height, boolean raised){ fillRect(x, y, width, height); draw3DRect(x, y, width-1, height-1, raised);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
vt.isOnSignoffScreen(); | private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( this.getParent(), // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown((Session)this); } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/7b1c394f4b6ff580cadf047e50a5f3e073aec994/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java |
|
createShortCutItems(kbMenu); | private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { macMenu.addSeparator(); String[] macrosList = macros.getMacroList(); for (int x = 0; x < macrosList.length; x++) { action = new AbstractAction(macrosList[x]) { public void actionPerformed(ActionEvent e) { executeMeMacro(e); } }; macMenu.add(action); } } popup.add(macMenu); popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/7b1c394f4b6ff580cadf047e50a5f3e073aec994/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java |
|
jumpn = keyMap.isKeyStrokeDefined("[jumpnext]"); jumpp = keyMap.isKeyStrokeDefined("[jumpprev]"); | private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) {// if (e.getClickCount() == 2) {//// screen.sendKeys("[enter]");// }// else { screen.moveCursor(e); repaint(); getFocusForMe();// } } }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); } public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); } public void keyReleased(KeyEvent e) { processVTKeyReleased(e); } }); keyMap = new KeyMapper(); keyMap.init(); jumpn = keyMap.isKeyStrokeDefined("[jumpnext]"); jumpp = keyMap.isKeyStrokeDefined("[jumpprev]"); keyMap.addKeyChangeListener(this); /** * this is taken out right now look at the method for description */ initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/7b1c394f4b6ff580cadf047e50a5f3e073aec994/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java |
|
if (peer != null) | if (peer != null && !isLightweight()) | public void requestFocus () { if (isDisplayable () && isShowing () && isFocusable ()) { synchronized (getTreeLock ()) { // Find this Component's top-level ancestor. Container parent = getParent (); while (parent != null && !(parent instanceof Window)) parent = parent.getParent (); Window toplevel = (Window) parent; if (toplevel.isFocusableWindow ()) { if (peer != null) // This call will cause a FOCUS_GAINED event to be // posted to the system event queue if the native // windowing system grants the focus request. peer.requestFocus (); else { // Either our peer hasn't been created yet or we're a // lightweight component. In either case we want to // post a FOCUS_GAINED event. EventQueue eq = Toolkit.getDefaultToolkit ().getSystemEventQueue (); eq.postEvent (new FocusEvent(this, FocusEvent.FOCUS_GAINED)); } } else pendingFocusRequest = new FocusEvent(this, FocusEvent.FOCUS_GAINED); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/566e4ab93ebc97794094572536829e581d565b11/Component.java/buggy/core/src/classpath/java/java/awt/Component.java |
eq.postEvent (new FocusEvent(this, FocusEvent.FOCUS_GAINED)); | synchronized (eq) { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); Component currentFocusOwner = manager.getGlobalPermanentFocusOwner (); if (currentFocusOwner != null) { eq.postEvent (new FocusEvent(currentFocusOwner, FocusEvent.FOCUS_LOST, false, this)); eq.postEvent (new FocusEvent(this, FocusEvent.FOCUS_GAINED, false, currentFocusOwner)); } else eq.postEvent (new FocusEvent(this, FocusEvent.FOCUS_GAINED, false)); } | public void requestFocus () { if (isDisplayable () && isShowing () && isFocusable ()) { synchronized (getTreeLock ()) { // Find this Component's top-level ancestor. Container parent = getParent (); while (parent != null && !(parent instanceof Window)) parent = parent.getParent (); Window toplevel = (Window) parent; if (toplevel.isFocusableWindow ()) { if (peer != null) // This call will cause a FOCUS_GAINED event to be // posted to the system event queue if the native // windowing system grants the focus request. peer.requestFocus (); else { // Either our peer hasn't been created yet or we're a // lightweight component. In either case we want to // post a FOCUS_GAINED event. EventQueue eq = Toolkit.getDefaultToolkit ().getSystemEventQueue (); eq.postEvent (new FocusEvent(this, FocusEvent.FOCUS_GAINED)); } } else pendingFocusRequest = new FocusEvent(this, FocusEvent.FOCUS_GAINED); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/566e4ab93ebc97794094572536829e581d565b11/Component.java/buggy/core/src/classpath/java/java/awt/Component.java |
public void setLayer(Component c, int layer, int position) | public void setLayer(Component c, int layer) | public void setLayer(Component c, int layer, int position) { remove(c); add(c, getObjectForLayer (layer)); setPosition(c, position); revalidate(); repaint(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JLayeredPane.java/buggy/core/src/classpath/javax/javax/swing/JLayeredPane.java |
remove(c); add(c, getObjectForLayer (layer)); setPosition(c, position); revalidate(); repaint(); | componentToLayer.put (c, getObjectForLayer (layer)); | public void setLayer(Component c, int layer, int position) { remove(c); add(c, getObjectForLayer (layer)); setPosition(c, position); revalidate(); repaint(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JLayeredPane.java/buggy/core/src/classpath/javax/javax/swing/JLayeredPane.java |
else if (location.length() > 0) { if (location.charAt(0) == '/') { file = location; } else { int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } | public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } ByteArrayResponseBodyReader reader = new ByteArrayResponseBodyReader(); request.setResponseBodyReader(reader); if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); if (response.getCodeClass() == 3 && getInstanceFollowRedirects()) { // Follow redirect String location = response.getHeader("Location"); String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } // Otherwise this is not an HTTP redirect, can't follow } else { responseSink = new ByteArrayInputStream(reader.toByteArray ()); } } while (retry); connected = true; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50ebba0d91a0b466e3ffe17154f32921bffb910d/HTTPURLConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java |
|
if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } | public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } ByteArrayResponseBodyReader reader = new ByteArrayResponseBodyReader(); request.setResponseBodyReader(reader); if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); if (response.getCodeClass() == 3 && getInstanceFollowRedirects()) { // Follow redirect String location = response.getHeader("Location"); String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } // Otherwise this is not an HTTP redirect, can't follow } else { responseSink = new ByteArrayInputStream(reader.toByteArray ()); } } while (retry); connected = true; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50ebba0d91a0b466e3ffe17154f32921bffb910d/HTTPURLConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java |
|
hostnameVerifier = defaultVerifier; factory = defaultFactory; | protected HttpsURLConnection(URL url) throws IOException { super(url); hostnameVerifier = defaultVerifier; factory = defaultFactory; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/HttpsURLConnection.java/buggy/core/src/classpath/javax/javax/net/ssl/HttpsURLConnection.java |
|
if (factory == null) { factory = getDefaultSSLSocketFactory(); } | public SSLSocketFactory getSSLSocketFactory() { return factory; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/HttpsURLConnection.java/buggy/core/src/classpath/javax/javax/net/ssl/HttpsURLConnection.java |
|
if (hostnameVerifier == null) { hostnameVerifier = getDefaultHostnameVerifier(); } | public HostnameVerifier getHostnameVerifier() { return hostnameVerifier; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/HttpsURLConnection.java/buggy/core/src/classpath/javax/javax/net/ssl/HttpsURLConnection.java |
|
public HTTPConnection(String hostname, int port, boolean secure) | public HTTPConnection(String hostname) | public HTTPConnection(String hostname, int port, boolean secure) { this(hostname, port, secure, 0, 0); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50ebba0d91a0b466e3ffe17154f32921bffb910d/HTTPConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java |
this(hostname, port, secure, 0, 0); | this(hostname, HTTP_PORT, false, 0, 0); | public HTTPConnection(String hostname, int port, boolean secure) { this(hostname, port, secure, 0, 0); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50ebba0d91a0b466e3ffe17154f32921bffb910d/HTTPConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java |
public String toUpperCase() | public String toUpperCase(Locale loc) | public String toUpperCase() { return toUpperCase(Locale.getDefault()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
return toUpperCase(Locale.getDefault()); | boolean turkish = "tr".equals(loc.getLanguage()); int expand = 0; boolean unchanged = true; int i = count; int x = i + offset; while (--i >= 0) { char ch = value[--x]; expand += upperCaseExpansion(ch); unchanged = (unchanged && expand == 0 && ! (turkish && ch == '\u0069') && ch == Character.toUpperCase(ch)); } if (unchanged) return this; i = count; if (expand == 0) { char[] newStr = (char[]) value.clone(); while (--i >= 0) { char ch = value[x]; newStr[x++] = (turkish && ch == '\u0069') ? '\u0130' : Character.toUpperCase(ch); } return new String(newStr, offset, count, true); } char[] newStr = new char[count + expand]; int j = 0; while (--i >= 0) { char ch = value[x++]; if (turkish && ch == '\u0069') { newStr[j++] = '\u0130'; continue; } expand = upperCaseExpansion(ch); if (expand > 0) { int index = upperCaseIndex(ch); while (expand-- >= 0) newStr[j++] = upperExpand[index++]; } else newStr[j++] = Character.toUpperCase(ch); } return new String(newStr, 0, newStr.length, true); | public String toUpperCase() { return toUpperCase(Locale.getDefault()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
catch (ThreadDeath death) { throw death; } | 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(); if (!(obj instanceof Toolkit)) throw new AWTError(toolkit_name + " is not a subclass of " + "java.awt.Toolkit"); toolkit = (Toolkit) obj; return toolkit; } catch (Throwable t) { AWTError e = new AWTError("Cannot load AWT toolkit: " + toolkit_name); throw (AWTError) e.initCause(t); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/Toolkit.java/clean/core/src/classpath/java/java/awt/Toolkit.java |
|
m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { | for (int x = 0; x < os400_sessions.size(); x++ ) { | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame1.getWidth(); int height = m.frame1.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(My5250.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(My5250.getParm("-height",args)); } m.frame1.setSize(width,height); m.frame1.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); } LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null;// } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs == null && sessions.containsKey("emul.view") && sessions.containsKey("emul.startLastView")) { String[] sargs = new String[NUM_PARMS]; parseArgs(sessions.getProperty("emul.view"), sargs); m.sessionArgs = sargs; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < m.sessionArgs.length; x++) { if (m.sessionArgs[x] != null) { if (m.sessionArgs[x].equals("-s")) { x++; if (m.sessionArgs[x] != null && sessions.containsKey(m.sessionArgs[x])) { os400_sessions.addElement(m.sessionArgs[x]); }else{ x--; session_params.addElement(m.sessionArgs[x]); } }else{ session_params.addElement(m.sessionArgs[x]); } } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame1.isVisible()) { m.splash.updateProgress(++m.step); m.splash.setVisible(false); m.frame1.setVisible(true); m.frame1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/19dc1b070137112bdf2dfc4b4b0f4e82bbf7c94a/My5250.java/buggy/tn5250j/src/org/tn5250j/My5250.java |
progress = prog; repaint(); | progress = prog; repaint(); | public synchronized void updateProgress(int prog) { progress = prog; repaint(); // wait for it to be painted to ensure progress is updated // continuously// try {// wait();// }// catch(InterruptedException ie) {// System.out.println(" updateProgress " + ie.getMessage() );// } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/59507b16b426e754b9b93873a6ca81633fe0897f/TN5250jSplashScreen.java/buggy/tn5250j/src/org/tn5250j/gui/TN5250jSplashScreen.java |
try { wait(); } catch(InterruptedException ie) { System.out.println(" updateProgress " + ie.getMessage() ); } | public synchronized void updateProgress(int prog) { progress = prog; repaint(); // wait for it to be painted to ensure progress is updated // continuously// try {// wait();// }// catch(InterruptedException ie) {// System.out.println(" updateProgress " + ie.getMessage() );// } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/59507b16b426e754b9b93873a6ca81633fe0897f/TN5250jSplashScreen.java/buggy/tn5250j/src/org/tn5250j/gui/TN5250jSplashScreen.java |
|
public Socket(String host, int port) throws UnknownHostException, IOException | public Socket() | public Socket(String host, int port) throws UnknownHostException, IOException { this(InetAddress.getByName(host), port, null, 0, true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/Socket.java/buggy/core/src/classpath/java/java/net/Socket.java |
this(InetAddress.getByName(host), port, null, 0, true); | if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); | public Socket(String host, int port) throws UnknownHostException, IOException { this(InetAddress.getByName(host), port, null, 0, true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/Socket.java/buggy/core/src/classpath/java/java/net/Socket.java |
public static void setLookAndFeel(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException | public static void setLookAndFeel(LookAndFeel newLookAndFeel) throws UnsupportedLookAndFeelException | public static void setLookAndFeel(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { Class c = Class.forName(className); LookAndFeel a = (LookAndFeel) c.newInstance(); // throws class-cast-exception setLookAndFeel(a); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/UIManager.java/buggy/core/src/classpath/javax/javax/swing/UIManager.java |
Class c = Class.forName(className); LookAndFeel a = (LookAndFeel) c.newInstance(); setLookAndFeel(a); | if (newLookAndFeel != null && ! newLookAndFeel.isSupportedLookAndFeel()) throw new UnsupportedLookAndFeelException(newLookAndFeel.getName()); LookAndFeel oldLookAndFeel = currentLookAndFeel; if (oldLookAndFeel != null) oldLookAndFeel.uninitialize(); currentLookAndFeel = newLookAndFeel; if (newLookAndFeel != null) { newLookAndFeel.initialize(); currentUIDefaults = newLookAndFeel.getDefaults(); } else { currentUIDefaults = null; } listeners.firePropertyChange("lookAndFeel", oldLookAndFeel, newLookAndFeel); | public static void setLookAndFeel(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { Class c = Class.forName(className); LookAndFeel a = (LookAndFeel) c.newInstance(); // throws class-cast-exception setLookAndFeel(a); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/UIManager.java/buggy/core/src/classpath/javax/javax/swing/UIManager.java |
session.addSessionListener(this); | public SessionGUI (Session5250 session) { super(session); this.configurationResource = session.getConfigurationResource(); this.sessionName = session.getSessionName(); sesProps = session.sesProps; sce = new SessionChangeEvent(this); session.getConfiguration().addSessionConfigListener(this); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/ab81b6cdf373299f99830eac067d8b5f89c79453/SessionGUI.java/buggy/tn5250j/src/org/tn5250j/SessionGUI.java |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.