rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
addNonNull(h);
addNonNull(h, JScrollPane.HORIZONTAL_SCROLLBAR);
public void setHorizontalScrollBar(JScrollBar h) { if (horizontalScrollBar == h) return; JScrollBar old = horizontalScrollBar; removeNonNull(old); horizontalScrollBar = h; addNonNull(h); firePropertyChange("horizontalScrollBar", old, h); sync(); if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (h != null) { BoundedRangeModel model = h.getModel(); if (model != null) model.addChangeListener(scrollListener); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JScrollPane.java/buggy/core/src/classpath/javax/javax/swing/JScrollPane.java
{
{
public void setHorizontalScrollBarPolicy(int h) { if (horizontalScrollBarPolicy == h) return; if (h != HORIZONTAL_SCROLLBAR_AS_NEEDED && h != HORIZONTAL_SCROLLBAR_NEVER && h != HORIZONTAL_SCROLLBAR_ALWAYS) throw new IllegalArgumentException("unknown horizontal scrollbar policy"); int old = horizontalScrollBarPolicy; horizontalScrollBarPolicy = h; firePropertyChange("horizontalScrollBarPolicy", old, h); sync(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JScrollPane.java/buggy/core/src/classpath/javax/javax/swing/JScrollPane.java
addNonNull(v);
addNonNull(v, JScrollPane.ROW_HEADER);
public void setRowHeader(JViewport v) { if (rowHeader == v) return; JViewport old = rowHeader; removeNonNull(old); rowHeader = v; addNonNull(v); firePropertyChange("rowHeader", old, v); sync(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JScrollPane.java/buggy/core/src/classpath/javax/javax/swing/JScrollPane.java
addNonNull(v);
addNonNull(v, JScrollPane.VERTICAL_SCROLLBAR);
public void setVerticalScrollBar(JScrollBar v) { if (verticalScrollBar == v) return; JScrollBar old = verticalScrollBar; removeNonNull(old); verticalScrollBar = v; addNonNull(v); firePropertyChange("verticalScrollBar", old, v); sync(); if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (v != null) { BoundedRangeModel model = v.getModel(); if (model != null) model.addChangeListener(scrollListener); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JScrollPane.java/buggy/core/src/classpath/javax/javax/swing/JScrollPane.java
addNonNull(v);
addNonNull(v, JScrollPane.VIEWPORT);
public void setViewport(JViewport v) { if (viewport == v) return; JViewport old = viewport; removeNonNull(old); if (old != null) old.removeChangeListener(scrollListener); viewport = v; if (v != null) v.addChangeListener(scrollListener); addNonNull(v); revalidate(); repaint(); firePropertyChange("viewport", old, v); sync(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JScrollPane.java/buggy/core/src/classpath/javax/javax/swing/JScrollPane.java
* (has to be instanciated via XDF::Array ONLY)
* (has to be instanciated via Array ONLY)
public Locator(Array array) { Log.debug("in Locator(Array)"); parentArray = array; List axisList = parentArray.getAxisList(); /**now, since we KNOW _parentArray is defined * (has to be instanciated via XDF::Array ONLY) * we can proceed to initialize the axis, index positions * to the origin (ie index 0 for each axis). * We choose the parent Array axisList ordering for our * default location ordering. */ locations = new Hashtable(axisList.size()); int stop = axisList.size(); for (int i = 0; i < stop; i++) { Object axisObj = axisList.get(i); axisOrderList.add(axisObj); locations.put(axisObj, new Integer(0)); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/Locator.java/clean/src/gov/nasa/gsfc/adc/xdf/Locator.java
writeChar(sb.toString());
writeBuffer(sb.toString());
private void cvtToPDF() { try { openOutputFile(); // Create the printparameters to be used in the transform of the // input stream PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splfile.getTransformedInputStream(printParms); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); updateStatus("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString()); sb.append((char)buf[x]);// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C: writeChar(sb.toString()); document.newPage(); sb.setLength(0); break; default: sb.append((char)buf[x]); } } totBytes += read; updateStatus("Bytes read " + totBytes); // // process the data buffer // avail = inStream.available(); } closeOutputFile(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToPDF() { try { openOutputFile(); // Create the printparameters to be used in the transform of the // input stream PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splfile.getTransformedInputStream(printParms); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); updateStatus("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString()); sb.append((char)buf[x]);// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C: writeChar(sb.toString()); document.newPage(); sb.setLength(0); break; default: sb.append((char)buf[x]); } } totBytes += read; updateStatus("Bytes read " + totBytes); // // process the data buffer // avail = inStream.available(); } closeOutputFile(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
dw = new java.io.PrintStream(fw);
if (ifs.isSelected()) dw = new java.io.PrintStream(ifsfw); else dw = new java.io.PrintStream(fw);
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
System.out.println("Starting Output");
updateStatus("Starting Output");
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); BufferedReader br = new BufferedReader( new InputStreamReader(inStream)); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); System.out.println("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString());// sb.append((char)buf[x]); dw.println(sb.toString().toCharArray()); sb.setLength(0);// sb.append('\n');// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes());// document.newPage(); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } }// dw.write(buf); totBytes += read; updateStatus("Bytes read " + totBytes);// System.out.println("Bytes read " + byr);// System.out.println(new String(buf)); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
cvtToText();
cvtToPDF();
public void run() { cvtToText(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
ifsSave.setEnabled(true);
private void doItemStateChanged(ItemEvent e) { pcPathInfo.setEnabled(false); ifsPathInfo.setEnabled(false); pcSave.setEnabled(false); if (e.getStateChange() == ItemEvent.SELECTED) { if (pc.isSelected()) { pcPathInfo.setEnabled(true); pcSave.setEnabled(true); pcPathInfo.grabFocus(); } if (ifs.isSelected()) { ifsPathInfo.setEnabled(true); ifsPathInfo.grabFocus(); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
WizardPage page;
private void jbInit() throws Exception { setIconImage(My5250.tnicon.getImage()); // create ourselves a new wizard wizard = new Wizard(); // create the event handler as being this module wizard.addWizardListener(this); // add our wizard to the frame this.getContentPane().add(wizard); WizardPage page; // create the first wizard page page = new WizardPage(WizardPage.NEXT | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage1")); setTitle(page.getName()); // get the next button so we can set it enabled or disabled depending // on output type. nextButton = page.getNextButton(); page.getContentPane().add(pageOne(), BorderLayout.CENTER); wizard.add(page); page = new WizardPage(WizardPage.PREVIOUS | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage2")); page.getContentPane().add(pageTwo(), BorderLayout.CENTER); wizard.add(page); pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
page = new WizardPage(WizardPage.PREVIOUS |
pagePDF = new WizardPage(WizardPage.PREVIOUS |
private void jbInit() throws Exception { setIconImage(My5250.tnicon.getImage()); // create ourselves a new wizard wizard = new Wizard(); // create the event handler as being this module wizard.addWizardListener(this); // add our wizard to the frame this.getContentPane().add(wizard); WizardPage page; // create the first wizard page page = new WizardPage(WizardPage.NEXT | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage1")); setTitle(page.getName()); // get the next button so we can set it enabled or disabled depending // on output type. nextButton = page.getNextButton(); page.getContentPane().add(pageOne(), BorderLayout.CENTER); wizard.add(page); page = new WizardPage(WizardPage.PREVIOUS | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage2")); page.getContentPane().add(pageTwo(), BorderLayout.CENTER); wizard.add(page); pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
page.setName(LangTool.getString("spool.titlePage2"));
pagePDF.setName(LangTool.getString("spool.titlePage2PDF"));
private void jbInit() throws Exception { setIconImage(My5250.tnicon.getImage()); // create ourselves a new wizard wizard = new Wizard(); // create the event handler as being this module wizard.addWizardListener(this); // add our wizard to the frame this.getContentPane().add(wizard); WizardPage page; // create the first wizard page page = new WizardPage(WizardPage.NEXT | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage1")); setTitle(page.getName()); // get the next button so we can set it enabled or disabled depending // on output type. nextButton = page.getNextButton(); page.getContentPane().add(pageOne(), BorderLayout.CENTER); wizard.add(page); page = new WizardPage(WizardPage.PREVIOUS | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage2")); page.getContentPane().add(pageTwo(), BorderLayout.CENTER); wizard.add(page); pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
page.getContentPane().add(pageTwo(), BorderLayout.CENTER); wizard.add(page);
pagePDF.getContentPane().add(pageTwoPDF(), BorderLayout.CENTER); wizard.add(pagePDF); pageText = new WizardPage(WizardPage.PREVIOUS | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); pageText.setName(LangTool.getString("spool.titlePage2Txt")); pageText.getContentPane().add(pageTwoText(), BorderLayout.CENTER); wizard.add(pageText);
private void jbInit() throws Exception { setIconImage(My5250.tnicon.getImage()); // create ourselves a new wizard wizard = new Wizard(); // create the event handler as being this module wizard.addWizardListener(this); // add our wizard to the frame this.getContentPane().add(wizard); WizardPage page; // create the first wizard page page = new WizardPage(WizardPage.NEXT | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage1")); setTitle(page.getName()); // get the next button so we can set it enabled or disabled depending // on output type. nextButton = page.getNextButton(); page.getContentPane().add(pageOne(), BorderLayout.CENTER); wizard.add(page); page = new WizardPage(WizardPage.PREVIOUS | WizardPage.FINISH | WizardPage.CANCEL | WizardPage.HELP); page.setName(LangTool.getString("spool.titlePage2")); page.getContentPane().add(pageTwo(), BorderLayout.CENTER); wizard.add(page); pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
two.add(statusBar,BorderLayout.SOUTH);
if (((String)cvtType.getSelectedItem()).equals( LangTool.getString("spool.toText"))) { twoText.add(statusBar,BorderLayout.SOUTH); e.setNewPage(pageText); } else { twoPDF.add(statusBar,BorderLayout.SOUTH); e.setNewPage(pagePDF); }
public void nextBegin(WizardEvent e) {// System.out.println(e.getCurrentPage().getName() + " Next Begin"); two.add(statusBar,BorderLayout.SOUTH); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
String fileName = pcPathInfo.getText().trim();
public void openOutputFile() { try { updateStatus("Opening File"); String suffix = ".txt"; if (cvtType.getSelectedIndex() == 0) suffix = ".pdf"; String fileName = pcPathInfo.getText().trim(); if (email.isSelected()) { File dir = new File(System.getProperty("user.dir")); File f = File.createTempFile(number.getText().trim(),suffix,dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); conicalPath = f.getCanonicalPath(); f.deleteOnExit(); fw = new FileOutputStream(f); } else fw = new FileOutputStream(fileName); if (cvtType.getSelectedIndex() > 0) return; if (document == null) { document = new Document(); bos = PdfWriter.getInstance(document,fw); BaseFont bf = BaseFont.createFont("Courier", "Cp1252", false); float fontsize = 9.0f; if (fontSize.getText().length() > 0) fontsize = Float.parseFloat(fontSize.getText().trim()); font = new com.lowagie.text.Font(bf, fontsize, com.lowagie.text.Font.NORMAL); if (author.getText().length() > 0) document.addAuthor(author.getText()); if (title.getText().length() > 0) document.addTitle(title.getText()); if (subject.getText().length() > 0) document.addSubject(subject.getText()); // set the page sizes and the page orientation String ps = (String)pageSize.getSelectedItem(); if (ps.equals("A3")) { if (portrait.isSelected()) document.setPageSize(PageSize.A3); else document.setPageSize(PageSize.A3.rotate()); } if (ps.equals("A4")) { if (portrait.isSelected()) document.setPageSize(PageSize.A4); else document.setPageSize(PageSize.A4.rotate()); } if (ps.equals("A5")) { if (portrait.isSelected()) document.setPageSize(PageSize.A5); else document.setPageSize(PageSize.A5.rotate()); } if (ps.equals("LETTER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LETTER); else document.setPageSize(PageSize.LETTER.rotate()); } if (ps.equals("LEGAL")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEGAL); else document.setPageSize(PageSize.LEGAL.rotate()); } if (ps.equals("LEDGER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEDGER); else document.setPageSize(PageSize.LEDGER.rotate()); } } } catch(IOException _ex) { System.out.println("Cannot open"); } catch(Exception _ex) { System.out.println("Cannot open"); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
File f = File.createTempFile(number.getText().trim(),suffix,dir);
String tempFile = spooledFile.getText().trim() + '_' + jobName.getText().trim() + '_' + user.getText().trim() + '_' + spooledFileNumber.getText().trim() + '_' + number.getText().trim(); File f = File.createTempFile(tempFile,suffix,dir);
public void openOutputFile() { try { updateStatus("Opening File"); String suffix = ".txt"; if (cvtType.getSelectedIndex() == 0) suffix = ".pdf"; String fileName = pcPathInfo.getText().trim(); if (email.isSelected()) { File dir = new File(System.getProperty("user.dir")); File f = File.createTempFile(number.getText().trim(),suffix,dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); conicalPath = f.getCanonicalPath(); f.deleteOnExit(); fw = new FileOutputStream(f); } else fw = new FileOutputStream(fileName); if (cvtType.getSelectedIndex() > 0) return; if (document == null) { document = new Document(); bos = PdfWriter.getInstance(document,fw); BaseFont bf = BaseFont.createFont("Courier", "Cp1252", false); float fontsize = 9.0f; if (fontSize.getText().length() > 0) fontsize = Float.parseFloat(fontSize.getText().trim()); font = new com.lowagie.text.Font(bf, fontsize, com.lowagie.text.Font.NORMAL); if (author.getText().length() > 0) document.addAuthor(author.getText()); if (title.getText().length() > 0) document.addTitle(title.getText()); if (subject.getText().length() > 0) document.addSubject(subject.getText()); // set the page sizes and the page orientation String ps = (String)pageSize.getSelectedItem(); if (ps.equals("A3")) { if (portrait.isSelected()) document.setPageSize(PageSize.A3); else document.setPageSize(PageSize.A3.rotate()); } if (ps.equals("A4")) { if (portrait.isSelected()) document.setPageSize(PageSize.A4); else document.setPageSize(PageSize.A4.rotate()); } if (ps.equals("A5")) { if (portrait.isSelected()) document.setPageSize(PageSize.A5); else document.setPageSize(PageSize.A5.rotate()); } if (ps.equals("LETTER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LETTER); else document.setPageSize(PageSize.LETTER.rotate()); } if (ps.equals("LEGAL")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEGAL); else document.setPageSize(PageSize.LEGAL.rotate()); } if (ps.equals("LEDGER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEDGER); else document.setPageSize(PageSize.LEDGER.rotate()); } } } catch(IOException _ex) { System.out.println("Cannot open"); } catch(Exception _ex) { System.out.println("Cannot open"); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
fw = new FileOutputStream(fileName);
public void openOutputFile() { try { updateStatus("Opening File"); String suffix = ".txt"; if (cvtType.getSelectedIndex() == 0) suffix = ".pdf"; String fileName = pcPathInfo.getText().trim(); if (email.isSelected()) { File dir = new File(System.getProperty("user.dir")); File f = File.createTempFile(number.getText().trim(),suffix,dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); conicalPath = f.getCanonicalPath(); f.deleteOnExit(); fw = new FileOutputStream(f); } else fw = new FileOutputStream(fileName); if (cvtType.getSelectedIndex() > 0) return; if (document == null) { document = new Document(); bos = PdfWriter.getInstance(document,fw); BaseFont bf = BaseFont.createFont("Courier", "Cp1252", false); float fontsize = 9.0f; if (fontSize.getText().length() > 0) fontsize = Float.parseFloat(fontSize.getText().trim()); font = new com.lowagie.text.Font(bf, fontsize, com.lowagie.text.Font.NORMAL); if (author.getText().length() > 0) document.addAuthor(author.getText()); if (title.getText().length() > 0) document.addTitle(title.getText()); if (subject.getText().length() > 0) document.addSubject(subject.getText()); // set the page sizes and the page orientation String ps = (String)pageSize.getSelectedItem(); if (ps.equals("A3")) { if (portrait.isSelected()) document.setPageSize(PageSize.A3); else document.setPageSize(PageSize.A3.rotate()); } if (ps.equals("A4")) { if (portrait.isSelected()) document.setPageSize(PageSize.A4); else document.setPageSize(PageSize.A4.rotate()); } if (ps.equals("A5")) { if (portrait.isSelected()) document.setPageSize(PageSize.A5); else document.setPageSize(PageSize.A5.rotate()); } if (ps.equals("LETTER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LETTER); else document.setPageSize(PageSize.LETTER.rotate()); } if (ps.equals("LEGAL")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEGAL); else document.setPageSize(PageSize.LEGAL.rotate()); } if (ps.equals("LEDGER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEDGER); else document.setPageSize(PageSize.LEDGER.rotate()); } } } catch(IOException _ex) { System.out.println("Cannot open"); } catch(Exception _ex) { System.out.println("Cannot open"); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
bos = PdfWriter.getInstance(document,fw);
if (ifs.isSelected()) { bos = PdfWriter.getInstance(document,ifsfw); } else { bos = PdfWriter.getInstance(document,fw); }
public void openOutputFile() { try { updateStatus("Opening File"); String suffix = ".txt"; if (cvtType.getSelectedIndex() == 0) suffix = ".pdf"; String fileName = pcPathInfo.getText().trim(); if (email.isSelected()) { File dir = new File(System.getProperty("user.dir")); File f = File.createTempFile(number.getText().trim(),suffix,dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); conicalPath = f.getCanonicalPath(); f.deleteOnExit(); fw = new FileOutputStream(f); } else fw = new FileOutputStream(fileName); if (cvtType.getSelectedIndex() > 0) return; if (document == null) { document = new Document(); bos = PdfWriter.getInstance(document,fw); BaseFont bf = BaseFont.createFont("Courier", "Cp1252", false); float fontsize = 9.0f; if (fontSize.getText().length() > 0) fontsize = Float.parseFloat(fontSize.getText().trim()); font = new com.lowagie.text.Font(bf, fontsize, com.lowagie.text.Font.NORMAL); if (author.getText().length() > 0) document.addAuthor(author.getText()); if (title.getText().length() > 0) document.addTitle(title.getText()); if (subject.getText().length() > 0) document.addSubject(subject.getText()); // set the page sizes and the page orientation String ps = (String)pageSize.getSelectedItem(); if (ps.equals("A3")) { if (portrait.isSelected()) document.setPageSize(PageSize.A3); else document.setPageSize(PageSize.A3.rotate()); } if (ps.equals("A4")) { if (portrait.isSelected()) document.setPageSize(PageSize.A4); else document.setPageSize(PageSize.A4.rotate()); } if (ps.equals("A5")) { if (portrait.isSelected()) document.setPageSize(PageSize.A5); else document.setPageSize(PageSize.A5.rotate()); } if (ps.equals("LETTER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LETTER); else document.setPageSize(PageSize.LETTER.rotate()); } if (ps.equals("LEGAL")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEGAL); else document.setPageSize(PageSize.LEGAL.rotate()); } if (ps.equals("LEDGER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEDGER); else document.setPageSize(PageSize.LEDGER.rotate()); } } } catch(IOException _ex) { System.out.println("Cannot open"); } catch(Exception _ex) { System.out.println("Cannot open"); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
public void openOutputFile() { try { updateStatus("Opening File"); String suffix = ".txt"; if (cvtType.getSelectedIndex() == 0) suffix = ".pdf"; String fileName = pcPathInfo.getText().trim(); if (email.isSelected()) { File dir = new File(System.getProperty("user.dir")); File f = File.createTempFile(number.getText().trim(),suffix,dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); conicalPath = f.getCanonicalPath(); f.deleteOnExit(); fw = new FileOutputStream(f); } else fw = new FileOutputStream(fileName); if (cvtType.getSelectedIndex() > 0) return; if (document == null) { document = new Document(); bos = PdfWriter.getInstance(document,fw); BaseFont bf = BaseFont.createFont("Courier", "Cp1252", false); float fontsize = 9.0f; if (fontSize.getText().length() > 0) fontsize = Float.parseFloat(fontSize.getText().trim()); font = new com.lowagie.text.Font(bf, fontsize, com.lowagie.text.Font.NORMAL); if (author.getText().length() > 0) document.addAuthor(author.getText()); if (title.getText().length() > 0) document.addTitle(title.getText()); if (subject.getText().length() > 0) document.addSubject(subject.getText()); // set the page sizes and the page orientation String ps = (String)pageSize.getSelectedItem(); if (ps.equals("A3")) { if (portrait.isSelected()) document.setPageSize(PageSize.A3); else document.setPageSize(PageSize.A3.rotate()); } if (ps.equals("A4")) { if (portrait.isSelected()) document.setPageSize(PageSize.A4); else document.setPageSize(PageSize.A4.rotate()); } if (ps.equals("A5")) { if (portrait.isSelected()) document.setPageSize(PageSize.A5); else document.setPageSize(PageSize.A5.rotate()); } if (ps.equals("LETTER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LETTER); else document.setPageSize(PageSize.LETTER.rotate()); } if (ps.equals("LEGAL")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEGAL); else document.setPageSize(PageSize.LEGAL.rotate()); } if (ps.equals("LEDGER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEDGER); else document.setPageSize(PageSize.LEDGER.rotate()); } } } catch(IOException _ex) { System.out.println("Cannot open"); } catch(Exception _ex) { System.out.println("Cannot open"); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
System.out.println("Cannot open");
System.out.println("Cannot open 1 " + _ex.getMessage());
public void openOutputFile() { try { updateStatus("Opening File"); String suffix = ".txt"; if (cvtType.getSelectedIndex() == 0) suffix = ".pdf"; String fileName = pcPathInfo.getText().trim(); if (email.isSelected()) { File dir = new File(System.getProperty("user.dir")); File f = File.createTempFile(number.getText().trim(),suffix,dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); conicalPath = f.getCanonicalPath(); f.deleteOnExit(); fw = new FileOutputStream(f); } else fw = new FileOutputStream(fileName); if (cvtType.getSelectedIndex() > 0) return; if (document == null) { document = new Document(); bos = PdfWriter.getInstance(document,fw); BaseFont bf = BaseFont.createFont("Courier", "Cp1252", false); float fontsize = 9.0f; if (fontSize.getText().length() > 0) fontsize = Float.parseFloat(fontSize.getText().trim()); font = new com.lowagie.text.Font(bf, fontsize, com.lowagie.text.Font.NORMAL); if (author.getText().length() > 0) document.addAuthor(author.getText()); if (title.getText().length() > 0) document.addTitle(title.getText()); if (subject.getText().length() > 0) document.addSubject(subject.getText()); // set the page sizes and the page orientation String ps = (String)pageSize.getSelectedItem(); if (ps.equals("A3")) { if (portrait.isSelected()) document.setPageSize(PageSize.A3); else document.setPageSize(PageSize.A3.rotate()); } if (ps.equals("A4")) { if (portrait.isSelected()) document.setPageSize(PageSize.A4); else document.setPageSize(PageSize.A4.rotate()); } if (ps.equals("A5")) { if (portrait.isSelected()) document.setPageSize(PageSize.A5); else document.setPageSize(PageSize.A5.rotate()); } if (ps.equals("LETTER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LETTER); else document.setPageSize(PageSize.LETTER.rotate()); } if (ps.equals("LEGAL")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEGAL); else document.setPageSize(PageSize.LEGAL.rotate()); } if (ps.equals("LEDGER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEDGER); else document.setPageSize(PageSize.LEDGER.rotate()); } } } catch(IOException _ex) { System.out.println("Cannot open"); } catch(Exception _ex) { System.out.println("Cannot open"); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
catch(Exception _ex) { System.out.println("Cannot open");
catch(Exception _ex2) { System.out.println("Cannot open 2 " + _ex2.getMessage());
public void openOutputFile() { try { updateStatus("Opening File"); String suffix = ".txt"; if (cvtType.getSelectedIndex() == 0) suffix = ".pdf"; String fileName = pcPathInfo.getText().trim(); if (email.isSelected()) { File dir = new File(System.getProperty("user.dir")); File f = File.createTempFile(number.getText().trim(),suffix,dir); System.out.println(f.getName()); System.out.println(f.getCanonicalPath()); conicalPath = f.getCanonicalPath(); f.deleteOnExit(); fw = new FileOutputStream(f); } else fw = new FileOutputStream(fileName); if (cvtType.getSelectedIndex() > 0) return; if (document == null) { document = new Document(); bos = PdfWriter.getInstance(document,fw); BaseFont bf = BaseFont.createFont("Courier", "Cp1252", false); float fontsize = 9.0f; if (fontSize.getText().length() > 0) fontsize = Float.parseFloat(fontSize.getText().trim()); font = new com.lowagie.text.Font(bf, fontsize, com.lowagie.text.Font.NORMAL); if (author.getText().length() > 0) document.addAuthor(author.getText()); if (title.getText().length() > 0) document.addTitle(title.getText()); if (subject.getText().length() > 0) document.addSubject(subject.getText()); // set the page sizes and the page orientation String ps = (String)pageSize.getSelectedItem(); if (ps.equals("A3")) { if (portrait.isSelected()) document.setPageSize(PageSize.A3); else document.setPageSize(PageSize.A3.rotate()); } if (ps.equals("A4")) { if (portrait.isSelected()) document.setPageSize(PageSize.A4); else document.setPageSize(PageSize.A4.rotate()); } if (ps.equals("A5")) { if (portrait.isSelected()) document.setPageSize(PageSize.A5); else document.setPageSize(PageSize.A5.rotate()); } if (ps.equals("LETTER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LETTER); else document.setPageSize(PageSize.LETTER.rotate()); } if (ps.equals("LEGAL")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEGAL); else document.setPageSize(PageSize.LEGAL.rotate()); } if (ps.equals("LEDGER")) { if (portrait.isSelected()) document.setPageSize(PageSize.LEDGER); else document.setPageSize(PageSize.LEDGER.rotate()); } } } catch(IOException _ex) { System.out.println("Cannot open"); } catch(Exception _ex) { System.out.println("Cannot open"); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
contentPane.add(statusBar, BorderLayout.SOUTH); contentPane.add(spoolPanel, BorderLayout.CENTER);
private JPanel pageOne () throws Exception { contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); statusBar.setText(" "); statusBar.setBorder(BorderFactory.createEtchedBorder()); spoolPanel.setLayout(new BorderLayout()); labelSpooledFile.setText(LangTool.getString("spool.labelSpooledFile")); labelJobName.setText(LangTool.getString("spool.labelJobName")); labelUser.setText(LangTool.getString("spool.labelJobUser")); labelNumber.setText(LangTool.getString("spool.labelJobNumber")); labelFileNumber.setText(LangTool.getString("spool.labelSpoolNumber")); labelSystem.setText(LangTool.getString("spool.labelSystem")); labelPages.setText(LangTool.getString("spool.labelPages")); contentPane.add(statusBar, BorderLayout.SOUTH); contentPane.add(spoolPanel, BorderLayout.CENTER); spoolData.setLayout(new AlignLayout(2,5,5)); spoolData.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelSpoolInfo"))); spooledFile.setText(splfile.getName()); jobName.setText(splfile.getJobName()); user.setText(splfile.getJobUser()); spooledFileNumber.setText(Integer.toString(splfile.getNumber())); number.setText(splfile.getJobNumber()); systemName.setText(splfile.getSystem().getSystemName()); pages.setText(splfile.getIntegerAttribute(splfile.ATTR_PAGES).toString()); spoolPanel.add(spoolData, BorderLayout.CENTER); spoolData.add(labelSystem, null); spoolData.add(systemName, null); spoolData.add(labelSpooledFile, null); spoolData.add(spooledFile, null); spoolData.add(labelJobName, null); spoolData.add(jobName, null); spoolData.add(labelUser, null); spoolData.add(user, null); spoolData.add(labelNumber, null); spoolData.add(number, null); spoolData.add(labelFileNumber, null); spoolData.add(spooledFileNumber, null); spoolData.add(labelPages, null); spoolData.add(pages, null); spoolPanel.add(spoolOptions, BorderLayout.SOUTH); spoolOptions.setLayout(new BorderLayout()); JPanel spoolInfo = new JPanel(); AlignLayout alignMe2 = new AlignLayout(3,5,5); spoolInfo.setLayout(alignMe2); spoolInfo.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelExportInfo"))); cvtType = new JComboBox(); cvtType.addItem(LangTool.getString("spool.toPDF")); cvtType.addItem(LangTool.getString("spool.toText")); cvtType.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { if (((String)cvtType.getSelectedItem()).equals(LangTool.getString("spool.toText"))) nextButton.setEnabled(false); else nextButton.setEnabled(true); } }); spoolInfo.add(new JLabel(LangTool.getString("spool.labelFormat"))); spoolInfo.add(cvtType); spoolInfo.add(new JLabel("")); pc = new JRadioButton(LangTool.getString("spool.labelPCPath")); pcPathInfo = new JTextField(30); pcSave = new JButton("..."); pcSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPCFile(); } }); spoolInfo.add(pc); spoolInfo.add(pcPathInfo); spoolInfo.add(pcSave); ifs = new JRadioButton(LangTool.getString("spool.labelIFSPath")); ifsPathInfo = new JTextField(30); spoolInfo.add(ifs); spoolInfo.add(ifsPathInfo); spoolInfo.add(new JLabel("")); email = new JRadioButton(LangTool.getString("spool.labelEmail")); spoolInfo.add(email); spoolInfo.add(new JLabel("")); spoolInfo.add(new JLabel("")); ButtonGroup bg = new ButtonGroup(); bg.add(pc); bg.add(ifs); bg.add(email); pc.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); ifs.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); email.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); pc.setSelected(true); spoolOptions.add(spoolInfo,BorderLayout.CENTER); return contentPane; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
spoolPanel.add(spoolData, BorderLayout.CENTER);
private JPanel pageOne () throws Exception { contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); statusBar.setText(" "); statusBar.setBorder(BorderFactory.createEtchedBorder()); spoolPanel.setLayout(new BorderLayout()); labelSpooledFile.setText(LangTool.getString("spool.labelSpooledFile")); labelJobName.setText(LangTool.getString("spool.labelJobName")); labelUser.setText(LangTool.getString("spool.labelJobUser")); labelNumber.setText(LangTool.getString("spool.labelJobNumber")); labelFileNumber.setText(LangTool.getString("spool.labelSpoolNumber")); labelSystem.setText(LangTool.getString("spool.labelSystem")); labelPages.setText(LangTool.getString("spool.labelPages")); contentPane.add(statusBar, BorderLayout.SOUTH); contentPane.add(spoolPanel, BorderLayout.CENTER); spoolData.setLayout(new AlignLayout(2,5,5)); spoolData.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelSpoolInfo"))); spooledFile.setText(splfile.getName()); jobName.setText(splfile.getJobName()); user.setText(splfile.getJobUser()); spooledFileNumber.setText(Integer.toString(splfile.getNumber())); number.setText(splfile.getJobNumber()); systemName.setText(splfile.getSystem().getSystemName()); pages.setText(splfile.getIntegerAttribute(splfile.ATTR_PAGES).toString()); spoolPanel.add(spoolData, BorderLayout.CENTER); spoolData.add(labelSystem, null); spoolData.add(systemName, null); spoolData.add(labelSpooledFile, null); spoolData.add(spooledFile, null); spoolData.add(labelJobName, null); spoolData.add(jobName, null); spoolData.add(labelUser, null); spoolData.add(user, null); spoolData.add(labelNumber, null); spoolData.add(number, null); spoolData.add(labelFileNumber, null); spoolData.add(spooledFileNumber, null); spoolData.add(labelPages, null); spoolData.add(pages, null); spoolPanel.add(spoolOptions, BorderLayout.SOUTH); spoolOptions.setLayout(new BorderLayout()); JPanel spoolInfo = new JPanel(); AlignLayout alignMe2 = new AlignLayout(3,5,5); spoolInfo.setLayout(alignMe2); spoolInfo.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelExportInfo"))); cvtType = new JComboBox(); cvtType.addItem(LangTool.getString("spool.toPDF")); cvtType.addItem(LangTool.getString("spool.toText")); cvtType.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { if (((String)cvtType.getSelectedItem()).equals(LangTool.getString("spool.toText"))) nextButton.setEnabled(false); else nextButton.setEnabled(true); } }); spoolInfo.add(new JLabel(LangTool.getString("spool.labelFormat"))); spoolInfo.add(cvtType); spoolInfo.add(new JLabel("")); pc = new JRadioButton(LangTool.getString("spool.labelPCPath")); pcPathInfo = new JTextField(30); pcSave = new JButton("..."); pcSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPCFile(); } }); spoolInfo.add(pc); spoolInfo.add(pcPathInfo); spoolInfo.add(pcSave); ifs = new JRadioButton(LangTool.getString("spool.labelIFSPath")); ifsPathInfo = new JTextField(30); spoolInfo.add(ifs); spoolInfo.add(ifsPathInfo); spoolInfo.add(new JLabel("")); email = new JRadioButton(LangTool.getString("spool.labelEmail")); spoolInfo.add(email); spoolInfo.add(new JLabel("")); spoolInfo.add(new JLabel("")); ButtonGroup bg = new ButtonGroup(); bg.add(pc); bg.add(ifs); bg.add(email); pc.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); ifs.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); email.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); pc.setSelected(true); spoolOptions.add(spoolInfo,BorderLayout.CENTER); return contentPane; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
cvtType.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { if (((String)cvtType.getSelectedItem()).equals(LangTool.getString("spool.toText"))) nextButton.setEnabled(false); else nextButton.setEnabled(true); } });
private JPanel pageOne () throws Exception { contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); statusBar.setText(" "); statusBar.setBorder(BorderFactory.createEtchedBorder()); spoolPanel.setLayout(new BorderLayout()); labelSpooledFile.setText(LangTool.getString("spool.labelSpooledFile")); labelJobName.setText(LangTool.getString("spool.labelJobName")); labelUser.setText(LangTool.getString("spool.labelJobUser")); labelNumber.setText(LangTool.getString("spool.labelJobNumber")); labelFileNumber.setText(LangTool.getString("spool.labelSpoolNumber")); labelSystem.setText(LangTool.getString("spool.labelSystem")); labelPages.setText(LangTool.getString("spool.labelPages")); contentPane.add(statusBar, BorderLayout.SOUTH); contentPane.add(spoolPanel, BorderLayout.CENTER); spoolData.setLayout(new AlignLayout(2,5,5)); spoolData.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelSpoolInfo"))); spooledFile.setText(splfile.getName()); jobName.setText(splfile.getJobName()); user.setText(splfile.getJobUser()); spooledFileNumber.setText(Integer.toString(splfile.getNumber())); number.setText(splfile.getJobNumber()); systemName.setText(splfile.getSystem().getSystemName()); pages.setText(splfile.getIntegerAttribute(splfile.ATTR_PAGES).toString()); spoolPanel.add(spoolData, BorderLayout.CENTER); spoolData.add(labelSystem, null); spoolData.add(systemName, null); spoolData.add(labelSpooledFile, null); spoolData.add(spooledFile, null); spoolData.add(labelJobName, null); spoolData.add(jobName, null); spoolData.add(labelUser, null); spoolData.add(user, null); spoolData.add(labelNumber, null); spoolData.add(number, null); spoolData.add(labelFileNumber, null); spoolData.add(spooledFileNumber, null); spoolData.add(labelPages, null); spoolData.add(pages, null); spoolPanel.add(spoolOptions, BorderLayout.SOUTH); spoolOptions.setLayout(new BorderLayout()); JPanel spoolInfo = new JPanel(); AlignLayout alignMe2 = new AlignLayout(3,5,5); spoolInfo.setLayout(alignMe2); spoolInfo.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelExportInfo"))); cvtType = new JComboBox(); cvtType.addItem(LangTool.getString("spool.toPDF")); cvtType.addItem(LangTool.getString("spool.toText")); cvtType.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { if (((String)cvtType.getSelectedItem()).equals(LangTool.getString("spool.toText"))) nextButton.setEnabled(false); else nextButton.setEnabled(true); } }); spoolInfo.add(new JLabel(LangTool.getString("spool.labelFormat"))); spoolInfo.add(cvtType); spoolInfo.add(new JLabel("")); pc = new JRadioButton(LangTool.getString("spool.labelPCPath")); pcPathInfo = new JTextField(30); pcSave = new JButton("..."); pcSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPCFile(); } }); spoolInfo.add(pc); spoolInfo.add(pcPathInfo); spoolInfo.add(pcSave); ifs = new JRadioButton(LangTool.getString("spool.labelIFSPath")); ifsPathInfo = new JTextField(30); spoolInfo.add(ifs); spoolInfo.add(ifsPathInfo); spoolInfo.add(new JLabel("")); email = new JRadioButton(LangTool.getString("spool.labelEmail")); spoolInfo.add(email); spoolInfo.add(new JLabel("")); spoolInfo.add(new JLabel("")); ButtonGroup bg = new ButtonGroup(); bg.add(pc); bg.add(ifs); bg.add(email); pc.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); ifs.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); email.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); pc.setSelected(true); spoolOptions.add(spoolInfo,BorderLayout.CENTER); return contentPane; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
spoolInfo.add(new JLabel(""));
spoolInfo.add(ifsSave);
private JPanel pageOne () throws Exception { contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); statusBar.setText(" "); statusBar.setBorder(BorderFactory.createEtchedBorder()); spoolPanel.setLayout(new BorderLayout()); labelSpooledFile.setText(LangTool.getString("spool.labelSpooledFile")); labelJobName.setText(LangTool.getString("spool.labelJobName")); labelUser.setText(LangTool.getString("spool.labelJobUser")); labelNumber.setText(LangTool.getString("spool.labelJobNumber")); labelFileNumber.setText(LangTool.getString("spool.labelSpoolNumber")); labelSystem.setText(LangTool.getString("spool.labelSystem")); labelPages.setText(LangTool.getString("spool.labelPages")); contentPane.add(statusBar, BorderLayout.SOUTH); contentPane.add(spoolPanel, BorderLayout.CENTER); spoolData.setLayout(new AlignLayout(2,5,5)); spoolData.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelSpoolInfo"))); spooledFile.setText(splfile.getName()); jobName.setText(splfile.getJobName()); user.setText(splfile.getJobUser()); spooledFileNumber.setText(Integer.toString(splfile.getNumber())); number.setText(splfile.getJobNumber()); systemName.setText(splfile.getSystem().getSystemName()); pages.setText(splfile.getIntegerAttribute(splfile.ATTR_PAGES).toString()); spoolPanel.add(spoolData, BorderLayout.CENTER); spoolData.add(labelSystem, null); spoolData.add(systemName, null); spoolData.add(labelSpooledFile, null); spoolData.add(spooledFile, null); spoolData.add(labelJobName, null); spoolData.add(jobName, null); spoolData.add(labelUser, null); spoolData.add(user, null); spoolData.add(labelNumber, null); spoolData.add(number, null); spoolData.add(labelFileNumber, null); spoolData.add(spooledFileNumber, null); spoolData.add(labelPages, null); spoolData.add(pages, null); spoolPanel.add(spoolOptions, BorderLayout.SOUTH); spoolOptions.setLayout(new BorderLayout()); JPanel spoolInfo = new JPanel(); AlignLayout alignMe2 = new AlignLayout(3,5,5); spoolInfo.setLayout(alignMe2); spoolInfo.setBorder(BorderFactory.createTitledBorder( LangTool.getString("spool.labelExportInfo"))); cvtType = new JComboBox(); cvtType.addItem(LangTool.getString("spool.toPDF")); cvtType.addItem(LangTool.getString("spool.toText")); cvtType.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { if (((String)cvtType.getSelectedItem()).equals(LangTool.getString("spool.toText"))) nextButton.setEnabled(false); else nextButton.setEnabled(true); } }); spoolInfo.add(new JLabel(LangTool.getString("spool.labelFormat"))); spoolInfo.add(cvtType); spoolInfo.add(new JLabel("")); pc = new JRadioButton(LangTool.getString("spool.labelPCPath")); pcPathInfo = new JTextField(30); pcSave = new JButton("..."); pcSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPCFile(); } }); spoolInfo.add(pc); spoolInfo.add(pcPathInfo); spoolInfo.add(pcSave); ifs = new JRadioButton(LangTool.getString("spool.labelIFSPath")); ifsPathInfo = new JTextField(30); spoolInfo.add(ifs); spoolInfo.add(ifsPathInfo); spoolInfo.add(new JLabel("")); email = new JRadioButton(LangTool.getString("spool.labelEmail")); spoolInfo.add(email); spoolInfo.add(new JLabel("")); spoolInfo.add(new JLabel("")); ButtonGroup bg = new ButtonGroup(); bg.add(pc); bg.add(ifs); bg.add(email); pc.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); ifs.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); email.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); pc.setSelected(true); spoolOptions.add(spoolInfo,BorderLayout.CENTER); return contentPane; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
e.setNewPage(page);
public void previousBegin(WizardEvent e){// System.out.println(e.getCurrentPage().getName() + " Prev Begin"); contentPane.add(statusBar,BorderLayout.SOUTH); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
statusBar.setText(stat);
cvtToText();
public void run() { statusBar.setText(stat); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
if (sessionArgs == null || sess.getCount() > 0) {
if (sessionArgs == null || sess.getCount() > 0 || sessions.containsKey("emul.showConnectDialog")) {
void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 && sessions.containsKey(sel)){ sessionArgs = new String[NUM_PARMS]; parseArgs((String)sessions.getProperty(sel), sessionArgs); } if (sessionArgs == null || sess.getCount() > 0) { sel = getConnectSession(); if (sel != null) { String selArgs = sessions.getProperty(sel); sessionArgs = new String[NUM_PARMS]; parseArgs(selArgs, sessionArgs);// if (!frame.isVisible())// frame.setVisible(true);// else {// newView();// frame.setVisible(true);// } newSession(sel,sessionArgs); } else { if (sess.getCount() == 0) System.exit(0); } } else {// if (!frame.isVisible())// frame.setVisible(true);// else// newView(); newSession(sel,sessionArgs); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/My5250.java/buggy/tn5250j/src/org/tn5250j/My5250.java
void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 && sessions.containsKey(sel)){ sessionArgs = new String[NUM_PARMS]; parseArgs((String)sessions.getProperty(sel), sessionArgs); } if (sessionArgs == null || sess.getCount() > 0) { sel = getConnectSession(); if (sel != null) { String selArgs = sessions.getProperty(sel); sessionArgs = new String[NUM_PARMS]; parseArgs(selArgs, sessionArgs);// if (!frame.isVisible())// frame.setVisible(true);// else {// newView();// frame.setVisible(true);// } newSession(sel,sessionArgs); } else { if (sess.getCount() == 0) System.exit(0); } } else {// if (!frame.isVisible())// frame.setVisible(true);// else// newView(); newSession(sel,sessionArgs); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/My5250.java/buggy/tn5250j/src/org/tn5250j/My5250.java
void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 && sessions.containsKey(sel)){ sessionArgs = new String[NUM_PARMS]; parseArgs((String)sessions.getProperty(sel), sessionArgs); } if (sessionArgs == null || sess.getCount() > 0) { sel = getConnectSession(); if (sel != null) { String selArgs = sessions.getProperty(sel); sessionArgs = new String[NUM_PARMS]; parseArgs(selArgs, sessionArgs);// if (!frame.isVisible())// frame.setVisible(true);// else {// newView();// frame.setVisible(true);// } newSession(sel,sessionArgs); } else { if (sess.getCount() == 0) System.exit(0); } } else {// if (!frame.isVisible())// frame.setVisible(true);// else// newView(); newSession(sel,sessionArgs); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/My5250.java/buggy/tn5250j/src/org/tn5250j/My5250.java
return (Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(src.getSource(), new GrayFilter(true, 0))));
return (Toolkit.getDefaultToolkit().createImage(new FilteredImageSource( src.getSource(), new GrayFilter(true, 0))));
public static Image createDisabledImage(Image src) { return (Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(src.getSource(), new GrayFilter(true, 0)))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/GrayFilter.java/buggy/core/src/classpath/javax/javax/swing/GrayFilter.java
out = conn.getObjectOutputStream();
out = conn.startObjectOutputStream();
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOutputStream dout; try { dout = conn.getDataOutputStream(); dout.writeByte(MESSAGE_CALL); out = conn.getObjectOutputStream(); objid.write(out); out.writeInt(opnum); out.writeLong(hash); // must handle primitive class and their wrapper classes Class clss[] = method.getParameterTypes(); for(int i = 0; i < clss.length; i++) ((RMIObjectOutputStream)out).writeValue(params[i], clss[i]); out.flush(); } catch (IOException e2) { throw new RemoteException("call failed: ", e2); } int returncode; Object returnval; DataInputStream din; ObjectInputStream in; UID ack; try { din = conn.getDataInputStream(); if ((returncode = din.readUnsignedByte()) != MESSAGE_CALL_ACK) { conn.disconnect(); throw new RemoteException("Call not acked:" + returncode); } in = conn.getObjectInputStream(); returncode = in.readUnsignedByte(); ack = UID.read(in); Class cls = method.getReturnType(); if(cls == Void.TYPE){ returnval = null; in.readObject(); }else returnval = ((RMIObjectInputStream)in).readValue(cls); } catch (IOException e3) { //for debug: e3.printStackTrace(); throw new RemoteException("call return failed: ", e3); } /* if DGCAck is necessary?? //According to RMI wire protocol, send a DGCAck // to indicate receiving return value dout.writeByte(MESSAGE_DGCACK); ack.write(dout); out.flush(); */ manager.discardConnection(conn); if (returncode != RETURN_ACK && returnval != null) { throw (Exception)returnval; } return (returnval);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastRef.java
in = conn.getObjectInputStream();
in = conn.startObjectInputStream();
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOutputStream dout; try { dout = conn.getDataOutputStream(); dout.writeByte(MESSAGE_CALL); out = conn.getObjectOutputStream(); objid.write(out); out.writeInt(opnum); out.writeLong(hash); // must handle primitive class and their wrapper classes Class clss[] = method.getParameterTypes(); for(int i = 0; i < clss.length; i++) ((RMIObjectOutputStream)out).writeValue(params[i], clss[i]); out.flush(); } catch (IOException e2) { throw new RemoteException("call failed: ", e2); } int returncode; Object returnval; DataInputStream din; ObjectInputStream in; UID ack; try { din = conn.getDataInputStream(); if ((returncode = din.readUnsignedByte()) != MESSAGE_CALL_ACK) { conn.disconnect(); throw new RemoteException("Call not acked:" + returncode); } in = conn.getObjectInputStream(); returncode = in.readUnsignedByte(); ack = UID.read(in); Class cls = method.getReturnType(); if(cls == Void.TYPE){ returnval = null; in.readObject(); }else returnval = ((RMIObjectInputStream)in).readValue(cls); } catch (IOException e3) { //for debug: e3.printStackTrace(); throw new RemoteException("call return failed: ", e3); } /* if DGCAck is necessary?? //According to RMI wire protocol, send a DGCAck // to indicate receiving return value dout.writeByte(MESSAGE_DGCACK); ack.write(dout); out.flush(); */ manager.discardConnection(conn); if (returncode != RETURN_ACK && returnval != null) { throw (Exception)returnval; } return (returnval);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastRef.java
if(cls == Void.TYPE){
if (returncode == RETURN_NACK) { returnval = in.readObject(); } else if(cls == Void.TYPE) {
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOutputStream dout; try { dout = conn.getDataOutputStream(); dout.writeByte(MESSAGE_CALL); out = conn.getObjectOutputStream(); objid.write(out); out.writeInt(opnum); out.writeLong(hash); // must handle primitive class and their wrapper classes Class clss[] = method.getParameterTypes(); for(int i = 0; i < clss.length; i++) ((RMIObjectOutputStream)out).writeValue(params[i], clss[i]); out.flush(); } catch (IOException e2) { throw new RemoteException("call failed: ", e2); } int returncode; Object returnval; DataInputStream din; ObjectInputStream in; UID ack; try { din = conn.getDataInputStream(); if ((returncode = din.readUnsignedByte()) != MESSAGE_CALL_ACK) { conn.disconnect(); throw new RemoteException("Call not acked:" + returncode); } in = conn.getObjectInputStream(); returncode = in.readUnsignedByte(); ack = UID.read(in); Class cls = method.getReturnType(); if(cls == Void.TYPE){ returnval = null; in.readObject(); }else returnval = ((RMIObjectInputStream)in).readValue(cls); } catch (IOException e3) { //for debug: e3.printStackTrace(); throw new RemoteException("call return failed: ", e3); } /* if DGCAck is necessary?? //According to RMI wire protocol, send a DGCAck // to indicate receiving return value dout.writeByte(MESSAGE_DGCACK); ack.write(dout); out.flush(); */ manager.discardConnection(conn); if (returncode != RETURN_ACK && returnval != null) { throw (Exception)returnval; } return (returnval);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastRef.java
in.readObject(); }else returnval = ((RMIObjectInputStream)in).readValue(cls);
} else { returnval = ((RMIObjectInputStream)in).readValue(cls);
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOutputStream dout; try { dout = conn.getDataOutputStream(); dout.writeByte(MESSAGE_CALL); out = conn.getObjectOutputStream(); objid.write(out); out.writeInt(opnum); out.writeLong(hash); // must handle primitive class and their wrapper classes Class clss[] = method.getParameterTypes(); for(int i = 0; i < clss.length; i++) ((RMIObjectOutputStream)out).writeValue(params[i], clss[i]); out.flush(); } catch (IOException e2) { throw new RemoteException("call failed: ", e2); } int returncode; Object returnval; DataInputStream din; ObjectInputStream in; UID ack; try { din = conn.getDataInputStream(); if ((returncode = din.readUnsignedByte()) != MESSAGE_CALL_ACK) { conn.disconnect(); throw new RemoteException("Call not acked:" + returncode); } in = conn.getObjectInputStream(); returncode = in.readUnsignedByte(); ack = UID.read(in); Class cls = method.getReturnType(); if(cls == Void.TYPE){ returnval = null; in.readObject(); }else returnval = ((RMIObjectInputStream)in).readValue(cls); } catch (IOException e3) { //for debug: e3.printStackTrace(); throw new RemoteException("call return failed: ", e3); } /* if DGCAck is necessary?? //According to RMI wire protocol, send a DGCAck // to indicate receiving return value dout.writeByte(MESSAGE_DGCACK); ack.write(dout); out.flush(); */ manager.discardConnection(conn); if (returncode != RETURN_ACK && returnval != null) { throw (Exception)returnval; } return (returnval);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastRef.java
catch (IOException e3) {
} catch (IOException e3) {
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOutputStream dout; try { dout = conn.getDataOutputStream(); dout.writeByte(MESSAGE_CALL); out = conn.getObjectOutputStream(); objid.write(out); out.writeInt(opnum); out.writeLong(hash); // must handle primitive class and their wrapper classes Class clss[] = method.getParameterTypes(); for(int i = 0; i < clss.length; i++) ((RMIObjectOutputStream)out).writeValue(params[i], clss[i]); out.flush(); } catch (IOException e2) { throw new RemoteException("call failed: ", e2); } int returncode; Object returnval; DataInputStream din; ObjectInputStream in; UID ack; try { din = conn.getDataInputStream(); if ((returncode = din.readUnsignedByte()) != MESSAGE_CALL_ACK) { conn.disconnect(); throw new RemoteException("Call not acked:" + returncode); } in = conn.getObjectInputStream(); returncode = in.readUnsignedByte(); ack = UID.read(in); Class cls = method.getReturnType(); if(cls == Void.TYPE){ returnval = null; in.readObject(); }else returnval = ((RMIObjectInputStream)in).readValue(cls); } catch (IOException e3) { //for debug: e3.printStackTrace(); throw new RemoteException("call return failed: ", e3); } /* if DGCAck is necessary?? //According to RMI wire protocol, send a DGCAck // to indicate receiving return value dout.writeByte(MESSAGE_DGCACK); ack.write(dout); out.flush(); */ manager.discardConnection(conn); if (returncode != RETURN_ACK && returnval != null) { throw (Exception)returnval; } return (returnval);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastRef.java
throw (Exception)returnval;
if (returncode == RETURN_NACK) throw (Exception)returnval; else throw new RemoteException("unexpected returncode: " + returncode);
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception { UnicastConnection conn; try { conn = manager.getConnection(); } catch (IOException e1) { throw new RemoteException("connection failed to host: " + manager.serverName, e1); } ObjectOutputStream out; DataOutputStream dout; try { dout = conn.getDataOutputStream(); dout.writeByte(MESSAGE_CALL); out = conn.getObjectOutputStream(); objid.write(out); out.writeInt(opnum); out.writeLong(hash); // must handle primitive class and their wrapper classes Class clss[] = method.getParameterTypes(); for(int i = 0; i < clss.length; i++) ((RMIObjectOutputStream)out).writeValue(params[i], clss[i]); out.flush(); } catch (IOException e2) { throw new RemoteException("call failed: ", e2); } int returncode; Object returnval; DataInputStream din; ObjectInputStream in; UID ack; try { din = conn.getDataInputStream(); if ((returncode = din.readUnsignedByte()) != MESSAGE_CALL_ACK) { conn.disconnect(); throw new RemoteException("Call not acked:" + returncode); } in = conn.getObjectInputStream(); returncode = in.readUnsignedByte(); ack = UID.read(in); Class cls = method.getReturnType(); if(cls == Void.TYPE){ returnval = null; in.readObject(); }else returnval = ((RMIObjectInputStream)in).readValue(cls); } catch (IOException e3) { //for debug: e3.printStackTrace(); throw new RemoteException("call return failed: ", e3); } /* if DGCAck is necessary?? //According to RMI wire protocol, send a DGCAck // to indicate receiving return value dout.writeByte(MESSAGE_DGCACK); ack.write(dout); out.flush(); */ manager.discardConnection(conn); if (returncode != RETURN_ACK && returnval != null) { throw (Exception)returnval; } return (returnval);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastRef.java
if (!( type().kind().value() == TCKind._tk_alias && has._type().kind().value() == kind ) )
protected void check(int kind) throws BAD_OPERATION { if (has == null) throw new BAD_OPERATION("value not set"); if (xKind >= 0) { if (xKind != kind) throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) + " when stored " + typeNamer.nameIt(xKind) ); } else { if (type().kind().value() != kind) throw new BAD_OPERATION("Extracting " + typeNamer.nameIt(kind) + " stored " + typeNamer.nameIt(type()) ); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
public void insert_Value(Serializable x, TypeCode typecode)
public void insert_Value(Serializable x, TypeCode c_typecode) { if (typecode != null && typecode.kind() == TCKind.tk_value_box) { has = new gnuValueHolder(x, typecode); } else
public void insert_Value(Serializable x, TypeCode typecode) { type(typecode); insert_Value(x); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
}
public void insert_Value(Serializable x, TypeCode typecode) { type(typecode); insert_Value(x); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
has._read(input);
if (!(has instanceof universalHolder) && (kind == TCKind._tk_value_box)) { Field vField = has.getClass().getField("value"); BoxedValueHelper helper; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(a_type.id())); helper = (BoxedValueHelper) helperClass.newInstance();
public void read_value(org.omg.CORBA.portable.InputStream input, TypeCode a_type ) throws MARSHAL { try { int kind = a_type.kind().value(); // Fixed needs special handling. if (kind == TCKind._tk_fixed) { BigDecimal dec = BigDecimalHelper.read(input, a_type.fixed_scale()); has = new FixedHolder(dec); } else { has = holderFactory.createHolder(a_type); if (has == null) { // Use the Universal Holder that reads till the end of stream. // This works with the extract/insert pair of the typical // Helper. cdrBufOutput buffer = new cdrBufOutput(); buffer.setOrb(orb); has = new universalHolder(buffer); } } type(a_type); has._read(input); } catch (BadKind ex) { throw new MARSHAL("Bad kind: " + ex.getMessage()); } catch (IOException ex) { throw new MARSHAL("IO exception: " + ex.getMessage()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
catch (BadKind ex)
catch (Exception ex)
public void read_value(org.omg.CORBA.portable.InputStream input, TypeCode a_type ) throws MARSHAL { try { int kind = a_type.kind().value(); // Fixed needs special handling. if (kind == TCKind._tk_fixed) { BigDecimal dec = BigDecimalHelper.read(input, a_type.fixed_scale()); has = new FixedHolder(dec); } else { has = holderFactory.createHolder(a_type); if (has == null) { // Use the Universal Holder that reads till the end of stream. // This works with the extract/insert pair of the typical // Helper. cdrBufOutput buffer = new cdrBufOutput(); buffer.setOrb(orb); has = new universalHolder(buffer); } } type(a_type); has._read(input); } catch (BadKind ex) { throw new MARSHAL("Bad kind: " + ex.getMessage()); } catch (IOException ex) { throw new MARSHAL("IO exception: " + ex.getMessage()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
throw new MARSHAL("Bad kind: " + ex.getMessage());
helper = null; } Object content = Vio.read(input, helper); vField.set(has, content); } else has._read(input);
public void read_value(org.omg.CORBA.portable.InputStream input, TypeCode a_type ) throws MARSHAL { try { int kind = a_type.kind().value(); // Fixed needs special handling. if (kind == TCKind._tk_fixed) { BigDecimal dec = BigDecimalHelper.read(input, a_type.fixed_scale()); has = new FixedHolder(dec); } else { has = holderFactory.createHolder(a_type); if (has == null) { // Use the Universal Holder that reads till the end of stream. // This works with the extract/insert pair of the typical // Helper. cdrBufOutput buffer = new cdrBufOutput(); buffer.setOrb(orb); has = new universalHolder(buffer); } } type(a_type); has._read(input); } catch (BadKind ex) { throw new MARSHAL("Bad kind: " + ex.getMessage()); } catch (IOException ex) { throw new MARSHAL("IO exception: " + ex.getMessage()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
catch (IOException ex)
catch (Exception ex)
public void read_value(org.omg.CORBA.portable.InputStream input, TypeCode a_type ) throws MARSHAL { try { int kind = a_type.kind().value(); // Fixed needs special handling. if (kind == TCKind._tk_fixed) { BigDecimal dec = BigDecimalHelper.read(input, a_type.fixed_scale()); has = new FixedHolder(dec); } else { has = holderFactory.createHolder(a_type); if (has == null) { // Use the Universal Holder that reads till the end of stream. // This works with the extract/insert pair of the typical // Helper. cdrBufOutput buffer = new cdrBufOutput(); buffer.setOrb(orb); has = new universalHolder(buffer); } } type(a_type); has._read(input); } catch (BadKind ex) { throw new MARSHAL("Bad kind: " + ex.getMessage()); } catch (IOException ex) { throw new MARSHAL("IO exception: " + ex.getMessage()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
throw new MARSHAL("IO exception: " + ex.getMessage());
MARSHAL m = new MARSHAL(); m.initCause(ex); throw m;
public void read_value(org.omg.CORBA.portable.InputStream input, TypeCode a_type ) throws MARSHAL { try { int kind = a_type.kind().value(); // Fixed needs special handling. if (kind == TCKind._tk_fixed) { BigDecimal dec = BigDecimalHelper.read(input, a_type.fixed_scale()); has = new FixedHolder(dec); } else { has = holderFactory.createHolder(a_type); if (has == null) { // Use the Universal Holder that reads till the end of stream. // This works with the extract/insert pair of the typical // Helper. cdrBufOutput buffer = new cdrBufOutput(); buffer.setOrb(orb); has = new universalHolder(buffer); } } type(a_type); has._read(input); } catch (BadKind ex) { throw new MARSHAL("Bad kind: " + ex.getMessage()); } catch (IOException ex) { throw new MARSHAL("IO exception: " + ex.getMessage()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
else if (xKind == TCKind._tk_null || xKind == TCKind._tk_objref || xKind == TCKind._tk_value || xKind == TCKind._tk_value_box ) output.write_long(0);
public void write_value(org.omg.CORBA.portable.OutputStream output) { if (has != null) has._write(output); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
return new QuadSegment(P1.getX(), P1.getY(), cp.getX(), cp.getY(), P2.getX(), P2.getY());
QuadSegment segment = null; try { segment = (QuadSegment) super.clone(); segment.P1 = (Point2D) P1.clone(); segment.P2 = (Point2D) P2.clone(); segment.cp = (Point2D) cp.clone(); } catch (CloneNotSupportedException cnse) { InternalError ie = new InternalError(); ie.initCause(cnse); throw ie; } return segment;
public Object clone() { return new QuadSegment(P1.getX(), P1.getY(), cp.getX(), cp.getY(), P2.getX(), P2.getY()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3745505a7d2835f7ecc46a1f562d0058cf71c6bd/QuadSegment.java/buggy/core/src/classpath/gnu/gnu/java/awt/java2d/QuadSegment.java
conPath2 = new File(GlobalConfigure.instance().getProperty(
conPath2 = new File(GlobalConfigure.getInstance().getProperty(
public static void loadMacros(Session session, Macronizer macros, JMenu menu) { final Session ses = session; Vector mv = new Vector(); Action action; menu.addSeparator(); String[] macrosList = Macronizer.getMacroList(); for (int x = 0; x < macrosList.length; x++) { mv.add(macrosList[x]); } Collections.sort(mv); for (int x = 0; x < mv.size(); x++) { action = new AbstractAction((String)mv.get(x)) { public void actionPerformed(ActionEvent e) { ses.executeMeMacro(e); } }; JMenuItem mi = menu.add(action); final Gui5250 ji = (Gui5250)session; mi.addMouseListener(new MouseAdapter() { public void mouseReleased(MouseEvent e) { if (SwingUtilities.isRightMouseButton(e)) { doOptionsPopup(e,ses); } } public void mousePressed(MouseEvent e) { if (SwingUtilities.isRightMouseButton(e)) { doOptionsPopup(e,ses); } } public void mouseClicked(MouseEvent e) { if (SwingUtilities.isRightMouseButton(e)) { doOptionsPopup(e,ses); } } }); } scriptDir("scripts",menu,session); String conPath = ""; String conPath2 = ""; try { conPath = new File("scripts").getCanonicalPath(); conPath2 = new File(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts").getCanonicalPath(); } catch (IOException ioe ) { } // lets not load the menu again if they point to the same place if (!conPath.equals(conPath2)) scriptDir(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts",menu,session); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/LoadMacroMenu.java/clean/tn5250j/src/org/tn5250j/tools/LoadMacroMenu.java
scriptDir(GlobalConfigure.instance().getProperty(
scriptDir(GlobalConfigure.getInstance().getProperty(
public static void loadMacros(Session session, Macronizer macros, JMenu menu) { final Session ses = session; Vector mv = new Vector(); Action action; menu.addSeparator(); String[] macrosList = Macronizer.getMacroList(); for (int x = 0; x < macrosList.length; x++) { mv.add(macrosList[x]); } Collections.sort(mv); for (int x = 0; x < mv.size(); x++) { action = new AbstractAction((String)mv.get(x)) { public void actionPerformed(ActionEvent e) { ses.executeMeMacro(e); } }; JMenuItem mi = menu.add(action); final Gui5250 ji = (Gui5250)session; mi.addMouseListener(new MouseAdapter() { public void mouseReleased(MouseEvent e) { if (SwingUtilities.isRightMouseButton(e)) { doOptionsPopup(e,ses); } } public void mousePressed(MouseEvent e) { if (SwingUtilities.isRightMouseButton(e)) { doOptionsPopup(e,ses); } } public void mouseClicked(MouseEvent e) { if (SwingUtilities.isRightMouseButton(e)) { doOptionsPopup(e,ses); } } }); } scriptDir("scripts",menu,session); String conPath = ""; String conPath2 = ""; try { conPath = new File("scripts").getCanonicalPath(); conPath2 = new File(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts").getCanonicalPath(); } catch (IOException ioe ) { } // lets not load the menu again if they point to the same place if (!conPath.equals(conPath2)) scriptDir(GlobalConfigure.instance().getProperty( "emulator.settingsDirectory") + "scripts",menu,session); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/LoadMacroMenu.java/clean/tn5250j/src/org/tn5250j/tools/LoadMacroMenu.java
public CheckboxMenuItem(String label, boolean state) { super(label); this.state = state; if (GraphicsEnvironment.isHeadless()) throw new HeadlessException(); }
CheckboxMenuItem() { this("", false); }
public CheckboxMenuItem(String label, boolean state) { super(label); this.state = state; if (GraphicsEnvironment.isHeadless()) throw new HeadlessException(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/buggy/core/src/classpath/java/java/awt/CheckboxMenuItem.java
public synchronized void addItemListener(ItemListener listener) {
addItemListener(ItemListener listener) {
public synchronized void addItemListener(ItemListener listener) { item_listeners = AWTEventMulticaster.add(item_listeners, listener); enableEvents(AWTEvent.ITEM_EVENT_MASK); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/buggy/core/src/classpath/java/java/awt/CheckboxMenuItem.java
}
}
public synchronized void addItemListener(ItemListener listener) { item_listeners = AWTEventMulticaster.add(item_listeners, listener); enableEvents(AWTEvent.ITEM_EVENT_MASK); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/buggy/core/src/classpath/java/java/awt/CheckboxMenuItem.java
public synchronized void setState(boolean state) {
setState(boolean state) {
public synchronized void setState(boolean state) { this.state = state; if (peer != null) { CheckboxMenuItemPeer cp = (CheckboxMenuItemPeer) peer; cp.setState(state); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/buggy/core/src/classpath/java/java/awt/CheckboxMenuItem.java
if (peer != null) {
if (peer != null) {
public synchronized void setState(boolean state) { this.state = state; if (peer != null) { CheckboxMenuItemPeer cp = (CheckboxMenuItemPeer) peer; cp.setState(state); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/buggy/core/src/classpath/java/java/awt/CheckboxMenuItem.java
cp.setState(state); }
cp.setState (state);
public synchronized void setState(boolean state) { this.state = state; if (peer != null) { CheckboxMenuItemPeer cp = (CheckboxMenuItemPeer) peer; cp.setState(state); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/buggy/core/src/classpath/java/java/awt/CheckboxMenuItem.java
}
public synchronized void setState(boolean state) { this.state = state; if (peer != null) { CheckboxMenuItemPeer cp = (CheckboxMenuItemPeer) peer; cp.setState(state); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/buggy/core/src/classpath/java/java/awt/CheckboxMenuItem.java
public final void add(VmMethod method, int pc, int offset) { addressTable.add(method, pc, offset);
public final void add(VmMethod method, int pc, int offset, int inlineDepth) { addressTable.add(method, pc, offset, inlineDepth);
public final void add(VmMethod method, int pc, int offset) { addressTable.add(method, pc, offset); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/CompiledMethod.java/clean/core/src/core/org/jnode/vm/compiler/CompiledMethod.java
public Screen5250(Gui5250 gui, Properties props) { this.gui = gui; loadProps(props); try { jbInit(); } catch(Exception ex) { ex.printStackTrace(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
private void displayError (int ec) { saveHomePos = homePos; homePos = lastPos + numCols + 1; pendingInsert = true; gui.sendNegResponse2(ec); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff();
if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) {
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
text = bufferedKeys + text;
if (text != null) { text = bufferedKeys + text; }
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
bufferedKeys = "";
bufferedKeys = null;
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
while (strokenizer.hasMoreKeyStrokes() && !done) {
while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked && !isStatusErrorCode() && !done) {
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
if (s != null)
if (s != null) {
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
System.out.println(" mnemonic " + s);
System.out.println(" send keys mnemonic " + s);
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
public void setKeyboardLocked (boolean k) {// System.out.println(" lock it " + k); keyboardLocked = k; if (!keyboardLocked) { if (keysBuffered) { sendKeys(""); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
public void setKeyboardLocked (boolean k) {// System.out.println(" lock it " + k); keyboardLocked = k; if (!keyboardLocked) { if (keysBuffered) { sendKeys(""); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
public void setKeyboardLocked (boolean k) {// System.out.println(" lock it " + k); keyboardLocked = k; if (!keyboardLocked) { if (keysBuffered) { sendKeys(""); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
statusErrorCode = true; setKeyboardLocked(true);
setPrehelpState(true);
public void setStatus(byte attr,byte value,String s) { statusString = s; // draw the status information bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite); // set environment variables switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
statusErrorCode = false; setKeyboardLocked(false);
setPrehelpState(false);
public void setStatus(byte attr,byte value,String s) { statusString = s; // draw the status information bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite); // set environment variables switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,null);
return false;
protected boolean simulateKeyStroke(char c){ if (isStatusErrorCode() && !Character.isISOControl(c) && !keyProcessed) { restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,null); } boolean updateField = false; boolean numericError = false; boolean updatePos = false; boolean autoEnter = false; if (!Character.isISOControl(c)) { if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { switch (screenFields.getCurrentFieldShift()) { case 0: // Alpha shift case 2: // Numeric Shift case 4: // Kakana Shift updateField = true; break; case 1: // Alpha Only if(Character.isLetter(c) || c == ',' || c == '-' || c == '.' || c == ' ') updateField = true; break; case 3: // Numeric only if(Character.isDigit(c) || c == '+' || c == ',' || c == '-' || c == '.' || c == ' ') updateField = true; else numericError = true; break; case 5: // Digits only if(Character.isDigit(c)) updateField = true; else displayError(ERR_NUMERIC_09); break; case 7: // Signed numeric if(Character.isDigit(c) || c == '+' || c == '-') if (lastPos == screenFields.getCurrentField().endPos() && (c != '+' && c != '-')) displayError(ERR_INVALID_SIGN); else updateField = true; else displayError(ERR_NUMERIC_09); break; } if (updateField) { if (screenFields.isCurrentFieldToUpper()) c = Character.toUpperCase(c); setCursorOff(); updatePos = true; resetDirty(lastPos); if (insertMode) { if (endOfField(false) != screenFields.getCurrentField().endPos()) shiftRight(lastPos); else { displayError(ERR_NO_ROOM_INSERT); updatePos = false; } } if (updatePos) { screenFields.getCurrentField().getKeyPos(getRow(lastPos),getCol(lastPos)); screenFields.getCurrentField().changePos(1); screen[lastPos].setChar(c); screenFields.setCurrentFieldMDT(); // if we have gone passed the end of the field then goto the next field if (!screenFields.withinCurrentField(screenFields.getCurrentFieldPos())) { if (screenFields.isCurrentFieldAutoEnter()) { autoEnter = true; } else if (!screenFields.isCurrentFieldFER()) gotoFieldNext(); } else goto_XY(screenFields.getCurrentField().getCursorRow() + 1,screenFields.getCurrentField().getCursorCol() + 1); } updateImage(dirty); setCursorOn(); if (autoEnter) sendAid(AID_ENTER); } else { if (numericError) { displayError(ERR_NUMERIC_ONLY); } } } else { displayError(ERR_CURSOR_PROTECTED); } } return updatePos; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/164fea1bcfa92d225150e31fe0e5d58d3d38cb23/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
return (flags & SYNTETIC) != 0; }
return (flags & SYNTHETIC) != 0; }
boolean isSyntetic() { return (flags & SYNTETIC) != 0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/HTML.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTML.java
{
{
private static void unexpected(Exception ex) throws Error { throw new Error("This should never happen, report a bug", ex); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/HTML.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTML.java
{
{
public static Tag getTag(String tagName) { if (tagMap == null) { // Create the mao on demand. tagMap = new TreeMap(); Tag[] tags = getAllTags(); for (int i = 0; i < tags.length; i++) { tagMap.put(tags [ i ].toString(), tags [ i ]); } } return (Tag) tagMap.get(tagName.toLowerCase()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/HTML.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTML.java
}
}
public static Tag getTag(String tagName) { if (tagMap == null) { // Create the mao on demand. tagMap = new TreeMap(); Tag[] tags = getAllTags(); for (int i = 0; i < tags.length; i++) { tagMap.put(tags [ i ].toString(), tags [ i ]); } } return (Tag) tagMap.get(tagName.toLowerCase()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/HTML.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTML.java
if (stopMatchingIfSatisfied) break;
private boolean matchP(CharIndexed input, REMatch mymatch, boolean tryOnly) { REMatch.REMatchList newMatch = new REMatch.REMatchList(); REToken tk; for (int i=0; i < options.size(); i++) { // In order that the backtracking can work, // each option must be chained to the next token. // But the chain method has some side effect, so // we use clones. tk = (REToken)((REToken) options.elementAt(i)).clone(); if (! tryOnly) { tk.chain(this.next); tk.setUncle(this.uncle); tk.subIndex = this.subIndex; } REMatch tryMatch = (REMatch) mymatch.clone(); if (tk.match(input, tryMatch)) { // match was successful if (tryOnly) return true; newMatch.addTail(tryMatch); } // is a match } // try next option if (tryOnly) return false; if (newMatch.head != null) { // set contents of mymatch equal to newMatch // try each one that matched mymatch.assignFrom(newMatch.head); return true; } else { return false; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/RETokenOneOf.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenOneOf.java
Thread printerThread = new PrinterThread(planes.screen, font, numCols,
Thread printerThread = new PrinterThread(this, font, numCols,
public final void printMe() { Thread printerThread = new PrinterThread(planes.screen, font, numCols, numRows, colorBg, defaultPrinter, (Session) gui); printerThread.start(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c5eb8e840b5f3356b24c8dd991c0b6247ecf6849/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
sb.append(vt.getASCIIChar(abyte0[163 + f] & 0xff));
sb.append(vt.ebcdic2uni(abyte0[163 + f] & 0xff));
private boolean getMbrSize(String member) { boolean flag = true; if(ftpOutputStream == null) { printFTPInfo("Not connected to any server!"); return false; } if(!loggedIn) { printFTPInfo("Login was not successful! Aborting!"); return false; } Socket socket = null; DataInputStream datainputstream = null; executeCommand("TYPE","I"); String remoteFile = "QTEMP/FML"; members = new Vector(10); boolean foundMbr = false; try { socket = createPassiveSocket("RETR " + remoteFile); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); byte abyte0[] = new byte[858]; int c = 0; int kj = 0; int len = 0; StringBuffer sb = new StringBuffer(10); printFTPInfo("<----------------- Member Information ---------------->"); for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == abyte0.length) { sb.setLength(0); // the offset for member name MBNAME is 164 with offset of 1 but // we have to offset the buffer by 0 which makes it 164 - 1 // or 163 for (int f = 0;f < 10; f++) { sb.append(vt.getASCIIChar(abyte0[163 + f] & 0xff)); } printFTPInfo(sb + " " + packed2int(abyte0,345,5)); members.add(new MemberInfo(sb.toString(),packed2int(abyte0,345,5)));// if (member == null && fileSize == 0) {// // get current number of records// fileSize = packed2int(abyte0,345,5);// status.setFileLength(fileSize);// member = sb.toString();// break;// }// else {// if (sb.toString().equalsIgnoreCase(member)) {// // get current number of records// fileSize = packed2int(abyte0,345,5);// status.setFileLength(fileSize);//// }// else {// fileSize = packed2int(abyte0,345,5);// status.setFileLength(fileSize);// }// } len =0; } } printFTPInfo("Member list Transfer complete!"); } else flag = false; } catch(Exception _ex) { printFTPInfo("Error! " + _ex); return false; } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } } parseResponse(); return flag; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d4104819203aa6b5361aa997d2cd29a076f417a7/FTP5250Prot.java/clean/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
public XDF getOwner (XDF obj) {
public XDF getOwner () {
public XDF getOwner (XDF obj) { return owner; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/a62fc9d60384d194d1d42f1e4cec7b45f8f90452/DocumentType.java/buggy/src/gov/nasa/gsfc/adc/xdf/DocumentType.java
if (c != null)
if (c != null)
public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // if the slider is enabled, draw dots and highlights if (c.isEnabled()) { if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); // draw highlights if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
focus = c.hasFocus();
focus = c.hasFocus();
public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // if the slider is enabled, draw dots and highlights if (c.isEnabled()) { if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); // draw highlights if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // if the slider is enabled, draw dots and highlights if (c.isEnabled()) { if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); // draw highlights if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2);
g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4);
public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // if the slider is enabled, draw dots and highlights if (c.isEnabled()) { if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); // draw highlights if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6);
g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6);
public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // if the slider is enabled, draw dots and highlights if (c.isEnabled()) { if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); // draw highlights if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color);
Color savedColor = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getPrimaryControl()); g.fillRect(x + 2, y + 6, 7, 7); if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 5, x + 5, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 9, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.drawLine(x, y + 4, x + 5, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 3, y + 12, x + 8, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 11); g.drawLine(x + 9, y + 8, x + 9, y + 8); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 6, y + 5, x + 6, y + 5); g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); g.drawLine(x + 10, y + 8, x + 10, y + 13); g.drawLine(x + 1, y + 14, x + 10, y + 14); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11);
public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 5, x + 5, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 9, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.drawLine(x, y + 4, x + 5, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 3, y + 12, x + 8, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 11); g.drawLine(x + 9, y + 8, x + 9, y + 8); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 6, y + 5, x + 6, y + 5); g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); g.drawLine(x + 10, y + 8, x + 10, y + 13); g.drawLine(x + 1, y + 14, x + 10, y + 14); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
if (!b.getModel().isPressed()) { g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); } g.setColor(savedColor);
public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 5, x + 5, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 9, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.drawLine(x, y + 4, x + 5, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 3, y + 12, x + 8, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 11); g.drawLine(x + 9, y + 8, x + 9, y + 8); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 6, y + 5, x + 6, y + 5); g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); g.drawLine(x + 10, y + 8, x + 10, y + 13); g.drawLine(x + 1, y + 14, x + 10, y + 14); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
Color savedColor = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getPrimaryControl()); g.fillRect(x + 2, y + 2, 10, 10); if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getBlack()); else { boolean selected = true; if (selected) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); }
public void paintIcon(Component c, Graphics g, int x, int y) { // draw the gray areas first g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 12); g.drawLine(x + 1, y + 13, x + 13, y + 13); g.drawLine(x + 13, y + 2, x + 13, y + 12); g.fillRect(x + 4, y + 4, 2, 2); g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y, x + 13, y); g.drawLine(x, y + 1, x, y + 13); g.drawLine(x + 3, y + 4, x + 4, y + 3); g.drawLine(x + 3, y + 9, x + 5, y + 7); g.drawLine(x + 7, y + 5, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 11); g.drawLine(x + 3, y + 12, x + 12, y + 12); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 14, x + 14, y + 14); g.drawLine(x + 14, y + 1, x + 14, y + 14); g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5);
g.fillRect(x + 5, y + 5, 4, 4); g.drawLine(x + 9, y + 4, x + 10, y + 4); g.drawLine(x + 9, y + 4, x + 9, y + 5); g.drawLine(x + 4, y + 9, x + 4, y + 10); g.drawLine(x + 4, y + 9, x + 5, y + 9); g.drawLine(x + 9, y + 8, x + 9, y + 10); g.drawLine(x + 8, y + 9, x + 10, y + 9);
public void paintIcon(Component c, Graphics g, int x, int y) { // draw the gray areas first g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 12); g.drawLine(x + 1, y + 13, x + 13, y + 13); g.drawLine(x + 13, y + 2, x + 13, y + 12); g.fillRect(x + 4, y + 4, 2, 2); g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y, x + 13, y); g.drawLine(x, y + 1, x, y + 13); g.drawLine(x + 3, y + 4, x + 4, y + 3); g.drawLine(x + 3, y + 9, x + 5, y + 7); g.drawLine(x + 7, y + 5, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 11); g.drawLine(x + 3, y + 12, x + 12, y + 12); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 14, x + 14, y + 14); g.drawLine(x + 14, y + 1, x + 14, y + 14); g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11);
if (!b.getModel().isPressed()) { g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); } g.setColor(savedColor);
public void paintIcon(Component c, Graphics g, int x, int y) { // draw the gray areas first g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 12); g.drawLine(x + 1, y + 13, x + 13, y + 13); g.drawLine(x + 13, y + 2, x + 13, y + 12); g.fillRect(x + 4, y + 4, 2, 2); g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y, x + 13, y); g.drawLine(x, y + 1, x, y + 13); g.drawLine(x + 3, y + 4, x + 4, y + 3); g.drawLine(x + 3, y + 9, x + 5, y + 7); g.drawLine(x + 7, y + 5, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 11); g.drawLine(x + 3, y + 12, x + 12, y + 12); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 14, x + 14, y + 14); g.drawLine(x + 14, y + 1, x + 14, y + 14); g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java