rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
super(toolkit, label, new JLabel()); final JLabel jLabel = (JLabel)jComponent; this.label = label;
super(toolkit, label, new SwingLabel(label)); final JLabel jLabel = (JLabel) jComponent;
public SwingLabelPeer(SwingToolkit toolkit, Label label) { super(toolkit, label, new JLabel()); final JLabel jLabel = (JLabel)jComponent; this.label = label; SwingToolkit.add(label, jLabel); SwingToolkit.copyAwtProperties(label, jLabel); setText(label.getText()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java
public void setAlignment(int alignment) { //TODO implement it }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java
((JLabel)jComponent).setText(text); }
((JLabel) jComponent).setText(text); }
public void setText(String text) { ((JLabel)jComponent).setText(text); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java
File directory2 = new File(GlobalConfigure.instance().getProperty(
File directory2 = new File(GlobalConfigure.getInstance().getProperty(
private static boolean checkScripts() { File directory = new File("scripts"); File directory2 = new File(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts"); return directory.isDirectory() || directory2.isDirectory(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/Macronizer.java/buggy/tn5250j/src/org/tn5250j/tools/Macronizer.java
public String getProperty(String key) { return "";
public String getProperty(String key, String def) { return def;
public String getProperty(String key) { return ""; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
public Array setParentArray(Array parentArray) {
protected Array setParentArray(Array parentArray) {
public Array setParentArray(Array parentArray) { Log.debug("in XMLDataIOStyle, setParentArray()"); this.parentArray = parentArray; return parentArray; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/5ccaa0a39fcc8791fa01673a52183b2075616638/XMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //get attribute info Hashtable xmlInfo = getXMLInfo(); //write out attributes ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); synchronized(attribs) { //sync, prevent the attribs' structure be changed int stop = attribs.size(); for (int i = 0; i < stop; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/5ccaa0a39fcc8791fa01673a52183b2075616638/XMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
Hashtable xmlInfo = getXMLInfo();
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //get attribute info Hashtable xmlInfo = getXMLInfo(); //write out attributes ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); synchronized(attribs) { //sync, prevent the attribs' structure be changed int stop = attribs.size(); for (int i = 0; i < stop; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/5ccaa0a39fcc8791fa01673a52183b2075616638/XMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
synchronized(attribHash) { String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib);
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //get attribute info Hashtable xmlInfo = getXMLInfo(); //write out attributes ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); synchronized(attribs) { //sync, prevent the attribs' structure be changed int stop = attribs.size(); for (int i = 0; i < stop; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/5ccaa0a39fcc8791fa01673a52183b2075616638/XMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); synchronized(attribs) { int stop = attribs.size(); for (int i = 0; i < stop; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); }
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //get attribute info Hashtable xmlInfo = getXMLInfo(); //write out attributes ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); synchronized(attribs) { //sync, prevent the attribs' structure be changed int stop = attribs.size(); for (int i = 0; i < stop; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/5ccaa0a39fcc8791fa01673a52183b2075616638/XMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
public DesktopIconUI() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/DesktopIconUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/DesktopIconUI.java
part0 = new MappedBlockDeviceSupport(device, pte.getStartLba()
part0 = new MappedFSBlockDeviceSupport(device, pte.getStartLba()
protected void formatDevice(Device device) throws IOException { /* Format the MBR & partitiontable */ GrubBootSector mbr = (GrubBootSector) (createFormatter() .getBootSector()); mbr.getPartition(0).clear(); mbr.getPartition(1).clear(); mbr.getPartition(2).clear(); mbr.getPartition(3).clear(); IBMPartitionTableEntry pte = mbr.getPartition(0); pte.setBootIndicator(true); pte.setStartLba(1); pte.setNrSectors(geom.getTotalSectors() - 1); pte.setSystemIndicator(IBMPartitionTypes.PARTTYPE_DOS_FAT16_LT32M); pte.setStartCHS(geom.getCHS(pte.getStartLba())); pte.setEndCHS(geom.getCHS(pte.getStartLba() + pte.getNrSectors() - 1)); /* * System.out.println("partition table:"); for (int i = 0; i < 4; i++) { * System.out.println("" + i + " " + mbr.getPartition(i)); } */ /* Format partition 0 */ part0 = new MappedBlockDeviceSupport(device, pte.getStartLba() * bytesPerSector, pte.getNrSectors() * bytesPerSector); GrubFatFormatter ff = createFormatter(); ff.setInstallPartition(0x0000FFFF); ff.format(part0); GrubBootSector part0bs = (GrubBootSector) ff.getBootSector(); /* Fixup stage2 sector in MBR */ mbr.setStage2Sector(pte.getStartLba() + part0bs.getStage2Sector()); try { mbr.write((BlockDeviceAPI) device.getAPI(BlockDeviceAPI.class)); } catch (ApiNotFoundException ex) { throw new IOException("BlockDeviceAPI not found on device", ex); } //System.out.println("mbr stage2 sector=" + mbr.getStage2Sector()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/af3e25629c7bca20276f004befd3b45af9fa6102/BootDiskBuilder.java/buggy/builder/src/builder/org/jnode/build/BootDiskBuilder.java
int unresolved = 0;
int unresolvedFound = 0;
private final void emitObjects(NativeStream os, VmArchitecture arch, Set blockObjects) throws BuildException { log("Emitting objects", Project.MSG_DEBUG); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } final boolean skip; if (blockObjects == null) { skip = false; } else { skip = blockObjects.contains(obj); } if (!skip) { //if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
unresolved++;
unresolvedFound++;
private final void emitObjects(NativeStream os, VmArchitecture arch, Set blockObjects) throws BuildException { log("Emitting objects", Project.MSG_DEBUG); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } final boolean skip; if (blockObjects == null) { skip = false; } else { skip = blockObjects.contains(obj); } if (!skip) { //if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
private final void emitObjects(NativeStream os, VmArchitecture arch, Set blockObjects) throws BuildException { log("Emitting objects", Project.MSG_DEBUG); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } final boolean skip; if (blockObjects == null) { skip = false; } else { skip = blockObjects.contains(obj); } if (!skip) { //if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
if (blockObjects == null) { emittedClassNames.add(obj.getClass().getName()); }
private final void emitObjects(NativeStream os, VmArchitecture arch, Set blockObjects) throws BuildException { log("Emitting objects", Project.MSG_DEBUG); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } final boolean skip; if (blockObjects == null) { skip = false; } else { skip = blockObjects.contains(obj); } if (!skip) { //if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) {
if (unresolvedFound == lastUnresolved) { if (unresolvedFound == 0) {
private final void emitObjects(NativeStream os, VmArchitecture arch, Set blockObjects) throws BuildException { log("Emitting objects", Project.MSG_DEBUG); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } final boolean skip; if (blockObjects == null) { skip = false; } else { skip = blockObjects.contains(obj); } if (!skip) { //if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
lastUnresolved = unresolved;
lastUnresolved = unresolvedFound;
private final void emitObjects(NativeStream os, VmArchitecture arch, Set blockObjects) throws BuildException { log("Emitting objects", Project.MSG_DEBUG); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } final boolean skip; if (blockObjects == null) { skip = false; } else { skip = blockObjects.contains(obj); } if (!skip) { //if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
if (blockObjects == null) { log("Emitted classes: " + emittedClassNames); }
private final void emitObjects(NativeStream os, VmArchitecture arch, Set blockObjects) throws BuildException { log("Emitting objects", Project.MSG_DEBUG); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } final boolean skip; if (blockObjects == null) { skip = false; } else { skip = blockObjects.contains(obj); } if (!skip) { //if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (blockObjects != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPluginList(); lmPI = piList.lastModified(); } catch (PluginException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } if ((lmJar < lmDest) && (lmKernel < lmDest) && (lmPIL < lmDest) && (lmPI < lmDest)) { // No need to do anything, skip return; } try { System.getProperties().setProperty(BUILDTIME_PROPERTY, "1"); // Load the plugin descriptors final PluginRegistry piRegistry; piRegistry = new PluginRegistryModel(piList.getDescriptorUrlList()); testPluginPrerequisites(piRegistry); /* Now create the processor */ final VmArchitecture arch = getArchitecture(); final NativeStream os = createNativeStream(); clsMgr = new VmClassLoader(classesURL, arch, new BuildObjectResolver(os, this)); blockedObjects.add(clsMgr); blockedObjects.add(clsMgr.getStatics()); blockedObjects.add(clsMgr.getStatics().getTable()); // Create the VM final Vm vm = new Vm(arch, new DefaultHeapManager(clsMgr)); blockedObjects.add(vm); final VmProcessor proc = createProcessor(clsMgr.getStatics()); log("Building for " + proc.getCPUID()); final Label clInitCaller = new Label("$$clInitCaller"); VmType systemClasses[] = VmType.initializeForBootImage(clsMgr); for (int i = 0; i < systemClasses.length; i++) { clsMgr.addLoadedClass(systemClasses[i].getName(), systemClasses[i]); } // First copy the native kernel file copyKernel(os); os.setObjectRef(bootHeapStart); // Setup a call to our first java method initImageHeader(os, clInitCaller, vm, piRegistry); // Create the initial stack createInitialStack(os, initialStack, initialStackPtr); /* Now load the classes */ loadClass(VmMethodCode.class); loadClass(Unsafe.class); loadClass(VmClassLoader.class); loadClass(VmType[].class); loadClass(Vm.class); loadClass(VmBootHeap.class); loadClass(VmDefaultHeap.class); loadClass(VmHeapManager.class); loadClass(vm.getHeapManager().getClass()); /* Now emit the processor */ os.getObjectRef(proc); /* Let the compilers load its native symbol offsets */ final NativeCodeCompiler[] cmps = arch.getCompilers(); for (int i = 0; i < cmps.length; i++) { final NativeCodeCompiler cmp = cmps[i]; cmp.initialize(clsMgr); os.getObjectRef(cmp); } for (Iterator i = BootClasses.values().iterator(); i.hasNext();) { BootClassInfo bci = (BootClassInfo) i.next(); if (!bci.isPackage()) { clsMgr.loadClass(bci.getName(), true); } } // Load the jarfile as byte-array copyJarFile(os); // Now emit all object images to the actual image emitObjects(os, arch, blockedObjects); /* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, blockedObjects); // Disallow the loading of new classes clsMgr.setFailOnNewLoad(true); // Turn auto-compilation on clsMgr.setCompileRequired(); // Emit the remaining objects emitObjects(os, arch, null); /* Write static initializer code */ emitStaticInitializerCalls(os, bootClasses, clInitCaller); // This is the end of the image X86Stream.ObjectInfo dummyObjectAtEnd = os.startObject(loadClass(VmMethodCode.class)); pageAlign(os); dummyObjectAtEnd.markEnd(); os.setObjectRef(imageEnd); os.setObjectRef(bootHeapEnd); /* Link all native symbols */ linkNativeSymbols(os); // Patch multiboot header patchHeader(os); // Store the image storeImage(os); // Generate the listfile printLabels(os, bootClasses); // Generate debug info for (int i = 0; i < cmps.length; i++) { cmps[i].dumpStatistics(); } final int bootHeapSize = os.getObjectRef(bootHeapEnd).getOffset() - os.getObjectRef(bootHeapStart).getOffset(); final int bootHeapBitmapSize = (bootHeapSize / ObjectLayout.OBJECT_ALIGN) >> 3; log("Boot heap size " + (bootHeapSize >>> 10) + "K bitmap size " + (bootHeapBitmapSize >>> 10) + "K"); clsMgr.getStatics().dumpStatistics(); log("Done."); } catch (Throwable ex) { ex.printStackTrace(); throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPluginList(); lmPI = piList.lastModified(); } catch (PluginException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } if ((lmJar < lmDest) && (lmKernel < lmDest) && (lmPIL < lmDest) && (lmPI < lmDest)) { // No need to do anything, skip return; } try { System.getProperties().setProperty(BUILDTIME_PROPERTY, "1"); // Load the plugin descriptors final PluginRegistry piRegistry; piRegistry = new PluginRegistryModel(piList.getDescriptorUrlList()); testPluginPrerequisites(piRegistry); /* Now create the processor */ final VmArchitecture arch = getArchitecture(); final NativeStream os = createNativeStream(); clsMgr = new VmClassLoader(classesURL, arch, new BuildObjectResolver(os, this)); blockedObjects.add(clsMgr); blockedObjects.add(clsMgr.getStatics()); blockedObjects.add(clsMgr.getStatics().getTable()); // Create the VM final Vm vm = new Vm(arch, new DefaultHeapManager(clsMgr)); blockedObjects.add(vm); final VmProcessor proc = createProcessor(clsMgr.getStatics()); log("Building for " + proc.getCPUID()); final Label clInitCaller = new Label("$$clInitCaller"); VmType systemClasses[] = VmType.initializeForBootImage(clsMgr); for (int i = 0; i < systemClasses.length; i++) { clsMgr.addLoadedClass(systemClasses[i].getName(), systemClasses[i]); } // First copy the native kernel file copyKernel(os); os.setObjectRef(bootHeapStart); // Setup a call to our first java method initImageHeader(os, clInitCaller, vm, piRegistry); // Create the initial stack createInitialStack(os, initialStack, initialStackPtr); /* Now load the classes */ loadClass(VmMethodCode.class); loadClass(Unsafe.class); loadClass(VmClassLoader.class); loadClass(VmType[].class); loadClass(Vm.class); loadClass(VmBootHeap.class); loadClass(VmDefaultHeap.class); loadClass(VmHeapManager.class); loadClass(vm.getHeapManager().getClass()); /* Now emit the processor */ os.getObjectRef(proc); /* Let the compilers load its native symbol offsets */ final NativeCodeCompiler[] cmps = arch.getCompilers(); for (int i = 0; i < cmps.length; i++) { final NativeCodeCompiler cmp = cmps[i]; cmp.initialize(clsMgr); os.getObjectRef(cmp); } for (Iterator i = BootClasses.values().iterator(); i.hasNext();) { BootClassInfo bci = (BootClassInfo) i.next(); if (!bci.isPackage()) { clsMgr.loadClass(bci.getName(), true); } } // Load the jarfile as byte-array copyJarFile(os); // Now emit all object images to the actual image emitObjects(os, arch, blockedObjects); /* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, blockedObjects); // Disallow the loading of new classes clsMgr.setFailOnNewLoad(true); // Turn auto-compilation on clsMgr.setCompileRequired(); // Emit the remaining objects emitObjects(os, arch, null); /* Write static initializer code */ emitStaticInitializerCalls(os, bootClasses, clInitCaller); // This is the end of the image X86Stream.ObjectInfo dummyObjectAtEnd = os.startObject(loadClass(VmMethodCode.class)); pageAlign(os); dummyObjectAtEnd.markEnd(); os.setObjectRef(imageEnd); os.setObjectRef(bootHeapEnd); /* Link all native symbols */ linkNativeSymbols(os); // Patch multiboot header patchHeader(os); // Store the image storeImage(os); // Generate the listfile printLabels(os, bootClasses); // Generate debug info for (int i = 0; i < cmps.length; i++) { cmps[i].dumpStatistics(); } final int bootHeapSize = os.getObjectRef(bootHeapEnd).getOffset() - os.getObjectRef(bootHeapStart).getOffset(); final int bootHeapBitmapSize = (bootHeapSize / ObjectLayout.OBJECT_ALIGN) >> 3; log("Boot heap size " + (bootHeapSize >>> 10) + "K bitmap size " + (bootHeapBitmapSize >>> 10) + "K"); clsMgr.getStatics().dumpStatistics(); log("Done."); } catch (Throwable ex) { ex.printStackTrace(); throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPluginList(); lmPI = piList.lastModified(); } catch (PluginException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } if ((lmJar < lmDest) && (lmKernel < lmDest) && (lmPIL < lmDest) && (lmPI < lmDest)) { // No need to do anything, skip return; } try { System.getProperties().setProperty(BUILDTIME_PROPERTY, "1"); // Load the plugin descriptors final PluginRegistry piRegistry; piRegistry = new PluginRegistryModel(piList.getDescriptorUrlList()); testPluginPrerequisites(piRegistry); /* Now create the processor */ final VmArchitecture arch = getArchitecture(); final NativeStream os = createNativeStream(); clsMgr = new VmClassLoader(classesURL, arch, new BuildObjectResolver(os, this)); blockedObjects.add(clsMgr); blockedObjects.add(clsMgr.getStatics()); blockedObjects.add(clsMgr.getStatics().getTable()); // Create the VM final Vm vm = new Vm(arch, new DefaultHeapManager(clsMgr)); blockedObjects.add(vm); final VmProcessor proc = createProcessor(clsMgr.getStatics()); log("Building for " + proc.getCPUID()); final Label clInitCaller = new Label("$$clInitCaller"); VmType systemClasses[] = VmType.initializeForBootImage(clsMgr); for (int i = 0; i < systemClasses.length; i++) { clsMgr.addLoadedClass(systemClasses[i].getName(), systemClasses[i]); } // First copy the native kernel file copyKernel(os); os.setObjectRef(bootHeapStart); // Setup a call to our first java method initImageHeader(os, clInitCaller, vm, piRegistry); // Create the initial stack createInitialStack(os, initialStack, initialStackPtr); /* Now load the classes */ loadClass(VmMethodCode.class); loadClass(Unsafe.class); loadClass(VmClassLoader.class); loadClass(VmType[].class); loadClass(Vm.class); loadClass(VmBootHeap.class); loadClass(VmDefaultHeap.class); loadClass(VmHeapManager.class); loadClass(vm.getHeapManager().getClass()); /* Now emit the processor */ os.getObjectRef(proc); /* Let the compilers load its native symbol offsets */ final NativeCodeCompiler[] cmps = arch.getCompilers(); for (int i = 0; i < cmps.length; i++) { final NativeCodeCompiler cmp = cmps[i]; cmp.initialize(clsMgr); os.getObjectRef(cmp); } for (Iterator i = BootClasses.values().iterator(); i.hasNext();) { BootClassInfo bci = (BootClassInfo) i.next(); if (!bci.isPackage()) { clsMgr.loadClass(bci.getName(), true); } } // Load the jarfile as byte-array copyJarFile(os); // Now emit all object images to the actual image emitObjects(os, arch, blockedObjects); /* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, blockedObjects); // Disallow the loading of new classes clsMgr.setFailOnNewLoad(true); // Turn auto-compilation on clsMgr.setCompileRequired(); // Emit the remaining objects emitObjects(os, arch, null); /* Write static initializer code */ emitStaticInitializerCalls(os, bootClasses, clInitCaller); // This is the end of the image X86Stream.ObjectInfo dummyObjectAtEnd = os.startObject(loadClass(VmMethodCode.class)); pageAlign(os); dummyObjectAtEnd.markEnd(); os.setObjectRef(imageEnd); os.setObjectRef(bootHeapEnd); /* Link all native symbols */ linkNativeSymbols(os); // Patch multiboot header patchHeader(os); // Store the image storeImage(os); // Generate the listfile printLabels(os, bootClasses); // Generate debug info for (int i = 0; i < cmps.length; i++) { cmps[i].dumpStatistics(); } final int bootHeapSize = os.getObjectRef(bootHeapEnd).getOffset() - os.getObjectRef(bootHeapStart).getOffset(); final int bootHeapBitmapSize = (bootHeapSize / ObjectLayout.OBJECT_ALIGN) >> 3; log("Boot heap size " + (bootHeapSize >>> 10) + "K bitmap size " + (bootHeapBitmapSize >>> 10) + "K"); clsMgr.getStatics().dumpStatistics(); log("Done."); } catch (Throwable ex) { ex.printStackTrace(); throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPluginList(); lmPI = piList.lastModified(); } catch (PluginException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } if ((lmJar < lmDest) && (lmKernel < lmDest) && (lmPIL < lmDest) && (lmPI < lmDest)) { // No need to do anything, skip return; } try { System.getProperties().setProperty(BUILDTIME_PROPERTY, "1"); // Load the plugin descriptors final PluginRegistry piRegistry; piRegistry = new PluginRegistryModel(piList.getDescriptorUrlList()); testPluginPrerequisites(piRegistry); /* Now create the processor */ final VmArchitecture arch = getArchitecture(); final NativeStream os = createNativeStream(); clsMgr = new VmClassLoader(classesURL, arch, new BuildObjectResolver(os, this)); blockedObjects.add(clsMgr); blockedObjects.add(clsMgr.getStatics()); blockedObjects.add(clsMgr.getStatics().getTable()); // Create the VM final Vm vm = new Vm(arch, new DefaultHeapManager(clsMgr)); blockedObjects.add(vm); final VmProcessor proc = createProcessor(clsMgr.getStatics()); log("Building for " + proc.getCPUID()); final Label clInitCaller = new Label("$$clInitCaller"); VmType systemClasses[] = VmType.initializeForBootImage(clsMgr); for (int i = 0; i < systemClasses.length; i++) { clsMgr.addLoadedClass(systemClasses[i].getName(), systemClasses[i]); } // First copy the native kernel file copyKernel(os); os.setObjectRef(bootHeapStart); // Setup a call to our first java method initImageHeader(os, clInitCaller, vm, piRegistry); // Create the initial stack createInitialStack(os, initialStack, initialStackPtr); /* Now load the classes */ loadClass(VmMethodCode.class); loadClass(Unsafe.class); loadClass(VmClassLoader.class); loadClass(VmType[].class); loadClass(Vm.class); loadClass(VmBootHeap.class); loadClass(VmDefaultHeap.class); loadClass(VmHeapManager.class); loadClass(vm.getHeapManager().getClass()); /* Now emit the processor */ os.getObjectRef(proc); /* Let the compilers load its native symbol offsets */ final NativeCodeCompiler[] cmps = arch.getCompilers(); for (int i = 0; i < cmps.length; i++) { final NativeCodeCompiler cmp = cmps[i]; cmp.initialize(clsMgr); os.getObjectRef(cmp); } for (Iterator i = BootClasses.values().iterator(); i.hasNext();) { BootClassInfo bci = (BootClassInfo) i.next(); if (!bci.isPackage()) { clsMgr.loadClass(bci.getName(), true); } } // Load the jarfile as byte-array copyJarFile(os); // Now emit all object images to the actual image emitObjects(os, arch, blockedObjects); /* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, blockedObjects); // Disallow the loading of new classes clsMgr.setFailOnNewLoad(true); // Turn auto-compilation on clsMgr.setCompileRequired(); // Emit the remaining objects emitObjects(os, arch, null); /* Write static initializer code */ emitStaticInitializerCalls(os, bootClasses, clInitCaller); // This is the end of the image X86Stream.ObjectInfo dummyObjectAtEnd = os.startObject(loadClass(VmMethodCode.class)); pageAlign(os); dummyObjectAtEnd.markEnd(); os.setObjectRef(imageEnd); os.setObjectRef(bootHeapEnd); /* Link all native symbols */ linkNativeSymbols(os); // Patch multiboot header patchHeader(os); // Store the image storeImage(os); // Generate the listfile printLabels(os, bootClasses); // Generate debug info for (int i = 0; i < cmps.length; i++) { cmps[i].dumpStatistics(); } final int bootHeapSize = os.getObjectRef(bootHeapEnd).getOffset() - os.getObjectRef(bootHeapStart).getOffset(); final int bootHeapBitmapSize = (bootHeapSize / ObjectLayout.OBJECT_ALIGN) >> 3; log("Boot heap size " + (bootHeapSize >>> 10) + "K bitmap size " + (bootHeapBitmapSize >>> 10) + "K"); clsMgr.getStatics().dumpStatistics(); log("Done."); } catch (Throwable ex) { ex.printStackTrace(); throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
/* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, blockedObjects);
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPluginList(); lmPI = piList.lastModified(); } catch (PluginException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } if ((lmJar < lmDest) && (lmKernel < lmDest) && (lmPIL < lmDest) && (lmPI < lmDest)) { // No need to do anything, skip return; } try { System.getProperties().setProperty(BUILDTIME_PROPERTY, "1"); // Load the plugin descriptors final PluginRegistry piRegistry; piRegistry = new PluginRegistryModel(piList.getDescriptorUrlList()); testPluginPrerequisites(piRegistry); /* Now create the processor */ final VmArchitecture arch = getArchitecture(); final NativeStream os = createNativeStream(); clsMgr = new VmClassLoader(classesURL, arch, new BuildObjectResolver(os, this)); blockedObjects.add(clsMgr); blockedObjects.add(clsMgr.getStatics()); blockedObjects.add(clsMgr.getStatics().getTable()); // Create the VM final Vm vm = new Vm(arch, new DefaultHeapManager(clsMgr)); blockedObjects.add(vm); final VmProcessor proc = createProcessor(clsMgr.getStatics()); log("Building for " + proc.getCPUID()); final Label clInitCaller = new Label("$$clInitCaller"); VmType systemClasses[] = VmType.initializeForBootImage(clsMgr); for (int i = 0; i < systemClasses.length; i++) { clsMgr.addLoadedClass(systemClasses[i].getName(), systemClasses[i]); } // First copy the native kernel file copyKernel(os); os.setObjectRef(bootHeapStart); // Setup a call to our first java method initImageHeader(os, clInitCaller, vm, piRegistry); // Create the initial stack createInitialStack(os, initialStack, initialStackPtr); /* Now load the classes */ loadClass(VmMethodCode.class); loadClass(Unsafe.class); loadClass(VmClassLoader.class); loadClass(VmType[].class); loadClass(Vm.class); loadClass(VmBootHeap.class); loadClass(VmDefaultHeap.class); loadClass(VmHeapManager.class); loadClass(vm.getHeapManager().getClass()); /* Now emit the processor */ os.getObjectRef(proc); /* Let the compilers load its native symbol offsets */ final NativeCodeCompiler[] cmps = arch.getCompilers(); for (int i = 0; i < cmps.length; i++) { final NativeCodeCompiler cmp = cmps[i]; cmp.initialize(clsMgr); os.getObjectRef(cmp); } for (Iterator i = BootClasses.values().iterator(); i.hasNext();) { BootClassInfo bci = (BootClassInfo) i.next(); if (!bci.isPackage()) { clsMgr.loadClass(bci.getName(), true); } } // Load the jarfile as byte-array copyJarFile(os); // Now emit all object images to the actual image emitObjects(os, arch, blockedObjects); /* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, blockedObjects); // Disallow the loading of new classes clsMgr.setFailOnNewLoad(true); // Turn auto-compilation on clsMgr.setCompileRequired(); // Emit the remaining objects emitObjects(os, arch, null); /* Write static initializer code */ emitStaticInitializerCalls(os, bootClasses, clInitCaller); // This is the end of the image X86Stream.ObjectInfo dummyObjectAtEnd = os.startObject(loadClass(VmMethodCode.class)); pageAlign(os); dummyObjectAtEnd.markEnd(); os.setObjectRef(imageEnd); os.setObjectRef(bootHeapEnd); /* Link all native symbols */ linkNativeSymbols(os); // Patch multiboot header patchHeader(os); // Store the image storeImage(os); // Generate the listfile printLabels(os, bootClasses); // Generate debug info for (int i = 0; i < cmps.length; i++) { cmps[i].dumpStatistics(); } final int bootHeapSize = os.getObjectRef(bootHeapEnd).getOffset() - os.getObjectRef(bootHeapStart).getOffset(); final int bootHeapBitmapSize = (bootHeapSize / ObjectLayout.OBJECT_ALIGN) >> 3; log("Boot heap size " + (bootHeapSize >>> 10) + "K bitmap size " + (bootHeapBitmapSize >>> 10) + "K"); clsMgr.getStatics().dumpStatistics(); log("Done."); } catch (Throwable ex) { ex.printStackTrace(); throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
printLabels(os, bootClasses);
printLabels(os, bootClasses, clsMgr.getStatics());
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPluginList(); lmPI = piList.lastModified(); } catch (PluginException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } if ((lmJar < lmDest) && (lmKernel < lmDest) && (lmPIL < lmDest) && (lmPI < lmDest)) { // No need to do anything, skip return; } try { System.getProperties().setProperty(BUILDTIME_PROPERTY, "1"); // Load the plugin descriptors final PluginRegistry piRegistry; piRegistry = new PluginRegistryModel(piList.getDescriptorUrlList()); testPluginPrerequisites(piRegistry); /* Now create the processor */ final VmArchitecture arch = getArchitecture(); final NativeStream os = createNativeStream(); clsMgr = new VmClassLoader(classesURL, arch, new BuildObjectResolver(os, this)); blockedObjects.add(clsMgr); blockedObjects.add(clsMgr.getStatics()); blockedObjects.add(clsMgr.getStatics().getTable()); // Create the VM final Vm vm = new Vm(arch, new DefaultHeapManager(clsMgr)); blockedObjects.add(vm); final VmProcessor proc = createProcessor(clsMgr.getStatics()); log("Building for " + proc.getCPUID()); final Label clInitCaller = new Label("$$clInitCaller"); VmType systemClasses[] = VmType.initializeForBootImage(clsMgr); for (int i = 0; i < systemClasses.length; i++) { clsMgr.addLoadedClass(systemClasses[i].getName(), systemClasses[i]); } // First copy the native kernel file copyKernel(os); os.setObjectRef(bootHeapStart); // Setup a call to our first java method initImageHeader(os, clInitCaller, vm, piRegistry); // Create the initial stack createInitialStack(os, initialStack, initialStackPtr); /* Now load the classes */ loadClass(VmMethodCode.class); loadClass(Unsafe.class); loadClass(VmClassLoader.class); loadClass(VmType[].class); loadClass(Vm.class); loadClass(VmBootHeap.class); loadClass(VmDefaultHeap.class); loadClass(VmHeapManager.class); loadClass(vm.getHeapManager().getClass()); /* Now emit the processor */ os.getObjectRef(proc); /* Let the compilers load its native symbol offsets */ final NativeCodeCompiler[] cmps = arch.getCompilers(); for (int i = 0; i < cmps.length; i++) { final NativeCodeCompiler cmp = cmps[i]; cmp.initialize(clsMgr); os.getObjectRef(cmp); } for (Iterator i = BootClasses.values().iterator(); i.hasNext();) { BootClassInfo bci = (BootClassInfo) i.next(); if (!bci.isPackage()) { clsMgr.loadClass(bci.getName(), true); } } // Load the jarfile as byte-array copyJarFile(os); // Now emit all object images to the actual image emitObjects(os, arch, blockedObjects); /* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, blockedObjects); // Disallow the loading of new classes clsMgr.setFailOnNewLoad(true); // Turn auto-compilation on clsMgr.setCompileRequired(); // Emit the remaining objects emitObjects(os, arch, null); /* Write static initializer code */ emitStaticInitializerCalls(os, bootClasses, clInitCaller); // This is the end of the image X86Stream.ObjectInfo dummyObjectAtEnd = os.startObject(loadClass(VmMethodCode.class)); pageAlign(os); dummyObjectAtEnd.markEnd(); os.setObjectRef(imageEnd); os.setObjectRef(bootHeapEnd); /* Link all native symbols */ linkNativeSymbols(os); // Patch multiboot header patchHeader(os); // Store the image storeImage(os); // Generate the listfile printLabels(os, bootClasses); // Generate debug info for (int i = 0; i < cmps.length; i++) { cmps[i].dumpStatistics(); } final int bootHeapSize = os.getObjectRef(bootHeapEnd).getOffset() - os.getObjectRef(bootHeapStart).getOffset(); final int bootHeapBitmapSize = (bootHeapSize / ObjectLayout.OBJECT_ALIGN) >> 3; log("Boot heap size " + (bootHeapSize >>> 10) + "K bitmap size " + (bootHeapBitmapSize >>> 10) + "K"); clsMgr.getStatics().dumpStatistics(); log("Done."); } catch (Throwable ex) { ex.printStackTrace(); throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
protected final void printLabels(NativeStream os, VmType[] bootClasses) throws BuildException, UnresolvedObjectRefException {
protected final void printLabels(NativeStream os, VmType[] bootClasses, VmStatics statics) throws BuildException, UnresolvedObjectRefException {
protected final void printLabels(NativeStream os, VmType[] bootClasses) throws BuildException, UnresolvedObjectRefException { try { int unresolvedCount = 0; final PrintWriter w = new PrintWriter(new FileWriter(listFile)); // Print a list of boot classes. for (int i = 0; i < bootClasses.length; i++) { final VmType vmClass = bootClasses[i]; w.print("bootclass "); w.print(i); w.print(": "); w.print(vmClass.getName()); if (vmClass instanceof VmClassType) { final int cnt = ((VmClassType) vmClass).getInstanceCount(); if (cnt > 0) { w.print(", "); w.print(cnt); w.print(" instances"); } } int cnt = vmClass.getNoInterfaces(); if (cnt > 0) { w.print(", "); w.print(cnt); w.print(" interfaces"); } w.print(vmClass.isInitialized() ? "" : ", not initialized"); w.println(); } w.println(); // Look for unresolved labels and put all resolved // label into the sorted map. This will be used later // to print to the listing file. final Collection xrefs = os.getObjectRefs(); final SortedMap map = new TreeMap(); for (Iterator i = xrefs.iterator(); i.hasNext();) { NativeStream.ObjectRef ref; ref = (NativeStream.ObjectRef) i.next(); if (!ref.isResolved()) { StringBuffer buf = new StringBuffer(); buf.append(" $" + Integer.toHexString(ref.getOffset())); buf.append("\t" + ref.getObject()); System.err.println("Unresolved label " + buf.toString()); unresolvedCount++; } else { map.put(new Integer(ref.getOffset()), ref); } } if (unresolvedCount > 0) { throw new BuildException("There are " + unresolvedCount + " unresolved labels"); } // Print the listing file. for (Iterator i = map.values().iterator(); i.hasNext();) { final NativeStream.ObjectRef ref; ref = (NativeStream.ObjectRef) i.next(); final Object object = ref.getObject(); w.print('$'); w.print(hex(ref.getOffset() + os.getBaseAddr())); w.print('\t'); w.print(object); w.print(" ("); if (object instanceof VmSystemObject) { final String info = ((VmSystemObject) object).getExtraInfo(); if (info != null) { w.print(info); w.print(", "); } } w.print(object.getClass().getName()); w.println(')'); } w.close(); } catch (IOException ex) { throw new BuildException("Writing list", ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
final int[] table = (int[]) statics.getTable(); for (int i = 0; i < table.length; i++) { w.print(NumberUtils.hex((VmArray.DATA_OFFSET + i) << 2)); w.print(":"); w.print(NumberUtils.hex(statics.getType(i), 2)); w.print("\t"); w.print(NumberUtils.hex(table[i])); w.println(); }
protected final void printLabels(NativeStream os, VmType[] bootClasses) throws BuildException, UnresolvedObjectRefException { try { int unresolvedCount = 0; final PrintWriter w = new PrintWriter(new FileWriter(listFile)); // Print a list of boot classes. for (int i = 0; i < bootClasses.length; i++) { final VmType vmClass = bootClasses[i]; w.print("bootclass "); w.print(i); w.print(": "); w.print(vmClass.getName()); if (vmClass instanceof VmClassType) { final int cnt = ((VmClassType) vmClass).getInstanceCount(); if (cnt > 0) { w.print(", "); w.print(cnt); w.print(" instances"); } } int cnt = vmClass.getNoInterfaces(); if (cnt > 0) { w.print(", "); w.print(cnt); w.print(" interfaces"); } w.print(vmClass.isInitialized() ? "" : ", not initialized"); w.println(); } w.println(); // Look for unresolved labels and put all resolved // label into the sorted map. This will be used later // to print to the listing file. final Collection xrefs = os.getObjectRefs(); final SortedMap map = new TreeMap(); for (Iterator i = xrefs.iterator(); i.hasNext();) { NativeStream.ObjectRef ref; ref = (NativeStream.ObjectRef) i.next(); if (!ref.isResolved()) { StringBuffer buf = new StringBuffer(); buf.append(" $" + Integer.toHexString(ref.getOffset())); buf.append("\t" + ref.getObject()); System.err.println("Unresolved label " + buf.toString()); unresolvedCount++; } else { map.put(new Integer(ref.getOffset()), ref); } } if (unresolvedCount > 0) { throw new BuildException("There are " + unresolvedCount + " unresolved labels"); } // Print the listing file. for (Iterator i = map.values().iterator(); i.hasNext();) { final NativeStream.ObjectRef ref; ref = (NativeStream.ObjectRef) i.next(); final Object object = ref.getObject(); w.print('$'); w.print(hex(ref.getOffset() + os.getBaseAddr())); w.print('\t'); w.print(object); w.print(" ("); if (object instanceof VmSystemObject) { final String info = ((VmSystemObject) object).getExtraInfo(); if (info != null) { w.print(info); w.print(", "); } } w.print(object.getClass().getName()); w.println(')'); } w.close(); } catch (IOException ex) { throw new BuildException("Writing list", ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6c51b2252b587e401cd3a2b2e553206263541af7/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
sesProps.put(SESSION_NAME,sessionName);
if(sessionName == null) sesProps.put(SESSION_TERM_NAME,sesProps.getProperty(SESSION_HOST)); else sesProps.put(SESSION_TERM_NAME,sessionName);
public Session openSession(Properties sesProps, String configurationResource , String sessionName) {// throws TN5250jException { sesProps.put(SESSION_NAME,sessionName); if (configurationResource == null) configurationResource = ""; sesProps.put(SESSION_CONFIG_RESOURCE ,configurationResource); Session newSession = new Session(me,sesProps,configurationResource,sessionName); sessions.addSession(newSession); return newSession; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionManager.java/buggy/tn5250j/src/org/tn5250j/SessionManager.java
public Session item (String sessionName) {
public Session item (int index) {
public Session item (String sessionName) { Session s = null; int x = 0; while (x < sessions.size()) { s = (Session)sessions.get(x); if (s.getSessionName().equals(sessionName)) return s; x++; } return null; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Sessions.java/buggy/tn5250j/src/org/tn5250j/Sessions.java
Session s = null; int x = 0; while (x < sessions.size()) { s = (Session)sessions.get(x); if (s.getSessionName().equals(sessionName)) return s; x++; } return null;
return (Session)sessions.get(index);
public Session item (String sessionName) { Session s = null; int x = 0; while (x < sessions.size()) { s = (Session)sessions.get(x); if (s.getSessionName().equals(sessionName)) return s; x++; } return null; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Sessions.java/buggy/tn5250j/src/org/tn5250j/Sessions.java
log.debug("Removing session: "+session.getSessionName());
protected void removeSession(Session session) { if (session != null) { if (session.isConnected()) session.disconnect(); sessions.remove(session); --count; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Sessions.java/buggy/tn5250j/src/org/tn5250j/Sessions.java
log.debug("adding Session: "+newSession.getSessionName());
protected void addSession(Session newSession) { sessions.add(newSession); if (newSession.isSendKeepAlive() && heartBeater == null) { heartBeater = new Timer(15000,this);// heartBeater = new Timer(3000,this); heartBeater.start(); } ++count; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Sessions.java/buggy/tn5250j/src/org/tn5250j/Sessions.java
}
}
public FileFilter() { // TODO } // FileFilter()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/FileFilter.java/clean/core/src/classpath/javax/javax/swing/filechooser/FileFilter.java
public PluginException(String message, Throwable cause) { super(message, cause);
public PluginException() { super();
public PluginException(String message, Throwable cause) { super(message, cause); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/PluginException.java/buggy/core/src/core/org/jnode/plugin/PluginException.java
public GetPropertyAction(String key, String defaultValue) { this.key = key; this.defaultValue = defaultValue; }
public GetPropertyAction() { }
public GetPropertyAction(String key, String defaultValue) { this.key = key; this.defaultValue = defaultValue; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/511ee4599fec6e0fd95b9d64823beef0c7439ee1/GetPropertyAction.java/buggy/core/src/classpath/gnu/gnu/java/security/action/GetPropertyAction.java
return uiClassID;
return "MenuItemUI";
public String getUIClassID() { return uiClassID; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JMenuItem.java/buggy/core/src/classpath/javax/javax/swing/JMenuItem.java
return "JMenuItem";
return super.paramString();
protected String paramString() { return "JMenuItem"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JMenuItem.java/buggy/core/src/classpath/javax/javax/swing/JMenuItem.java
if (typeCode == null) typeCode = ORB.init().get_primitive_tc(TCKind.tk_objref);
public static TypeCode type() { return typeCode; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/ObjectHelper.java/buggy/core/src/classpath/org/org/omg/CORBA/ObjectHelper.java
final void pushExitStack(VirtualStack vstack) {
final void pushExitStack(ItemFactory ifac, VirtualStack vstack) {
final void pushExitStack(VirtualStack vstack) { vstack.reset(); //vstack.pushAll(outerMethodStack); vstack.pushAll(exitStack); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/InlinedMethodInfo.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/InlinedMethodInfo.java
vstack.pushAll(exitStack);
vstack.pushAll(ifac, exitStack);
final void pushExitStack(VirtualStack vstack) { vstack.reset(); //vstack.pushAll(outerMethodStack); vstack.pushAll(exitStack); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/InlinedMethodInfo.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/InlinedMethodInfo.java
final void pushOuterMethodStack(VirtualStack vstack) { vstack.pushAll(outerMethodStack);
final void pushOuterMethodStack(ItemFactory ifac, VirtualStack vstack) { vstack.pushAll(ifac, outerMethodStack);
final void pushOuterMethodStack(VirtualStack vstack) { vstack.pushAll(outerMethodStack); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/InlinedMethodInfo.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/InlinedMethodInfo.java
return (Vm.getVm().getArch().getByteOrder() == ByteOrder.BIG_ENDIAN); }
return (Vm.getVm().getArch().getByteOrder() == ByteOrder.BIG_ENDIAN); }
static boolean isWordsBigEndian() { return (Vm.getVm().getArch().getByteOrder() == ByteOrder.BIG_ENDIAN); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/VMSystem.java/buggy/core/src/classpath/vm/java/lang/VMSystem.java
public static ItemListener add(ItemListener a, ItemListener b)
public static ComponentListener add(ComponentListener a, ComponentListener b)
public static ItemListener add(ItemListener a, ItemListener b) { return (ItemListener) addInternal(a, b); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/AWTEventMulticaster.java/buggy/core/src/classpath/java/java/awt/AWTEventMulticaster.java
return (ItemListener) addInternal(a, b);
return (ComponentListener) addInternal(a, b);
public static ItemListener add(ItemListener a, ItemListener b) { return (ItemListener) addInternal(a, b); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/AWTEventMulticaster.java/buggy/core/src/classpath/java/java/awt/AWTEventMulticaster.java
void dispatchEventImpl(AWTEvent e)
void dispatchEventImpl (AWTEvent e)
void dispatchEventImpl(AWTEvent e) { if (eventTypeEnabled (e.id)) processEvent(e); }
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
processEvent(e); }
{ if (! Thread.holdsLock(e)) { switch (e.id) { case WindowEvent.WINDOW_GAINED_FOCUS: case WindowEvent.WINDOW_LOST_FOCUS: case KeyEvent.KEY_PRESSED: case KeyEvent.KEY_RELEASED: case KeyEvent.KEY_TYPED: case FocusEvent.FOCUS_GAINED: case FocusEvent.FOCUS_LOST: if (KeyboardFocusManager .getCurrentKeyboardFocusManager() .dispatchEvent(e)) return; } } processEvent (e); } }
void dispatchEventImpl(AWTEvent e) { if (eventTypeEnabled (e.id)) processEvent(e); }
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
param.append(width).append("x").append(height).append("+").append(x) .append("+").append(y);
param.append(x).append(",").append(y).append(",").append(width) .append("x").append(height);
protected String paramString() { StringBuffer param = new StringBuffer(); String name = getName(); if (name != null) param.append(name).append(","); param.append(width).append("x").append(height).append("+").append(x) .append("+").append(y); if (! isValid()) param.append(",invalid"); if (! isVisible()) param.append(",invisible"); if (! isEnabled()) param.append(",disabled"); if (! isOpaque()) param.append(",translucent"); if (isDoubleBuffered()) param.append(",doublebuffered"); return param.toString(); }
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 static ItemListener remove(ItemListener l, ItemListener oldl)
protected EventListener remove(EventListener oldl)
public static ItemListener remove(ItemListener l, ItemListener oldl) { return (ItemListener) removeInternal(l, oldl); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/AWTEventMulticaster.java/buggy/core/src/classpath/java/java/awt/AWTEventMulticaster.java
return (ItemListener) removeInternal(l, oldl);
if (a == oldl) return b; if (b == oldl) return a; if (a instanceof AWTEventMulticaster) { EventListener newa = ((AWTEventMulticaster) a).remove(oldl); if (newa != a) return new AWTEventMulticaster(newa, b); } if (b instanceof AWTEventMulticaster) { EventListener newb = ((AWTEventMulticaster) b).remove(oldl); if (newb != b) return new AWTEventMulticaster(a, newb); } return this;
public static ItemListener remove(ItemListener l, ItemListener oldl) { return (ItemListener) removeInternal(l, oldl); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/AWTEventMulticaster.java/buggy/core/src/classpath/java/java/awt/AWTEventMulticaster.java
os.set32(fldOffset, 0);
switch (jnodeField.getTypeSize()) { case 1: os.set8(fldOffset, 0); break; case 2: os.set16(fldOffset, 0); break; case 4: os.set32(fldOffset, 0); break; default: throw new BuildException("Invalid typesize in: " + jnodeField); }
private void storeObject(int offset, Class<?> cls, Object obj, VmClassType<?> vmType) throws BuildException, ClassNotFoundException, JNodeClassNotFoundException { final Class< ? > sCls = cls.getSuperclass(); if (sCls != null) { final VmClassType< ? > vmSuperType = (VmClassType< ? >) loaderContext .loadClass(sCls.getName(), true); storeObject(offset, sCls, obj, vmSuperType); } try { final FieldInfo fieldInfo = getFieldInfo(cls); // final Field fields[] = cls.getDeclaredFields(); final Field[] fields = fieldInfo.getJdkInstanceFields(); final int len = fields.length; // AccessibleObject.setAccessible(fields, true); for (int i = 0; i < len; i++) { final VmField jnodeField = fieldInfo.getJNodeInstanceField(i); final Field jdkField = fields[i]; final int modifiers = jnodeField.getModifiers(); if ((modifiers & Modifier.STATIC) != 0) { throw new BuildException("Static field in instance list"); } final int fldOffset = offset + ((VmInstanceField) jnodeField).getOffset(); if ((jdkField == null) || ((modifiers & Modifier.TRANSIENT) != 0)) { if (jnodeField.isWide()) { os.set64(fldOffset, 0); } else if (!jnodeField.isPrimitive()) { os.setWord(fldOffset, 0); } else { os.set32(fldOffset, 0); } if (debugWriter != null) { debugWriter.println(jnodeField.getName() + " transient: 0"); } } else if (jnodeField.isPrimitive()) { final Class< ? > fType = jdkField.getType(); if (debugWriter != null) { debugWriter.println(jdkField.getName() + " " + jdkField.get(obj)); } if (fType == byte.class) { os.set8(fldOffset, jdkField.getByte(obj)); } else if (fType == boolean.class) { os.set8(fldOffset, (jdkField.getBoolean(obj)) ? 1 : 0); } else if (fType == char.class) { os.set16(fldOffset, jdkField.getChar(obj)); } else if (fType == short.class) { os.set16(fldOffset, jdkField.getShort(obj)); } else if (fType == int.class) { os.set32(fldOffset, jdkField.getInt(obj)); } else if (fType == float.class) { os.set32(fldOffset, Float.floatToIntBits(jdkField .getFloat(obj))); } else if (fType == long.class) { os.set64(fldOffset, jdkField.getLong(obj)); } else if (fType == double.class) { os.set64(fldOffset, Double.doubleToLongBits(jdkField .getDouble(obj))); } else { throw new BuildException("Unknown primitive class " + fType.getName()); } } else { Object value = jdkField.get(obj); try { testForValidEmit(value, cls.getName()); } catch (BuildException ex) { throw new BuildException("Cannot emit field " + jdkField.getName() + " of class " + cls.getName(), ex); } catch (JNodeClassNotFoundException ex) { BootLog .warn("JNode class not found " + ex.getMessage()); value = null; } bis.setObjectRef(fldOffset, value); } } } catch (IllegalAccessException ex) { throw new BuildException("emitting object: [" + obj + "]", ex); } catch (SecurityException ex) { throw new BuildException("emitting object: [" + obj + "]", ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/80df95cc80ef8fa987be9fc287573294617c2722/ObjectEmitter.java/buggy/builder/src/builder/org/jnode/build/ObjectEmitter.java
public static void warn(String msg) { log(WARN, System.out, msg, null);
public static void warn(String msg, Throwable ex) { log(WARN, System.out, msg, ex);
public static void warn(String msg) { log(WARN, System.out, msg, null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/BootLog.java/buggy/core/src/core/org/jnode/system/BootLog.java
setOpaque(true);
public JRootPane() { setLayout(createRootLayout()); getGlassPane(); getLayeredPane(); getContentPane(); updateUI(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49ad2f4c3e74f0a8e99b839c938a312898850fa0/JRootPane.java/buggy/core/src/classpath/javax/javax/swing/JRootPane.java
setLayout(null);
public JLayeredPane() { layers = new TreeMap (); componentToLayer = new Hashtable (); }
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
if (!((JMenu)c).isTopLevelMenu()) { JMenuItem menuItem = new JMenuItem(((JMenu)c).getText(), ((JMenu)c).getIcon()); return menuItem.getMaximumSize(); }
public Dimension getMaximumSize(JComponent c) { return c.getPreferredSize(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicMenuUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuUI.java
public MenuElement[] getPath() {
public MenuElement[] getPath() {
public MenuElement[] getPath() { return path; } // getPath()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/MenuDragMouseEvent.java/buggy/core/src/classpath/javax/javax/swing/event/MenuDragMouseEvent.java
}
}
public MenuElement[] getPath() { return path; } // getPath()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/MenuDragMouseEvent.java/buggy/core/src/classpath/javax/javax/swing/event/MenuDragMouseEvent.java
public void processMouseEvent(MouseEvent event) { Component source = ((Component) event.getSource()); // In the case of drag event, event.getSource() returns component // where drag event originated. However menu element processing this // event should be the one over which mouse is currently located, // which is not necessary the source of the drag event. Component mouseOverMenuComp; // find over which menu element the mouse is currently located if (event.getID() == MouseEvent.MOUSE_DRAGGED || event.getID() == MouseEvent.MOUSE_RELEASED) mouseOverMenuComp = componentForPoint(source, event.getPoint()); else mouseOverMenuComp = source; // Process this event only if mouse is located over some menu element if (mouseOverMenuComp != null && (mouseOverMenuComp instanceof MenuElement)) { MenuElement[] path = getPath(mouseOverMenuComp); ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path, manager); // FIXME: Java specification says that mouse events should be // forwarded to subcomponents. The code below does it, but // menu's work fine without it. This code is commented for now. /* MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp) .getSubElements(); for (int i = 0; i < subComponents.length; i++) { subComponents[i].processMouseEvent(event, path, manager); } */ } else { if (event.getID() == MouseEvent.MOUSE_RELEASED) clearSelectedPath(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MenuSelectionManager.java/buggy/core/src/classpath/javax/javax/swing/MenuSelectionManager.java
for (int i = 0; i < subComponents.length; i++) { subComponents[i].processMouseEvent(event, path, manager); }
for (int i = 0; i < subComponents.length; i++) { subComponents[i].processMouseEvent(event, path, manager); }
public void processMouseEvent(MouseEvent event) { Component source = ((Component) event.getSource()); // In the case of drag event, event.getSource() returns component // where drag event originated. However menu element processing this // event should be the one over which mouse is currently located, // which is not necessary the source of the drag event. Component mouseOverMenuComp; // find over which menu element the mouse is currently located if (event.getID() == MouseEvent.MOUSE_DRAGGED || event.getID() == MouseEvent.MOUSE_RELEASED) mouseOverMenuComp = componentForPoint(source, event.getPoint()); else mouseOverMenuComp = source; // Process this event only if mouse is located over some menu element if (mouseOverMenuComp != null && (mouseOverMenuComp instanceof MenuElement)) { MenuElement[] path = getPath(mouseOverMenuComp); ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path, manager); // FIXME: Java specification says that mouse events should be // forwarded to subcomponents. The code below does it, but // menu's work fine without it. This code is commented for now. /* MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp) .getSubElements(); for (int i = 0; i < subComponents.length; i++) { subComponents[i].processMouseEvent(event, path, manager); } */ } else { if (event.getID() == MouseEvent.MOUSE_RELEASED) clearSelectedPath(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MenuSelectionManager.java/buggy/core/src/classpath/javax/javax/swing/MenuSelectionManager.java
return super.clone();
BaseMac result = (BaseMac) super.clone(); if (this.underlyingHash != null) result.underlyingHash = (IMessageDigest) this.underlyingHash.clone(); return result;
public Object clone() throws CloneNotSupportedException { return super.clone(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/BaseMac.java/buggy/core/src/classpath/gnu/gnu/javax/crypto/mac/BaseMac.java
cfc = JOptionPane.showConfirmDialog(null,
cfc = JOptionPane.showConfirmDialog(null,
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. if(ses.exists()) { int cfc; cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { // Here we do a checkdir so we know the destination-dir exists checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with -Demulator.settingsDirectory=<settings-dir> \n" + "as a parameter to avoid this question all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
JOptionPane.showMessageDialog(null,
JOptionPane.showMessageDialog(null,
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. if(ses.exists()) { int cfc; cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { // Here we do a checkdir so we know the destination-dir exists checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with -Demulator.settingsDirectory=<settings-dir> \n" + "as a parameter to avoid this question all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
String dest = System.getProperty("user.home") +
String dest = System.getProperty("user.home") +
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFile = new File(sesFile); try { FileReader r = new FileReader(srcFile); BufferedReader b = new BufferedReader(r); FileWriter w = new FileWriter(dest); PrintWriter p = new PrintWriter(w); String regel = b.readLine(); while (regel != null) { p.println(regel); regel = b.readLine(); } b.close(); p.close(); rmvFile.delete(); } catch (FileNotFoundException e) { log.warn(srcFile + " not found !"); } catch (IOException e) { log.warn("Global io-error !"); } catch (ArrayIndexOutOfBoundsException e) { } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFile = new File(sesFile); try { FileReader r = new FileReader(srcFile); BufferedReader b = new BufferedReader(r); FileWriter w = new FileWriter(dest); PrintWriter p = new PrintWriter(w); String regel = b.readLine(); while (regel != null) { p.println(regel); regel = b.readLine(); } b.close(); p.close(); rmvFile.delete(); } catch (FileNotFoundException e) { log.warn(srcFile + " not found !"); } catch (IOException e) { log.warn("Global io-error !"); } catch (ArrayIndexOutOfBoundsException e) { } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again);
again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again);
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile
log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
log.warn("IO Exception accessing File "
log.warn("IO Exception accessing File "
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
log.warn("Security Exception for file "
log.warn("Security Exception for file "
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
log.warn("IO Exception accessing File "
log.warn("IO Exception accessing File "
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
log.warn("Security Exception for file "
log.warn("Security Exception for file "
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/GlobalConfigure.java/buggy/tn5250j/src/org/tn5250j/GlobalConfigure.java
public Number evaluate (Number value) {
public double evaluate (double value) {
public Number evaluate (Number value) { //NOT IMPLEMENTED YET return (Number) new Integer("0"); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e25b84d67a689617dfbe6abe8721bea988092c49/Conversion.java/clean/src/gov/nasa/gsfc/adc/xdf/Conversion.java
return (Number) new Integer("0");
return value;
public Number evaluate (Number value) { //NOT IMPLEMENTED YET return (Number) new Integer("0"); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e25b84d67a689617dfbe6abe8721bea988092c49/Conversion.java/clean/src/gov/nasa/gsfc/adc/xdf/Conversion.java
resetAttributes();
super.init();
protected void init() { resetAttributes(); classXDFNodeName = "conversion"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,COMPONENTLIST_XML_ATTRIBUTE_NAME); attribHash.put(COMPONENTLIST_XML_ATTRIBUTE_NAME, new Attribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e25b84d67a689617dfbe6abe8721bea988092c49/Conversion.java/clean/src/gov/nasa/gsfc/adc/xdf/Conversion.java
writeOut(outputstream, " encoding=" + attrib);
writeOut(outputstream, " encoding=\"" + attrib+"\"");
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cfc979506173c9992eb017a311496fa1c0337ddf/XMLDataIOStyle.java/clean/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
writeOut(outputstream, " endian=" + attrib);
writeOut(outputstream, " endian=\"" + attrib + "\"");
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cfc979506173c9992eb017a311496fa1c0337ddf/XMLDataIOStyle.java/clean/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
writeOut(outputstream, " readId=" + attrib);
writeOut(outputstream, " readId=\"" + attrib + "\"");
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cfc979506173c9992eb017a311496fa1c0337ddf/XMLDataIOStyle.java/clean/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
writeOut(outputstream, " readIdRef=" + attrib);
writeOut(outputstream, " readIdRef=\"" + attrib + "\"");
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cfc979506173c9992eb017a311496fa1c0337ddf/XMLDataIOStyle.java/clean/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
public GnuRSAPrivateKey(final BigInteger p, final BigInteger q, final BigInteger e, final BigInteger d)
public GnuRSAPrivateKey(BigInteger p, BigInteger q, BigInteger e, BigInteger d)
public GnuRSAPrivateKey(final BigInteger p, final BigInteger q, final BigInteger e, final BigInteger d) { // super(p.multiply(q)); super(p.multiply(q), e); this.p = p; this.q = q; // this.e = e; this.d = d; // the exponents dP and dQ are positive integers less than p and q // respectively satisfying // e * dP = 1 (mod p-1); // e * dQ = 1 (mod q-1), dP = e.modInverse(p.subtract(BigInteger.ONE)); dQ = e.modInverse(q.subtract(BigInteger.ONE)); // and the CRT coefficient qInv is a positive integer less than p // satisfying // q * qInv = 1 (mod p). qInv = q.modInverse(p); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
super(p.multiply(q), e); this.p = p; this.q = q; this.d = d; dP = e.modInverse(p.subtract(BigInteger.ONE)); dQ = e.modInverse(q.subtract(BigInteger.ONE)); qInv = q.modInverse(p);
this(Registry.RAW_ENCODING_ID, p, q, e, d);
public GnuRSAPrivateKey(final BigInteger p, final BigInteger q, final BigInteger e, final BigInteger d) { // super(p.multiply(q)); super(p.multiply(q), e); this.p = p; this.q = q; // this.e = e; this.d = d; // the exponents dP and dQ are positive integers less than p and q // respectively satisfying // e * dP = 1 (mod p-1); // e * dQ = 1 (mod q-1), dP = e.modInverse(p.subtract(BigInteger.ONE)); dQ = e.modInverse(q.subtract(BigInteger.ONE)); // and the CRT coefficient qInv is a positive integer less than p // satisfying // q * qInv = 1 (mod p). qInv = q.modInverse(p); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
public byte[] getEncoded(final int format)
public byte[] getEncoded(int format)
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
throw new IllegalArgumentException("format");
throw new IllegalArgumentException("Unsupported encoding format: " + format);
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k);
return (GnuRSAPrivateKey) new RSAKeyPairRawCodec().decodePrivateKey(k);
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
else
catch (IllegalArgumentException ignored)
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
throw new IllegalArgumentException("magic");
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
return (GnuRSAPrivateKey) new RSAKeyPairPKCS8Codec().decodePrivateKey(k);
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAPrivateKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
return "JCheckBoxMenuItem";
return super.paramString();
protected String paramString() { return "JCheckBoxMenuItem"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JCheckBoxMenuItem.java/buggy/core/src/classpath/javax/javax/swing/JCheckBoxMenuItem.java
Color colorBg, Session ses) {
Color colorBg, boolean toDefaultPrinter, Session ses) {
public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg, Session ses) { setPriority(1); session = ses; screen = new ScreenChar[sc.length]; int len = sc.length; for (int x = 0; x < len; x++) { screen[x] = new ScreenChar(sc[x].s); screen[x].setCharAndAttr(sc[x].getChar(),sc[x].getCharAttr(),sc[x].isAttributePlace()); } numCols = cols; numRows = rows; this.colorBg = colorBg; this.font = font; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/PrinterThread.java/clean/tn5250j/src/org/tn5250j/PrinterThread.java
toDefault = toDefaultPrinter;
public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg, Session ses) { setPriority(1); session = ses; screen = new ScreenChar[sc.length]; int len = sc.length; for (int x = 0; x < len; x++) { screen[x] = new ScreenChar(sc[x].s); screen[x].setCharAndAttr(sc[x].getChar(),sc[x].getCharAttr(),sc[x].isAttributePlace()); } numCols = cols; numRows = rows; this.colorBg = colorBg; this.font = font; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/PrinterThread.java/clean/tn5250j/src/org/tn5250j/PrinterThread.java
public void run () { //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); printJob.setJobName("tn5250j"); //--- Set the printable class to this one since we //--- are implementing the Printable interface printJob.setPrintable (this); //--- Show a print dialog to the user. If the user //--- clicks the print button, then print, otherwise //--- cancel the print job if (printJob.printDialog()) { try { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); printJob.print(); } catch (Exception PrintException) { PrintException.printStackTrace(); } } else { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); } session = null; int len = screen.length; for (int x = 0; x < len; x++) { screen[x] = null; } screen = null; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/PrinterThread.java/clean/tn5250j/src/org/tn5250j/PrinterThread.java
public IndexOutOfBoundsException(String s) { super(s);
public IndexOutOfBoundsException() {
public IndexOutOfBoundsException(String s) { super(s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/IndexOutOfBoundsException.java/buggy/core/src/classpath/java/java/lang/IndexOutOfBoundsException.java
public NumberFormatException() { super();
public NumberFormatException() {
public NumberFormatException() { super(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/NumberFormatException.java/buggy/core/src/classpath/java/java/lang/NumberFormatException.java
super();
public ArithmeticException() { super(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/ArithmeticException.java/buggy/core/src/classpath/java/java/lang/ArithmeticException.java
verifyMonitor();
public void visit_monitorenter() { inline(entryPoints.getMonitorEnterMethod()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/34018d58ddf97a144be387eabd5b8ae715c6f8a5/OptimizingBytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java
verifyMonitor();
public void visit_monitorexit() { inline(entryPoints.getMonitorExitMethod()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/34018d58ddf97a144be387eabd5b8ae715c6f8a5/OptimizingBytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java
if (callee.isSynchronized()) { System.out.println("Method '" + currentMethod.getFullName() + "' calls synchronized method: " + callee.getFullName()); }
protected final void verifyInvoke(VmConstMethodRef methodRef) { if (currentKernelSpace) { // May only call methods with kernelspace pragma. methodRef.resolve(currentMethod.getDeclaringClass().getLoader()); final VmMethod callee = methodRef.getResolvedVmMethod(); if (!callee.hasKernelSpacePragma()) { //throw new ClassFormatError("Method '" + currentMethod + "' calls method outside KernelSpace: " + callee); System.out.println("Method '" + currentMethod.getFullName() + "' calls method outside KernelSpace: " + callee.getFullName()); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/34018d58ddf97a144be387eabd5b8ae715c6f8a5/VerifyingCompilerBytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/compiler/VerifyingCompilerBytecodeVisitor.java
Log.errorln("EXPONENT WIDTH:"+wsize+" Precision:"+esize);
private void generateFormatPattern ( ) { StringBuffer leftpattern = new StringBuffer(); StringBuffer rightpattern = new StringBuffer(); StringBuffer etemplate = new StringBuffer(); // precision is the size of the exponent excluding 'E' int esize = getPrecision().intValue(); // width including 'E' and exponent int wsize = getWidth().intValue() - esize - 1;Log.errorln("EXPONENT WIDTH:"+wsize+" Precision:"+esize); if(wsize > 2) etemplate.append("#"); leftpattern.append("0."); while (wsize-- > 3) leftpattern.append("0"); rightpattern.append("E0"); while (esize-- > 1) rightpattern.append("0"); // finish building the template etemplate.append(leftpattern.toString()+rightpattern.toString()); etemplate.append(";-"+leftpattern.toString()+rightpattern.toString()); formatPattern = etemplate.toString(); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/822267f48dd4260e32a397fbafc6a556726c1529/ExponentialDataFormat.java/buggy/src/gov/nasa/gsfc/adc/xdf/ExponentialDataFormat.java
goto_XY(pos); isInField(lastPos);
if (gui.rubberband.isAreaSelected()) { gui.rubberband.reset(); gui.repaint(); } else { goto_XY(pos); isInField(lastPos); }
public void moveCursor (MouseEvent e) { if(!keyboardLocked) { int pos = getPosFromView(e.getX(),e.getY());// System.out.println((getRow(pos)) + "," + (getCol(pos)));// System.out.println(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight); if (pos < 0) return ; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0// pos -= (numCols + 1); int g = screen[pos].getWhichGUI(); // lets check for hot spots if (g >= ScreenChar.BUTTON_LEFT && g <= ScreenChar.BUTTON_LAST) { StringBuffer aid = new StringBuffer(); boolean aidFlag = true; switch (g) { case ScreenChar.BUTTON_RIGHT: case ScreenChar.BUTTON_MIDDLE: while (screen[--pos].getWhichGUI() != ScreenChar.BUTTON_LEFT) { } case ScreenChar.BUTTON_LEFT: if (screen[pos].getChar() == 'F') { pos++; } else aidFlag=false; if (screen[pos+1].getChar() != '=' && screen[pos+1].getChar() != '.' && screen[pos+1].getChar() != '/' ) {// System.out.println(" Hotspot clicked!!! we will send characters " +// screen[pos].getChar() +// screen[pos+1].getChar()); aid.append(screen[pos].getChar()); aid.append(screen[pos + 1].getChar()); } else {// System.out.println(" Hotspot clicked!!! we will send character " +// screen[pos].getChar());// aid.append(screen[pos].getChar()); } break; } if (aidFlag) { switch (g) { case ScreenChar.BUTTON_LEFT_UP: case ScreenChar.BUTTON_MIDDLE_UP: case ScreenChar.BUTTON_RIGHT_UP: case ScreenChar.BUTTON_ONE_UP: case ScreenChar.BUTTON_SB_UP: case ScreenChar.BUTTON_SB_GUIDE: gui.sendAidKey(tnvt.AID_ROLL_UP); break; case ScreenChar.BUTTON_LEFT_DN: case ScreenChar.BUTTON_MIDDLE_DN: case ScreenChar.BUTTON_RIGHT_DN: case ScreenChar.BUTTON_ONE_DN: case ScreenChar.BUTTON_SB_DN: case ScreenChar.BUTTON_SB_THUMB: gui.sendAidKey(tnvt.AID_ROLL_DOWN); break; case ScreenChar.BUTTON_LEFT_EB: case ScreenChar.BUTTON_MIDDLE_EB: case ScreenChar.BUTTON_RIGHT_EB: System.out.println("Send to external Browser"); break; default: int aidKey = Integer.parseInt(aid.toString()); if (aidKey >= 1 && aidKey <= 12) gui.sendAidKey(0x30 + aidKey); if (aidKey >= 13 && aidKey <= 24) gui.sendAidKey(0xB0 + (aidKey - 12)); } } else { if (screenFields.getCurrentField() != null) { int xPos = screenFields.getCurrentField().startPos(); for (int x = 0; x < aid.length(); x++) {// System.out.println(sr + "," + (sc + x) + " " + aid.charAt(x)); screen[xPos + x].setChar(aid.charAt(x)); }// System.out.println(aid); screenFields.setCurrentFieldMDT(); gui.sendAidKey(tnvt.AID_ENTER); } } } else { goto_XY(pos); isInField(lastPos); } } gui.requestFocus(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6df9beff359d58308f77418bf46d7eb474d031a7/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
protected void paintComponent2(Graphics2D g2) { if (bi == null) { paintComponent3(g2); } Rectangle r = g2.getClipBounds(); if (r == null) { paintComponent3((Graphics)g2); return; } g2.setColor(colorBg);// System.out.println("PaintComponent " + r); g2.fillRect(r.x,r.y,r.width,r.height); int sPos = getRowColFromPoint(r.x, r.y); int ePos = getRowColFromPoint(r.width,r.height) - numCols; // fix me here int er = (numRows - ((((fmHeight * (numRows + 1)) - ((r.y + r.height) + fmHeight)) / fmHeight))); int ec = (numCols - ((((fmWidth * (numCols + 1)) - ((r.x + r.width) + fmWidth)) / fmWidth)));// int er1 = getRow(ePos);// int ec2 = getCol(ePos); int sr = getRow(sPos); int c = getCol(sPos); er--; ec--;// System.out.println(sr + "," + c + "," + er + "," + ec); workR.setBounds(sr,c,ec,er); int rows = er - sr; int cols = 0; int lr = workR.x; int lc = 0; lr = sPos; while (rows-- >= 0) { cols = ec - c; lc = lr; while (cols-- >= 0) { if (lc >= 0 && lc < lenScreen) screen[lc++].drawChar(g2); } lr += numCols; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6df9beff359d58308f77418bf46d7eb474d031a7/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
gui.rubberband.reset(); gui.repaint();
protected final Vector sumThem(boolean which) { StringBuffer s = new StringBuffer(); getBoundingArea(workR); gui.rubberband.reset(); gui.repaint();// System.out.println("Summing"); // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; double sum = 0.0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m - 1,i - 1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m - 1,i - 1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString());// System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6df9beff359d58308f77418bf46d7eb474d031a7/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { //System.out.println("was null"); gg2d = (Graphics2D)gui.getGraphics(); } // check for selected area and erase it before updating screen if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.erase(); } if (bi == null || gg2d == null) { if (bi == null) System.out.println("bi was null in update image"); if (gg2d == null) System.out.println("gg2d was null in update image"); return; } g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) {// if (!cursorActive) { paintComponent2(g2d); }// if (tileimage != null) {//// AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);// g2d.setComposite(ac);// g2d.drawImage(tileimage, null, null);// } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image.// if (gui.isVisible() && height > 0 && width > 0) {// bi.drawImageBuffer(gg2d,x,y,width,height);// } if (gui.isVisible()) { if (height > 0 && width > 0) { // We now redraw the selected area rectangle. if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.draw(); } if (!fullRepaint) bi.drawImageBuffer(gg2d,x,y,width,height); else gui.repaint();// System.out.println(" something went right finally " + gui.isVisible() +// " height " + height + " width " + width); }// else { // bi.drawImageBuffer(gg2d);// System.out.println(" something is wrong here " + gui.isVisible() +// " height " + height + " width " + width);// } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6df9beff359d58308f77418bf46d7eb474d031a7/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java