rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
public ExceptionInInitializerError(String s) { super(s); exception = null;
|
public ExceptionInInitializerError() { this((String) null);
|
public ExceptionInInitializerError(String s) { super(s); exception = null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/ExceptionInInitializerError.java/buggy/core/src/classpath/java/java/lang/ExceptionInInitializerError.java
|
public Object getAny(int index) {
|
public final Object getAny(int index) {
|
public Object getAny(int index) { return get(index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
|
return(parent.getAlignmentX());
|
return 0.5F;
|
public float getLayoutAlignmentX(Container parent) { return(parent.getAlignmentX()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/BorderLayout.java/clean/core/src/classpath/java/java/awt/BorderLayout.java
|
return(parent.getAlignmentY());
|
return 0.5F;
|
public float getLayoutAlignmentY(Container parent) { return(parent.getAlignmentY()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/BorderLayout.java/clean/core/src/classpath/java/java/awt/BorderLayout.java
|
if (treeModelListener == null) treeModelListener = createTreeModelListener(); model.addTreeModelListener(treeModelListener);
|
public void setModel(TreeModel model) { if (treeModel == model) return; TreeModel oldValue = treeModel; treeModel = model; firePropertyChange(TREE_MODEL_PROPERTY, oldValue, model); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/JTree.java/clean/core/src/classpath/javax/javax/swing/JTree.java
|
|
if (name.getTagClass() != DER.APPLICATION) throw new IOException("malformed GeneralName");
|
int tagClass = name.getTagClass(); if (tagClass != DER.CONTEXT) throw new IOException("malformed GeneralName: Tag class is " + tagClass);
|
public GeneralNames(final byte[] encoded) throws IOException { names = new LinkedList(); DERReader der = new DERReader(encoded); DERValue nameList = der.read(); if (!nameList.isConstructed()) throw new IOException("malformed GeneralNames"); int len = 0; while (len < nameList.getLength()) { DERValue name = der.read(); List namePair = new ArrayList(2); if (name.getTagClass() != DER.APPLICATION) throw new IOException("malformed GeneralName"); namePair.add(new Integer(name.getTag())); DERValue val = null; switch (name.getTag()) { case RFC822_NAME: case DNS_NAME: case X400_ADDRESS: case URI: namePair.add(new String((byte[]) name.getValue())); break; case OTHER_NAME: case EDI_PARTY_NAME: namePair.add(name.getValue()); break; case DIRECTORY_NAME: byte[] b = name.getEncoded(); b[0] = (byte) (DER.CONSTRUCTED|DER.SEQUENCE); namePair.add(new X500DistinguishedName(b).toString()); break; case IP_ADDRESS: namePair.add(InetAddress.getByAddress((byte[]) name.getValue()) .getHostAddress()); break; case REGISTERED_ID: byte[] bb = name.getEncoded(); bb[0] = (byte) DER.OBJECT_IDENTIFIER; namePair.add(new OID(bb).toString()); break; default: throw new IOException("unknown tag " + name.getTag()); } names.add(namePair); len += name.getEncodedLength(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/GeneralNames.java/buggy/core/src/classpath/gnu/gnu/java/security/x509/ext/GeneralNames.java
|
namePair.add(new X500DistinguishedName(b).toString());
|
DERReader r = new DERReader (b); r.read (); namePair.add(new X500Principal(r.read ().getEncoded ()).toString());
|
public GeneralNames(final byte[] encoded) throws IOException { names = new LinkedList(); DERReader der = new DERReader(encoded); DERValue nameList = der.read(); if (!nameList.isConstructed()) throw new IOException("malformed GeneralNames"); int len = 0; while (len < nameList.getLength()) { DERValue name = der.read(); List namePair = new ArrayList(2); if (name.getTagClass() != DER.APPLICATION) throw new IOException("malformed GeneralName"); namePair.add(new Integer(name.getTag())); DERValue val = null; switch (name.getTag()) { case RFC822_NAME: case DNS_NAME: case X400_ADDRESS: case URI: namePair.add(new String((byte[]) name.getValue())); break; case OTHER_NAME: case EDI_PARTY_NAME: namePair.add(name.getValue()); break; case DIRECTORY_NAME: byte[] b = name.getEncoded(); b[0] = (byte) (DER.CONSTRUCTED|DER.SEQUENCE); namePair.add(new X500DistinguishedName(b).toString()); break; case IP_ADDRESS: namePair.add(InetAddress.getByAddress((byte[]) name.getValue()) .getHostAddress()); break; case REGISTERED_ID: byte[] bb = name.getEncoded(); bb[0] = (byte) DER.OBJECT_IDENTIFIER; namePair.add(new OID(bb).toString()); break; default: throw new IOException("unknown tag " + name.getTag()); } names.add(namePair); len += name.getEncodedLength(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/GeneralNames.java/buggy/core/src/classpath/gnu/gnu/java/security/x509/ext/GeneralNames.java
|
public X500DistinguishedName(byte[] encoded) throws IOException
|
public X500DistinguishedName(String name)
|
public X500DistinguishedName(byte[] encoded) throws IOException { this(new ByteArrayInputStream(encoded)); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/X500DistinguishedName.java/buggy/core/src/classpath/gnu/gnu/java/security/x509/X500DistinguishedName.java
|
this(new ByteArrayInputStream(encoded));
|
if (name == null) throw new NullPointerException(); try { parseDN(name, true); } catch (Exception e) { parseDN(name, false); }
|
public X500DistinguishedName(byte[] encoded) throws IOException { this(new ByteArrayInputStream(encoded)); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/X500DistinguishedName.java/buggy/core/src/classpath/gnu/gnu/java/security/x509/X500DistinguishedName.java
|
public PopupMenuUI() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/PopupMenuUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/PopupMenuUI.java
|
||
else { System.err.println("WARNING: Tried to replace elements "); System.err.print("beyond boundaries: elementCount: "); System.err.println(e.getElementCount()); System.err.print("index: " + curr.index); System.err.println(", removed.length: " + removed.length); } }
|
public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.pos = offset; this.endOffset = offset + length; this.length = length; documentEvent = ev; edits.removeAllElements(); elementStack.removeAllElements(); lastFractured = null; fracNotCreated = false; insertUpdate(data); // This for loop applies all the changes that were made and updates the // DocumentEvent. int size = edits.size(); for (int i = 0; i < size; i++) { Edit curr = (Edit) edits.get(i); BranchElement e = (BranchElement) curr.e; Element[] removed = curr.getRemovedElements(); Element[] added = curr.getAddedElements(); // FIXME: We probably shouldn't create the empty Element[] in the // first place. if (removed.length > 0 || added.length > 0) { e.replace(curr.index, removed.length, added); ElementEdit ee = new ElementEdit(e, curr.index, removed, added); ev.addEdit(ee); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
|
|
private String getFixedLength(byte[] cByte,FileFieldDef f) { sb.setLength(0); switch (f.getFieldType()) { case 'P': case 'S': // rb.append(f.parseData(cByte).trim() + delimiter); sb.append(f.parseData(cByte)); while (sb.length() < f.getFieldLength()) sb.insert(0,' '); break; default: // rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter); sb.append(f.parseData(cByte)); while (sb.length() < f.getFieldLength()) sb.append(' '); break; } return sb.toString(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
||
private String getFixedLength(byte[] cByte,FileFieldDef f) { sb.setLength(0); switch (f.getFieldType()) { case 'P': case 'S': // rb.append(f.parseData(cByte).trim() + delimiter); sb.append(f.parseData(cByte)); while (sb.length() < f.getFieldLength()) sb.insert(0,' '); break; default: // rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter); sb.append(f.parseData(cByte)); while (sb.length() < f.getFieldLength()) sb.append(' '); break; } return sb.toString(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
||
public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldType()) { case 'P': case 'S':// rb.append(f.parseData(cByte).trim() + delimiter); rb.append(getFixedLength(cByte,f)); break; default:// rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter);// rb.append(f.parseData(cByte)); rb.append(getFixedLength(cByte,f)); break; } } } rb.append ('\n'); fout.println(rb); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
||
public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldType()) { case 'P': case 'S':// rb.append(f.parseData(cByte).trim() + delimiter); rb.append(getFixedLength(cByte,f)); break; default:// rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter);// rb.append(f.parseData(cByte)); rb.append(getFixedLength(cByte,f)); break; } } } rb.append ('\n'); fout.println(rb); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
||
public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldType()) { case 'P': case 'S':// rb.append(f.parseData(cByte).trim() + delimiter); rb.append(getFixedLength(cByte,f)); break; default:// rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter);// rb.append(f.parseData(cByte)); rb.append(getFixedLength(cByte,f)); break; } } } rb.append ('\n'); fout.println(rb); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
||
rb.append ('\n');
|
public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldType()) { case 'P': case 'S':// rb.append(f.parseData(cByte).trim() + delimiter); rb.append(getFixedLength(cByte,f)); break; default:// rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter);// rb.append(f.parseData(cByte)); rb.append(getFixedLength(cByte,f)); break; } } } rb.append ('\n'); fout.println(rb); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
|
public void setCustomProperties() {// new DelimitedDialog(new JFrame()); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
||
try { FileFieldDef f; StringBuffer sb = new StringBuffer(); for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName()); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) { }
|
public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { try { FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName()); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) {// printFTPInfo(" error writing header " + ioe.getMessage()); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d168ed72700f29af0ae56810df6fe5dbdb8a8a8c/FixedWidthOutputFilter.java/clean/tn5250j/src/org/tn5250j/tools/filters/FixedWidthOutputFilter.java
|
|
synchronized (f)
|
JPanel modalInterceptor = new JPanel(); modalInterceptor.setOpaque(false); JLayeredPane lp = JLayeredPane.getLayeredPaneAbove(f); lp.setLayer(modalInterceptor, JLayeredPane.MODAL_LAYER.intValue()); modalInterceptor.setBounds(0, 0, lp.getWidth(), lp.getHeight()); modalInterceptor.addMouseListener(new MouseAdapter(){}); modalInterceptor.addMouseMotionListener(new MouseMotionAdapter(){}); lp.add(modalInterceptor); f.toFront(); EventQueue queue = Toolkit.getDefaultToolkit().getSystemEventQueue(); try
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter()
|
while (! f.isClosed())
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
public void internalFrameClosed(InternalFrameEvent e)
|
if (EventQueue.isDispatchThread())
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
synchronized (tmp)
|
AWTEvent ev = queue.getNextEvent(); if (ev instanceof ActiveEvent) ((ActiveEvent) ev).dispatch(); else if (ev.getSource() instanceof Component) ((Component) ev.getSource()).dispatchEvent(ev); else if (ev.getSource() instanceof MenuComponent) ((MenuComponent) ev.getSource()).dispatchEvent(ev); } else
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
tmp.removeInternalFrameListener(this); tmp.notifyAll();
|
Thread.yield();
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
}); try
|
} catch (InterruptedException ex)
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
while (! f.isClosed()) f.wait();
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
|
catch (InterruptedException ignored) { }
|
finally { lp.remove(modalInterceptor); Container parent = f.getParent(); if (parent != null) parent.remove(f);
|
private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this); tmp.notifyAll(); } } }); try { while (! f.isClosed()) f.wait(); } catch (InterruptedException ignored) { // Ignore this Exception. } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent();
|
public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent();
|
public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); while (next_in == next_out) wait(); AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/EventQueue.java/buggy/core/src/classpath/java/java/awt/EventQueue.java
|
while (next_in == next_out) wait();
|
ClasspathToolkit tk = ((ClasspathToolkit) Toolkit.getDefaultToolkit()); long curr = System.currentTimeMillis();
|
public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); while (next_in == next_out) wait(); AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/EventQueue.java/buggy/core/src/classpath/java/java/awt/EventQueue.java
|
AWTEvent res = queue[next_out];
|
if (!tk.nativeQueueEmpty() && (curr - lastNativeQueueAccess > humanLatencyThreshold)) { tk.iterateNativeQueue(this, false); lastNativeQueueAccess = curr; }
|
public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); while (next_in == next_out) wait(); AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/EventQueue.java/buggy/core/src/classpath/java/java/awt/EventQueue.java
|
if (++next_out == queue.length) next_out = 0; return res; }
|
while (next_in == next_out) { if (isDispatchThread()) { if (isShutdown()) throw new InterruptedException(); tk.iterateNativeQueue(this, true); lastNativeQueueAccess = System.currentTimeMillis(); } else { try { wait(); } catch (InterruptedException ie) { } } } AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; }
|
public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); while (next_in == next_out) wait(); AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/EventQueue.java/buggy/core/src/classpath/java/java/awt/EventQueue.java
|
public void dispatch();
|
void dispatch();
|
public void dispatch();
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/ActiveEvent.java/buggy/core/src/classpath/java/java/awt/ActiveEvent.java
|
{
|
{ Event oldStyleEvent = Component.translateEvent(event); if (oldStyleEvent != null) { postEvent(oldStyleEvent); }
|
public final void dispatchEvent(AWTEvent event){ // See comment in Component.dispatchEvent(). dispatchEventImpl(event);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuComponent.java/buggy/core/src/classpath/java/java/awt/MenuComponent.java
|
}
|
}
|
public final void dispatchEvent(AWTEvent event){ // See comment in Component.dispatchEvent(). dispatchEventImpl(event);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MenuComponent.java/buggy/core/src/classpath/java/java/awt/MenuComponent.java
|
textComponent.setCaretPosition(caretPos - ev.getLength());
|
textComponent.setCaretPosition(ev.getOffset());
|
public void removeUpdate(DocumentEvent ev) { Dimension size = textComponent.getSize(); rootView.removeUpdate(ev, new Rectangle(0, 0, size.width, size.height), BasicTextUI.this); int caretPos = textComponent.getCaretPosition(); if (caretPos >= ev.getOffset()) textComponent.setCaretPosition(caretPos - ev.getLength()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
|
bad.minor = Minor.Any;
|
public static NameDynAnyPair[] extract(Any any) { try { return ((NameDynAnyPairSeqHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("NameDynAnyPairSeq expected"); bad.initCause(cex); throw bad; } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/NameDynAnyPairSeqHelper.java/buggy/core/src/classpath/org/org/omg/DynamicAny/NameDynAnyPairSeqHelper.java
|
|
try { throw new MARSHAL("The read/write are not applicable for " + Id); } catch (Exception e) { throw new MARSHAL(); }
|
MARSHAL m = new MARSHAL("The read/write are not applicable for " + Id); m.minor = Minor.Inappropriate; throw m;
|
static String not_applicable(String Id) { try { throw new MARSHAL("The read/write are not applicable for " + Id); } catch (Exception e) { throw new MARSHAL(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/DynAnyFactoryHelper.java/buggy/core/src/classpath/org/org/omg/DynamicAny/DynAnyFactoryHelper.java
|
this.name = name; this.syntaxes = syntaxes; }
|
this.name = name; this.syntaxes = syntaxes; }
|
public Info(String name, Syntax[] syntaxes) { this.name = name; this.syntaxes = syntaxes; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].complete(partial.getRemainder()); } catch (CompletionException ex) { } } System.out.println(); usage(); throw new CompletionException("Invalid command syntax"); }
|
String max = ""; for (int i = 0; i < syntaxes.length; i++) { try { final String s = syntaxes[ i].complete(partial .getRemainder()); if (s.length() > max.length()) { max = s; } } catch (CompletionException ex) { } } if (max.length() > 0) { return max; } else { System.out.println(); usage(); throw new CompletionException("Invalid command syntax"); } }
|
public String complete(CommandLine partial) throws CompletionException { //System.out.println("completing \"" + partial + "\""); for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].complete(partial.getRemainder()); } catch (CompletionException ex) { // this syntax is not fitting // following debug output is for testing the "intelligent" delegation mechanism // System.err.println("Syntax \"" + syntaxes[i].getDescription() + "\" threw " // + ex.toString()); } } System.out.println(); usage(); throw new CompletionException("Invalid command syntax"); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
return name; }
|
return name; }
|
public String getName() { return name; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
return syntaxes; }
|
return syntaxes; }
|
public Syntax[] getSyntaxes() { return syntaxes; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
public void help() { Help.getHelp().help(this); }
|
public void help() throws HelpException { Help.getHelp().help(this); }
|
public void help() { Help.getHelp().help(this); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
public ParsedArguments parse(String[] args) throws SyntaxError { for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].parse(args); } catch (SyntaxError ex) { } }
|
public ParsedArguments parse(String[] args) throws SyntaxErrorException { for (int i = 0; i < syntaxes.length; i++) { final Syntax s = syntaxes[ i]; try { return s.parse(args); } catch (SyntaxErrorException ex) { s.clearArguments(); } }
|
public ParsedArguments parse(String[] args) throws SyntaxError { for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].parse(args); } catch (SyntaxError ex) { // debug output to debug syntax finding mechanism //System.err.println(ex.toString()); //ex.printStackTrace(System.out); } } // no fitting Syntax found? trow an error throw new SyntaxError("No matching syntax found"); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
throw new SyntaxError("No matching syntax found"); }
|
throw new SyntaxErrorException("No matching syntax found"); }
|
public ParsedArguments parse(String[] args) throws SyntaxError { for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].parse(args); } catch (SyntaxError ex) { // debug output to debug syntax finding mechanism //System.err.println(ex.toString()); //ex.printStackTrace(System.out); } } // no fitting Syntax found? trow an error throw new SyntaxError("No matching syntax found"); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
Help.getHelp().usage(this); }
|
try { Help.getHelp().usage(this); } catch (HelpException ex) { ex.printStackTrace(); } }
|
public void usage() { Help.getHelp().usage(this); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
try { return (Help) InitialNaming.lookup(NAME); } catch (NamingException ex) { throw new HelpException("Help application not found"); } }
|
try { return (Help) InitialNaming.lookup(NAME); } catch (NamingException ex) { throw new HelpException("Help application not found"); } }
|
public static Help getHelp() throws HelpException { try { return (Help) InitialNaming.lookup(NAME); } catch (NamingException ex) { throw new HelpException("Help application not found"); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
try { Field helpInfo = clazz.getField(INFO_FIELD_NAME); return (Help.Info) helpInfo.get(null); } catch (NoSuchFieldException ex) { throw new HelpException("Command information not found"); } catch (IllegalAccessException ex) { throw new HelpException("Command information not accessible"); } }
|
try { Field helpInfo = clazz.getField(INFO_FIELD_NAME); return (Help.Info) helpInfo.get(null); } catch (NoSuchFieldException ex) { throw new HelpException("Command information not found"); } catch (IllegalAccessException ex) { throw new HelpException("Command information not accessible"); } }
|
public static Info getInfo(Class clazz) throws HelpException { try { Field helpInfo = clazz.getField(INFO_FIELD_NAME); return (Help.Info) helpInfo.get(null); // static access } catch (NoSuchFieldException ex) { throw new HelpException("Command information not found"); } catch (IllegalAccessException ex) { throw new HelpException("Command information not accessible"); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/Help.java/clean/shell/src/shell/org/jnode/shell/help/Help.java
|
if (!up || pause)
|
if (!isUp() || pause)
|
public void keyPressed(KeyEvent e) { int kc = e.getKeyCode(); if (kc == KeyEvent.VK_N) { newGame(); return; } if (kc == KeyEvent.VK_P) { flipPause(); return; } if (!up || pause) return; switch (e.getKeyCode()) { case KeyEvent.VK_UP: rot(1); break; case KeyEvent.VK_LEFT: trans(-1); break; case KeyEvent.VK_DOWN: rot(3); break; case KeyEvent.VK_RIGHT: trans(1); break; case KeyEvent.VK_SPACE: fall(); break; case KeyEvent.VK_N: newGame(); break; case KeyEvent.VK_P: flipPause(); break; default: return; } repaint(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
if (thread != null) { up = false;
|
setUp(false); if (thread != null) {
|
public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1) WORLD[i][j] = COLORS.length - 1; else WORLD[i][j] = 0; } } requestFocus(); end = false; score = 0; si = si_rnd.nextInt(7); next_si = si_rnd.nextInt(7); bi = bi_rnd.nextInt(4); next_bi = bi_rnd.nextInt(4); x = 1 + bi_rnd.nextInt((WIDTH_C - DIMS[si * 4 + bi][0])); y = 0; thread = new Thread(new Runnable() { public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } } }); thread.start(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
up = true;
|
public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1) WORLD[i][j] = COLORS.length - 1; else WORLD[i][j] = 0; } } requestFocus(); end = false; score = 0; si = si_rnd.nextInt(7); next_si = si_rnd.nextInt(7); bi = bi_rnd.nextInt(4); next_bi = bi_rnd.nextInt(4); x = 1 + bi_rnd.nextInt((WIDTH_C - DIMS[si * 4 + bi][0])); y = 0; thread = new Thread(new Runnable() { public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } } }); thread.start(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
|
stop: while (up) {
|
stop: while (isUp()) {
|
public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1) WORLD[i][j] = COLORS.length - 1; else WORLD[i][j] = 0; } } requestFocus(); end = false; score = 0; si = si_rnd.nextInt(7); next_si = si_rnd.nextInt(7); bi = bi_rnd.nextInt(4); next_bi = bi_rnd.nextInt(4); x = 1 + bi_rnd.nextInt((WIDTH_C - DIMS[si * 4 + bi][0])); y = 0; thread = new Thread(new Runnable() { public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } } }); thread.start(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
if (!up)
|
if (!isUp())
|
public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1) WORLD[i][j] = COLORS.length - 1; else WORLD[i][j] = 0; } } requestFocus(); end = false; score = 0; si = si_rnd.nextInt(7); next_si = si_rnd.nextInt(7); bi = bi_rnd.nextInt(4); next_bi = bi_rnd.nextInt(4); x = 1 + bi_rnd.nextInt((WIDTH_C - DIMS[si * 4 + bi][0])); y = 0; thread = new Thread(new Runnable() { public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } } }); thread.start(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
up = false;
|
setUp(false);
|
public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1) WORLD[i][j] = COLORS.length - 1; else WORLD[i][j] = 0; } } requestFocus(); end = false; score = 0; si = si_rnd.nextInt(7); next_si = si_rnd.nextInt(7); bi = bi_rnd.nextInt(4); next_bi = bi_rnd.nextInt(4); x = 1 + bi_rnd.nextInt((WIDTH_C - DIMS[si * 4 + bi][0])); y = 0; thread = new Thread(new Runnable() { public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } } }); thread.start(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
thread.start();
|
setUp(true); thread.start();
|
public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1) WORLD[i][j] = COLORS.length - 1; else WORLD[i][j] = 0; } } requestFocus(); end = false; score = 0; si = si_rnd.nextInt(7); next_si = si_rnd.nextInt(7); bi = bi_rnd.nextInt(4); next_bi = bi_rnd.nextInt(4); x = 1 + bi_rnd.nextInt((WIDTH_C - DIMS[si * 4 + bi][0])); y = 0; thread = new Thread(new Runnable() { public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } } }); thread.start(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
up = true;
|
public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
|
stop: while (up) {
|
stop: while (isUp()) {
|
public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
if (!up)
|
if (!isUp())
|
public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
up = false;
|
setUp(false);
|
public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from waiting"); } catch (InterruptedException ignore) { } if (!up) break stop; } } if (hasRoom(bi, x, y + 1)) { y++; repaint(); } else { newBlock(); if (!hasRoom(bi, x, y)) { up = false; end = true; repaint(); } } after = System.currentTimeMillis(); sleep = delay - (after - before); sleep = sleep < 0 ? delay : sleep; try { Thread.sleep(sleep); } catch (InterruptedException ignore) { } } } catch (Throwable ex) { ex.printStackTrace(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
if (up) {
|
if (isUp()) {
|
public void paint(Graphics g) { if (img == null) { img = createImage(DIM.width, DIM.height); } Graphics g2 = img.getGraphics(); g2.setColor(COLORS[0]); g2.fillRect(0, 0, DIM.width, DIM.height); for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { int ci = WORLD[i][j]; if (ci > 0) paintBox(g2, i, j, COLORS[ci]); } } { Color c = COLORS[COLORS.length - 1]; for (int i = 0; i < WIDTH_C + 2; i++) { paintBox(g2, i, HEIGHT_C + 6, c); } for (int j = 0; j < 4; j++) { paintBox(g2, 0, HEIGHT_C + 2 + j, c); paintBox(g2, 5, HEIGHT_C + 2 + j, c); // paintBox(g2, 6, HEIGHT_C + 2 +j, c ); paintBox(g2, WIDTH_C + 1, HEIGHT_C + 2 + j, c); } } if (up) { int[][] b = BLOCKS[si][bi]; for (int i = 0; i < b.length; i++) { paintBox(g2, x + b[i][0], y + b[i][1], COLORS[si + 1]); } { g2.setColor(Color.WHITE); g2.drawString("SCORE:", CELL + 2, (HEIGHT_C + 4) * CELL - 4); g2.drawString(String.valueOf(score), 2 * CELL, (HEIGHT_C + 5) * CELL - 4); b = BLOCKS[next_si][next_bi]; for (int i = 0; i < b.length; i++) { paintBox(g2, 7 + b[i][0], HEIGHT_C + 2 + b[i][1], COLORS[next_si + 1]); } } } else if (end) { g2.setColor(Color.BLACK); g2.fillRect(2 * CELL, 9 * CELL, 8 * CELL, 4 * CELL); g2.setColor(Color.WHITE); g2.drawRect(2 * CELL, 9 * CELL, 8 * CELL, 4 * CELL); g2.drawString("GAME OVER! SCORE: " + score, (WIDTH_C - 6) * CELL / 2 + 2, (HEIGHT_C + 2) * CELL / 2); } g2.dispose(); g.drawImage(img, 0, 0, this); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a7b4ee3280e71ad6d7ac6e9f4a61a3c297f8bb8b/Tetris.java/buggy/gui/src/test/org/jnode/test/gui/Tetris.java
|
super(toolkit, choice, new JComboBox()); this.choice = choice; final JComboBox combo = (JComboBox)jComponent; combo.setModel(new DefaultComboBoxModel());
|
super(toolkit, choice, new SwingChoice(choice)); final JComboBox combo = (JComboBox) jComponent; combo.setModel(new DefaultComboBoxModel());
|
public SwingChoicePeer(SwingToolkit toolkit, Choice choice) { super(toolkit, choice, new JComboBox()); this.choice = choice; final JComboBox combo = (JComboBox)jComponent; combo.setModel(new DefaultComboBoxModel()); SwingToolkit.add(choice, combo); SwingToolkit.copyAwtProperties(choice, combo); final int cnt = choice.getItemCount(); for (int i = 0; i < cnt; i++) { addItem(choice.getItem(i), i); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingChoicePeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingChoicePeer.java
|
model().insertElementAt(item, index);
|
model().insertElementAt(item, index);
|
public void add(String item, int index) { model().insertElementAt(item, index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingChoicePeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingChoicePeer.java
|
return ((DefaultComboBoxModel)((JComboBox)jComponent).getModel()); }
|
return ((DefaultComboBoxModel) ((JComboBox) jComponent).getModel()); }
|
private DefaultComboBoxModel model() { return ((DefaultComboBoxModel)((JComboBox)jComponent).getModel()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingChoicePeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingChoicePeer.java
|
model().removeElementAt(index); }
|
model().removeElementAt(index); }
|
public void remove(int index) { model().removeElementAt(index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingChoicePeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingChoicePeer.java
|
model().removeAllElements(); }
|
model().removeAllElements(); }
|
public void removeAll() { model().removeAllElements(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingChoicePeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingChoicePeer.java
|
((JComboBox)jComponent).setSelectedIndex(index);
|
((JComboBox) jComponent).setSelectedIndex(index);
|
public void select(int index) { ((JComboBox)jComponent).setSelectedIndex(index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingChoicePeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingChoicePeer.java
|
public abstract void addItem(String item, int index);
|
void addItem (String item, int index);
|
public abstract void addItem(String item, int index);
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/ChoicePeer.java/buggy/core/src/classpath/java/java/awt/peer/ChoicePeer.java
|
public static final DateFormat getTimeInstance (int style, Locale loc)
|
public static final DateFormat getTimeInstance ()
|
public static final DateFormat getTimeInstance (int style, Locale loc) { return computeInstance (style, loc, false, true); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/DateFormat.java/clean/core/src/classpath/java/java/text/DateFormat.java
|
return computeInstance (style, loc, false, true);
|
return getTimeInstance (DEFAULT, Locale.getDefault());
|
public static final DateFormat getTimeInstance (int style, Locale loc) { return computeInstance (style, loc, false, true); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/DateFormat.java/clean/core/src/classpath/java/java/text/DateFormat.java
|
public static Locale[] getAvailableLocales()
|
public static synchronized Locale[] getAvailableLocales()
|
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/Locale.java/buggy/core/src/classpath/java/java/util/Locale.java
|
/* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[]
|
if (availableLocales == null)
|
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/Locale.java/buggy/core/src/classpath/java/java/util/Locale.java
|
ENGLISH, FRENCH, GERMAN, new Locale("ga", "") };
|
String[] localeNames = LocaleData.localeNames; availableLocales = new Locale[localeNames.length]; for (int i = 0; i < localeNames.length; i++) { String language; String region = ""; String variant = ""; String name = localeNames[i]; language = name.substring(0, 2); if (name.length() > 2) region = name.substring(3); int index = region.indexOf("_"); if (index > 0) { variant = region.substring(index + 1); region = region.substring(0, index - 1); } availableLocales[i] = getLocale(language, region, variant); } } return availableLocales;
|
public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/Locale.java/buggy/core/src/classpath/java/java/util/Locale.java
|
empty = false;
|
void clear(int index) { offset = index; this.index = 0; for (int i = 0; i < start.length; i++) { start[i] = end[i] = -1; } next = null; // cut off alternates empty = false; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/REMatch.java/clean/core/src/classpath/gnu/gnu/regexp/REMatch.java
|
|
}
|
public void menuDeselected(MenuEvent e) { JMenu menu = (JMenu) menuItem; if (menu.isTopLevelMenu()) ((JMenuBar) menu.getParent()).getSelectionModel().clearSelection(); else ((JPopupMenu) menu.getParent()).getSelectionModel().clearSelection(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/BasicMenuUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuUI.java
|
|
lookup_time = System.currentTimeMillis();
|
InetAddress(byte[] ipaddr, String hostname) { addr = (null == ipaddr) ? null : (byte[]) ipaddr.clone(); hostName = hostname; lookup_time = System.currentTimeMillis(); family = 2; /* AF_INET */ }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/InetAddress.java/buggy/core/src/classpath/java/java/net/InetAddress.java
|
|
if (hostname == null)
|
if (hostname == null || hostname.equals(""))
|
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/InetAddress.java/buggy/core/src/classpath/java/java/net/InetAddress.java
|
addresses = checkCacheFor(hostname); if (addresses != null) return addresses;
|
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/InetAddress.java/buggy/core/src/classpath/java/java/net/InetAddress.java
|
|
addToCache(hostname, addresses);
|
public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new InetAddress[1]; addresses[0] = LOCALHOST; return addresses; } // Check the cache for this host before doing a lookup addresses = checkCacheFor(hostname); if (addresses != null) return addresses; // Not in cache, try the lookup byte[][] iplist = VMInetAddress.getHostByName(hostname); if (iplist.length == 0) throw new UnknownHostException(hostname); addresses = new InetAddress[iplist.length]; for (int i = 0; i < iplist.length; i++) { if (iplist[i].length != 4) throw new UnknownHostException(hostname); addresses[i] = new Inet4Address(iplist[i], hostname); } addToCache(hostname, addresses); return addresses; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/InetAddress.java/buggy/core/src/classpath/java/java/net/InetAddress.java
|
|
inaddr_any.hostName = inaddr_any.getHostName();
|
static InetAddress getInaddrAny() throws UnknownHostException { if (inaddr_any == null) { byte[] tmp = VMInetAddress.lookupInaddrAny(); inaddr_any = new Inet4Address(tmp, null); } return inaddr_any; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/InetAddress.java/buggy/core/src/classpath/java/java/net/InetAddress.java
|
|
Inet4Address(byte[] addr, String host)
|
Inet4Address(byte[] addr)
|
Inet4Address(byte[] addr, String host) { this(addr, host, null); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Inet4Address.java/buggy/core/src/classpath/java/java/net/Inet4Address.java
|
this(addr, host, null);
|
this(addr, null, null);
|
Inet4Address(byte[] addr, String host) { this(addr, host, null); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Inet4Address.java/buggy/core/src/classpath/java/java/net/Inet4Address.java
|
}
|
}
|
public void actionPerformed(ActionEvent e) { Object value = new Integer(JOptionPane.CLOSED_OPTION); Object[] options = optionPane.getOptions(); if (options != null) value = new Integer(buttonIndex); else { String text = ((JButton) e.getSource()).getText(); if (text.equals(OK_STRING)) value = new Integer(JOptionPane.OK_OPTION); if (text.equals(CANCEL_STRING)) value = new Integer(JOptionPane.CANCEL_OPTION); if (text.equals(YES_STRING)) value = new Integer(JOptionPane.YES_OPTION); if (text.equals(NO_STRING)) value = new Integer(JOptionPane.NO_OPTION); } optionPane.setValue(value); resetInputValue(); Window owner = SwingUtilities.windowForComponent(optionPane); if (owner instanceof JDialog) ((JDialog) owner).dispose(); //else we probably have some kind of internal frame. JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(JInternalFrame.class, optionPane); if (inf != null) { try { inf.setClosed(true); } catch (PropertyVetoException pve) { } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public ButtonAreaLayout(boolean syncAllWidths, int padding) { this.syncAllWidths = syncAllWidths; this.padding = padding; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public void addLayoutComponent(String string, Component comp) { // Do nothing. }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
else
|
else
|
private int buttonRowLength(Container c) { Component[] buttonList = c.getComponents(); int buttonLength = 0; int widest = 0; int tallest = 0; for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); buttonLength += dims.width + getPadding(); widest = Math.max(widest, dims.width); tallest = Math.max(tallest, dims.height); } widthOfWidestButton = widest; tallestButton = tallest; int width; if (getSyncAllWidths()) width = widest * buttonList.length + getPadding() * (buttonList.length - 1); else width = buttonLength; Insets insets = c.getInsets(); width += insets.left + insets.right; return width; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public boolean getCentersChildren() { return centersChildren; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public boolean getCentersChildren() { return centersChildren; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public int getPadding() { return padding; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public boolean getSyncAllWidths() { return syncAllWidths; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public void layoutContainer(Container container) { Component[] buttonList = container.getComponents(); int x = container.getInsets().left; if (getCentersChildren()) x += (int) ((double) (container.getSize().width) / 2 - (double) (buttonRowLength(container)) / 2); for (int i = 0; i < buttonList.length; i++) { Dimension dims = buttonList[i].getPreferredSize(); if (syncAllWidths) { buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height); x += widthOfWidestButton + getPadding(); } else { buttonList[i].setBounds(x, 0, dims.width, dims.height); x += dims.width + getPadding(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
{
|
{
|
public Dimension preferredLayoutSize(Container c) { int w = buttonRowLength(c); return new Dimension(w, tallestButton); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public Dimension preferredLayoutSize(Container c) { int w = buttonRowLength(c); return new Dimension(w, tallestButton); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public void removeLayoutComponent(Component c) { // Do nothing. }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public void setCentersChildren(boolean newValue) { centersChildren = newValue; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public void setPadding(int newPadding) { padding = newPadding; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
}
|
}
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JOptionPane.ICON_PROPERTY) || e.getPropertyName().equals(JOptionPane.MESSAGE_TYPE_PROPERTY)) addIcon(messageAreaContainer); else if (e.getPropertyName().equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY)) resetSelectedValue(); else if (e.getPropertyName().equals(JOptionPane.INITIAL_VALUE_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTIONS_PROPERTY) || e.getPropertyName().equals(JOptionPane.OPTION_TYPE_PROPERTY)) { Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons; } else if (e.getPropertyName().equals(JOptionPane.MESSAGE_PROPERTY) || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY) || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY)) { optionPane.removeAll(); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); optionPane.add(buttonContainer); } optionPane.invalidate(); optionPane.repaint(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.