rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption)
|
public ConfirmationCallback(int messageType, int optionType, int defaultOption) throws IllegalArgumentException
|
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) { super(); setPrompt(prompt); setMessageType(messageType); setOptionType(optionType, defaultOption); this.defaultOption = defaultOption; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/ConfirmationCallback.java/buggy/core/src/classpath/javax/javax/security/auth/callback/ConfirmationCallback.java
|
setPrompt(prompt);
|
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) { super(); setPrompt(prompt); setMessageType(messageType); setOptionType(optionType, defaultOption); this.defaultOption = defaultOption; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/ConfirmationCallback.java/buggy/core/src/classpath/javax/javax/security/auth/callback/ConfirmationCallback.java
|
|
Thread currentThread = Thread.currentThread();
|
Map map = Thread.getThreadLocals();
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/ThreadLocal.java/clean/core/src/classpath/java/java/lang/ThreadLocal.java
|
Object value = valueMap.get(currentThread);
|
Object value = map.get(key);
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/ThreadLocal.java/clean/core/src/classpath/java/java/lang/ThreadLocal.java
|
valueMap.put(currentThread, value == null ? NULL : value);
|
map.put(key, value == null ? NULL : value);
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/ThreadLocal.java/clean/core/src/classpath/java/java/lang/ThreadLocal.java
|
valueMap.put(Thread.currentThread(), value == null ? NULL : value);
|
map.put(key, value == null ? NULL : value);
|
public void set(Object value) { // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. valueMap.put(Thread.currentThread(), value == null ? NULL : value); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/ThreadLocal.java/clean/core/src/classpath/java/java/lang/ThreadLocal.java
|
{
|
{
|
public Insets getBorderInsets(Component c) { return new Insets(2, 2, 2, 2); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
}
|
}
|
public Insets getBorderInsets(Component c) { return new Insets(2, 2, 2, 2); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
{
|
{
|
public boolean isBorderOpaque() { return true; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
}
|
}
|
public boolean isBorderOpaque() { return true; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
{ Color saved = g.getColor();
|
{ Color saved = g.getColor();
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) { g.setColor(darkShadow); g.drawRect(x, y, x + w - 1, y + h - 1); } else { g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); g.setColor(darkShadow); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(saved); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
g.setColor(highlight);
|
g.setColor(highlight);
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) { g.setColor(darkShadow); g.drawRect(x, y, x + w - 1, y + h - 1); } else { g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); g.setColor(darkShadow); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(saved); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
g.setColor(shadow);
|
g.setColor(shadow);
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) { g.setColor(darkShadow); g.drawRect(x, y, x + w - 1, y + h - 1); } else { g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); g.setColor(darkShadow); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(saved); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
g.setColor(darkShadow);
|
g.setColor(darkShadow);
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) { g.setColor(darkShadow); g.drawRect(x, y, x + w - 1, y + h - 1); } else { g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); g.setColor(darkShadow); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(saved); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
g.setColor(saved); }
|
g.setColor(saved); }
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) { g.setColor(darkShadow); g.drawRect(x, y, x + w - 1, y + h - 1); } else { g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); g.setColor(darkShadow); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(saved); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
y1 = yPoints[1] + 1; x2 = xPoints[2] - 1;
|
y1 = yPoints[1]; x2 = xPoints[2];
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1] + 1; x2 = xPoints[2] - 1; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
catch (IllegalAccessException ex) {} catch (InstantiationException ex) {} catch (ClassNotFoundException ex) {}
|
catch (Exception ex) {}
|
private static ResourceBundle tryBundle(String localizedName, ClassLoader classloader) { ResourceBundle bundle = null; try { Class rbClass; if (classloader == null) rbClass = Class.forName(localizedName); else rbClass = classloader.loadClass(localizedName); // Note that we do the check up front instead of catching // ClassCastException. The reason for this is that some crazy // programs (Eclipse) have classes that do not extend // ResourceBundle but that have the same name as a property // bundle; in fact Eclipse relies on ResourceBundle not // instantiating these classes. if (ResourceBundle.class.isAssignableFrom(rbClass)) bundle = (ResourceBundle) rbClass.newInstance(); } catch (IllegalAccessException ex) {} catch (InstantiationException ex) {} catch (ClassNotFoundException ex) {} if (bundle == null) { try { InputStream is; String resourceName = localizedName.replace('.', '/') + ".properties"; if (classloader == null) is = ClassLoader.getSystemResourceAsStream(resourceName); else is = classloader.getResourceAsStream(resourceName); if (is != null) bundle = new PropertyResourceBundle(is); } catch (IOException ex) { MissingResourceException mre = new MissingResourceException ("Failed to load bundle: " + localizedName, localizedName, ""); mre.initCause(ex); throw mre; } } return bundle; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ResourceBundle.java/buggy/core/src/classpath/java/java/util/ResourceBundle.java
|
if (config.getStringProperty("print.font").length() > 0) { font = new Font(config.getStringProperty("print.font"), Font.PLAIN, 8); }
|
public void run () {// Toolkit tk = Toolkit.getDefaultToolkit();//int [][] range = new int[][] {//new int[] { 1, 1 }//};// JobAttributes jobAttributes = new JobAttributes(1, JobAttributes.DefaultSelectionType.ALL, JobAttributes.DestinationType.PRINTER, JobAttributes.DialogType.NONE, "file", 1, 1, JobAttributes.MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES, range, "HP LaserJet", JobAttributes.SidesType.ONE_SIDED);//PrintJob job = tk.getPrintJob(null, "Print", jobAttributes, null);//if (job != null) { //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); printJob.setJobName("tn5250j"); // will have to remember this for the next time. // Always set a page format before call setPrintable to // set the orientation. PageFormat pf = printJob.defaultPage(); if (numCols == 132) pf.setOrientation(PageFormat.LANDSCAPE); else pf.setOrientation(PageFormat.PORTRAIT); if (numCols != 132) { if (config.getStringProperty("print.portWidth").length() != 0 && config.getStringProperty("print.portHeight").length() != 0 && config.getStringProperty("print.portImageWidth").length() != 0 && config.getStringProperty("print.portImageHeight").length() != 0 && config.getStringProperty("print.portImage.X").length() != 0 && config.getStringProperty("print.portImage.Y").length() != 0) { Paper paper = pf.getPaper(); paper.setSize( Double.parseDouble(config.getStringProperty("print.portWidth")), Double.parseDouble(config.getStringProperty("print.portHeight"))); paper.setImageableArea( Double.parseDouble(config.getStringProperty("print.portImage.X")), Double.parseDouble(config.getStringProperty("print.portImage.Y")), Double.parseDouble(config.getStringProperty("print.portImageWidth")), Double.parseDouble(config.getStringProperty("print.portImageHeight"))); pf.setPaper(paper); } } else { if (config.getStringProperty("print.landWidth").length() != 0 && config.getStringProperty("print.landHeight").length() != 0 && config.getStringProperty("print.landImageWidth").length() != 0 && config.getStringProperty("print.landImageHeight").length() != 0 && config.getStringProperty("print.landImage.X").length() != 0 && config.getStringProperty("print.landImage.Y").length() != 0) { Paper paper = pf.getPaper(); paper.setSize( Double.parseDouble(config.getStringProperty("print.landWidth")), Double.parseDouble(config.getStringProperty("print.landHeight"))); paper.setImageableArea( Double.parseDouble(config.getStringProperty("print.landImage.X")), Double.parseDouble(config.getStringProperty("print.landImage.Y")), Double.parseDouble(config.getStringProperty("print.landImageWidth")), Double.parseDouble(config.getStringProperty("print.landImageHeight"))); } } //--- Set the printable class to this one since we //--- are implementing the Printable interface printJob.setPrintable (this,pf); // set the cursor back session.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); //--- Show a print dialog to the user. If the user //--- clicks the print button, then print, otherwise //--- cancel the print job if (printJob.printDialog()) { try { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); printJob.print(); } catch (Exception PrintException) { PrintException.printStackTrace(); } } else { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); } session = null; int len = screen.length; for (int x = 0; x < len; x++) { screen[x] = null; } screen = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/df65a89f3874249d9a0046d2eba72cb4360e1f37/PrinterThread.java/buggy/tn5250j/src/org/tn5250j/PrinterThread.java
|
|
g.setColor(Color.BLACK);
|
if (c.isEnabled()) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDisabled());
|
protected void drawCheck(Component c, Graphics g, int x, int y) { g.setColor(Color.BLACK); g.drawLine(3 + x, 5 + y, 3 + x, 9 + y); g.drawLine(4 + x, 5 + y, 4 + x, 9 + y); g.drawLine(5 + x, 7 + y, 9 + x, 3 + y); g.drawLine(5 + x, 8 + y, 9 + x, 4 + y); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalCheckBoxIcon.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalCheckBoxIcon.java
|
if ((fcw1 & 0x88) == 0x88)
|
if (fcw1 == 0x88)
|
public ScreenField setField(int attr, int row, int col, int len, int ffw1, int ffw2, int fcw1, int fcw2) { ScreenField sf = null; screenFields[nextField] = new ScreenField(screen); screenFields[nextField].setField(attr,row,col,len,ffw1,ffw2,fcw1,fcw2); sf = screenFields[nextField++]; sizeFields++; // set the field id if it is not a bypass field // this is used for cursor progression if (!sf.isBypassField()) sf.setFieldId(++fieldIds); // check if the cursor progression field flag should be set. if ((fcw1 & 0x88) == 0x88) cpfExists = true; if (currentField != null) { currentField.next = sf; sf.prev = currentField; } currentField = sf; // check if the Modified Data Tag was set while creating the field masterMDT = currentField.mdt; return currentField; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/a61dbdd53c996e8a76dc4165e5010c2379355b80/ScreenFields.java/buggy/tn5250j/src/org/tn5250j/ScreenFields.java
|
int stop = formatCommandList.size(); for (int i = 0; i < stop; i++) {
|
int stop2 = formatCommandList.size(); for (int i = 0; i < stop2; i++) {
|
private void nestedToXDF(OutputStream outputstream, String indent, int which, int stop) { //base condition if (which > stop) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i < stop; i++) { FormattedIOCmd command = (FormattedIOCmd) formatCommandList.get(i); command.toXMLOutputStream(outputstream, indent); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } } } } else { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + UntaggedInstructionNodeName + " axisIdRef=\""); writeOut(outputstream, ((AxisInterface) parentArray.getAxisList().get(which)).getAxisId() + "\">"); which++; nestedToXDF(outputstream, indent + sPrettyXDFOutputIndentation, which, stop); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/c21681a589ed77f18def33fa33342d5058e9f1cf/FormattedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/FormattedXMLDataIOStyle.java
|
public boolean equals(Object obj) { if (obj instanceof ObjID && this.objNum == ((ObjID)obj).objNum) {
|
public boolean equals(Object obj) { if (obj instanceof ObjID && this.objNum == ((ObjID) obj).objNum) {
|
public boolean equals(Object obj) { if (obj instanceof ObjID && this.objNum == ((ObjID)obj).objNum) { return (true); } return (false);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ObjID.java/clean/core/src/classpath/java/java/rmi/server/ObjID.java
|
}
|
}
|
public boolean equals(Object obj) { if (obj instanceof ObjID && this.objNum == ((ObjID)obj).objNum) { return (true); } return (false);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ObjID.java/clean/core/src/classpath/java/java/rmi/server/ObjID.java
|
public int hashCode() { return ((int)objNum); }
|
public int hashCode() { return ((int) objNum); }
|
public int hashCode() { return ((int)objNum);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ObjID.java/clean/core/src/classpath/java/java/rmi/server/ObjID.java
|
public String toString() {
|
public String toString() {
|
public String toString() { return ("[objNum: " + objNum + ", " + space + "]");}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ObjID.java/clean/core/src/classpath/java/java/rmi/server/ObjID.java
|
}
|
}
|
public String toString() { return ("[objNum: " + objNum + ", " + space + "]");}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ObjID.java/clean/core/src/classpath/java/java/rmi/server/ObjID.java
|
public String toString() { return ("[UID: " + unique + "," + time + "," + count + "]"); }
|
public String toString() { return ("[UID: " + unique + "," + time + "," + count + "]"); }
|
public String toString() { return ("[UID: " + unique + "," + time + "," + count + "]");}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/UID.java/buggy/core/src/classpath/java/java/rmi/server/UID.java
|
if (isLinux && keyCode == e.VK_ALT_GRAPH) {
|
if (isLinux && keyCode == KeyEvent.VK_ALT_GRAPH) {
|
void processVTKeyPressed(KeyEvent e){ displayInfo(e); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; } // be careful with the control key if (keyCode == e.VK_UNDEFINED || keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH || keyCode == e.VK_CONTROL ) { return; } // be careful with the control key !!!!!! if (!e.isAltDown() || !e.isShiftDown() || !e.isControlDown() || keyCode != KeyEvent.VK_CONTROL && // be careful about removing this line !e.isActionKey()) {// if (keyCode == KeyEvent.VK_ESCAPE ||// keyCode == KeyEvent.VK_CONTROL ||// keyCode == KeyEvent.VK_BACK_SPACE) {// displayInfo(e,"Pressed added"); keyevent = e; dialog.setVisible(false); dialog.dispose();// } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/07bb3e36537d736453880eae077a576d2dd55fe2/KeyGetter13.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyGetter13.java
|
if (keyCode == e.VK_UNDEFINED || keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH || keyCode == e.VK_CONTROL
|
if (keyCode == KeyEvent.VK_UNDEFINED || keyCode == KeyEvent.VK_CAPS_LOCK || keyCode == KeyEvent.VK_SHIFT || keyCode == KeyEvent.VK_ALT || keyCode == KeyEvent.VK_ALT_GRAPH || keyCode == KeyEvent.VK_CONTROL
|
void processVTKeyPressed(KeyEvent e){ displayInfo(e); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; } // be careful with the control key if (keyCode == e.VK_UNDEFINED || keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH || keyCode == e.VK_CONTROL ) { return; } // be careful with the control key !!!!!! if (!e.isAltDown() || !e.isShiftDown() || !e.isControlDown() || keyCode != KeyEvent.VK_CONTROL && // be careful about removing this line !e.isActionKey()) {// if (keyCode == KeyEvent.VK_ESCAPE ||// keyCode == KeyEvent.VK_CONTROL ||// keyCode == KeyEvent.VK_BACK_SPACE) {// displayInfo(e,"Pressed added"); keyevent = e; dialog.setVisible(false); dialog.dispose();// } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/07bb3e36537d736453880eae077a576d2dd55fe2/KeyGetter13.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyGetter13.java
|
if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) {
|
if (isLinux && e.getKeyCode() == KeyEvent.VK_ALT_GRAPH) {
|
void processVTKeyReleased(KeyEvent e){ displayInfo(e); if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) { isAltGr = false; } int keycode = e.getKeyCode(); if (e.isAltDown() || e.isShiftDown() || e.isControlDown() || e.isActionKey() || keycode == KeyEvent.VK_CONTROL) { keyevent = e; dialog.setVisible(false); dialog.dispose(); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/07bb3e36537d736453880eae077a576d2dd55fe2/KeyGetter13.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyGetter13.java
|
if (b.isSelected()) sel = b.getModel();
|
public void add(AbstractButton b) { b.getModel().setGroup(this); buttons.addElement(b); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/ButtonGroup.java/buggy/core/src/classpath/javax/javax/swing/ButtonGroup.java
|
|
log.warn("Missing static initializer in class " + vmClass.getName());
|
log("Missing static initializer in class " + vmClass.getName(), Project.MSG_WARN);
|
protected void emitStaticInitializerCalls(NativeStream nativeOs, VmType[] bootClasses, Object clInitCaller) throws ClassNotFoundException { final X86Stream os = (X86Stream) nativeOs; X86Stream.ObjectInfo initCallerObject = os.startObject(loadClass(VmMethodCode.class)); os.setObjectRef(clInitCaller); // Call VmClass.loadFromBootClassArray final VmType vmClassClass = loadClass(VmType.class); final VmMethod lfbcaMethod = vmClassClass.getMethod("loadFromBootClassArray", "([Lorg/jnode/vm/classmgr/VmType;)V"); final VmType vmMethodClass = loadClass(VmMethod.class); final VmInstanceField nativeCodeField = (VmInstanceField)vmMethodClass.getField("nativeCode"); os.writePUSH(bootClasses); os.writeMOV_Const(Register.EAX, lfbcaMethod); os.writeCALL(Register.EAX, nativeCodeField.getOffset()); // Now call all static initializers for (int i = 0;(i < bootClasses.length); i++) { VmType vmClass = bootClasses[i]; if ((vmClass instanceof VmClassType) && (((VmClassType) vmClass).getInstanceCount() > 0)) { VmMethod clInit = vmClass.getMethod("<clinit>", "()V"); if (clInit != null) { os.setObjectRef(clInitCaller + "$$" + vmClass.getName()); log.warn("Missing static initializer in class " + vmClass.getName()); /* * os.writeMOV(X86Constants.rEAX, clInit); */ } } } os.writeRET(); // RET os.align(4096); initCallerObject.markEnd(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d974d9b7c8007292fb3bf35e9f401b7489394db3/BootImageBuilder.java/buggy/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
|
log.info("Creating image");
|
log("Creating image");
|
protected void storeImage(NativeStream os) throws BuildException { try { log.info("Creating image"); FileOutputStream fos = new FileOutputStream(getDestFile()); fos.write(os.getBytes(), 0, os.getLength()); fos.close(); /* * log.info("Creating ELF image"); final long start = System.currentTimeMillis(); final * Elf elf = ((X86Stream)os).toElf(); final long end = System.currentTimeMillis(); * log.info("... took " + (end-start) + "ms"); * elf.store(getDestFile().getAbsolutePath() + ".elf"); */ } catch (IOException ex) { throw new BuildException(ex); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d974d9b7c8007292fb3bf35e9f401b7489394db3/BootImageBuilder.java/buggy/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
|
static int nativeLoad(String filename) {
|
static int nativeLoad(String filename, ClassLoader loader) {
|
static int nativeLoad(String filename) { return 0; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/VMRuntime.java/clean/core/src/classpath/vm/java/lang/VMRuntime.java
|
if (Internet.version.since_inclusive(1, 1))
|
public void _read_no_endian(cdrInput c) throws IOException, BAD_PARAM { Id = c.read_string(); int n_profiles = c.read_long(); for (int i = 0; i < n_profiles; i++) { int tag = c.read_long(); cdrBufInput profile = c.read_encapsulation(); if (tag == Internet_profile.TAG_INTERNET_IOP) { Internet = new Internet_profile(); Internet.version = Version.read_version(profile); Internet.host = profile.read_string(); Internet.port = profile.gnu_read_ushort(); int lk = profile.read_long(); key = new byte[ lk ]; profile.read(key); // Read tagged components. int n_components = 0; try { n_components = profile.read_long(); for (int t = 0; t < n_components; t++) { int ctag = profile.read_long(); if (ctag == CodeSets_profile.TAG_CODE_SETS) { CodeSets.read(profile); } } } catch (Unexpected ex) { ex.printStackTrace(); } } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/IOR.java/buggy/core/src/classpath/gnu/gnu/CORBA/IOR.java
|
|
if (!Big_Endian) b.append(" (Little endian) ");
|
public String toString() { StringBuffer b = new StringBuffer(); b.append(Id); b.append(" at "); b.append(Internet); b.append(" Key "); for (int i = 0; i < key.length; i++) { b.append(Integer.toHexString(key [ i ] & 0xFF)); } b.append(" "); b.append(CodeSets); return b.toString(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/IOR.java/buggy/core/src/classpath/gnu/gnu/CORBA/IOR.java
|
|
*/ return new JNodeGraphics(this);
|
public Graphics getGraphics() { final Component parent = targetComponent.getParent(); if (parent != null) { final int x = peerComponent.getX(); final int y = peerComponent.getY(); final int width = peerComponent.getWidth(); final int height = peerComponent.getHeight(); return parent.getGraphics().create(x, y, width, height); } else { throw new Error(); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/79de57d8348607e4f50bad2a97a4ba3e1eb98c81/SwingComponentPeer.java/clean/gui/src/awt/org/jnode/awt/swingpeers/SwingComponentPeer.java
|
|
this.operand = getOperand(varIndex); refs = new Operand[] { operand };
|
refs = new Operand[] { getOperand(varIndex) };
|
public VarReturnQuad(int address, IRBasicBlock block, int varIndex) { super(address, block); this.operand = getOperand(varIndex); refs = new Operand[] { operand }; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/VarReturnQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/VarReturnQuad.java
|
operand = operand.simplify(); if (operand instanceof Variable) { Variable v = (Variable) operand;
|
refs[0] = refs[0].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0];
|
public void doPass2(BootableHashMap liveVariables) { operand = operand.simplify(); if (operand instanceof Variable) { Variable v = (Variable) operand; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/VarReturnQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/VarReturnQuad.java
|
return operand;
|
return refs[0];
|
public Operand getOperand() { return operand; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/VarReturnQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/VarReturnQuad.java
|
return getAddress() + ": return " + operand;
|
return getAddress() + ": return " + refs[0];
|
public String toString() { return getAddress() + ": return " + operand; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/VarReturnQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/VarReturnQuad.java
|
return null;
|
return VMCompiler.command(arg);
|
public static Object command(Object arg) { // Our implementation defines this to a no-op. return null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Compiler.java/buggy/core/src/classpath/java/java/lang/Compiler.java
|
return false;
|
return VMCompiler.compileClass(oneClass);
|
public static boolean compileClass(Class oneClass) { // Never succeed. return false; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Compiler.java/buggy/core/src/classpath/java/java/lang/Compiler.java
|
return false;
|
return VMCompiler.compileClasses(classNames);
|
public static boolean compileClasses(String classNames) { // Note the incredibly lame interface. Always fail. return false; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Compiler.java/buggy/core/src/classpath/java/java/lang/Compiler.java
|
VMCompiler.disable();
|
public static void disable() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Compiler.java/buggy/core/src/classpath/java/java/lang/Compiler.java
|
|
VMCompiler.enable();
|
public static void enable() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Compiler.java/buggy/core/src/classpath/java/java/lang/Compiler.java
|
|
if (!(sigSpi instanceof Cloneable)) throw new CloneNotSupportedException();
|
public Object clone() throws CloneNotSupportedException { if (!(sigSpi instanceof Cloneable)) throw new CloneNotSupportedException(); Signature result = new DummySignature ((SignatureSpi) sigSpi.clone(), this.getAlgorithm()); result.provider = this.getProvider(); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/DummySignature.java/buggy/core/src/classpath/java/java/security/DummySignature.java
|
|
throw new CloneNotSupportedException();
|
return super.clone();
|
public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/Signature.java/buggy/core/src/classpath/java/java/security/Signature.java
|
if (layerNum.intValue() == layer.intValue())
|
int layerInt = layerNum.intValue(); if (layerInt == layer.intValue())
|
private int[] layerToRange (Integer layer) { int[] ret = new int[2]; ret[1] = getComponents ().length; Iterator i = layers.entrySet ().iterator (); while (i.hasNext()) { Map.Entry pair = (Map.Entry) i.next(); Integer layerNum = (Integer) pair.getKey (); Integer layerSz = (Integer) pair.getValue (); if (layerNum.intValue() == layer.intValue()) { ret[0] = ret[1] - layerSz.intValue (); return ret; } else { ret[1] -= layerSz.intValue (); } } // should have found the layer during iteration throw new IllegalArgumentException (); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4f54b4c49f6326d2bfe26573a0af55c73b713f0a/JLayeredPane.java/clean/core/src/classpath/javax/javax/swing/JLayeredPane.java
|
return ret;
|
break; } else if (layerInt > layer.intValue()) { ret[1] = ret[0]; break;
|
private int[] layerToRange (Integer layer) { int[] ret = new int[2]; ret[1] = getComponents ().length; Iterator i = layers.entrySet ().iterator (); while (i.hasNext()) { Map.Entry pair = (Map.Entry) i.next(); Integer layerNum = (Integer) pair.getKey (); Integer layerSz = (Integer) pair.getValue (); if (layerNum.intValue() == layer.intValue()) { ret[0] = ret[1] - layerSz.intValue (); return ret; } else { ret[1] -= layerSz.intValue (); } } // should have found the layer during iteration throw new IllegalArgumentException (); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4f54b4c49f6326d2bfe26573a0af55c73b713f0a/JLayeredPane.java/clean/core/src/classpath/javax/javax/swing/JLayeredPane.java
|
throw new IllegalArgumentException ();
|
return ret;
|
private int[] layerToRange (Integer layer) { int[] ret = new int[2]; ret[1] = getComponents ().length; Iterator i = layers.entrySet ().iterator (); while (i.hasNext()) { Map.Entry pair = (Map.Entry) i.next(); Integer layerNum = (Integer) pair.getKey (); Integer layerSz = (Integer) pair.getValue (); if (layerNum.intValue() == layer.intValue()) { ret[0] = ret[1] - layerSz.intValue (); return ret; } else { ret[1] -= layerSz.intValue (); } } // should have found the layer during iteration throw new IllegalArgumentException (); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4f54b4c49f6326d2bfe26573a0af55c73b713f0a/JLayeredPane.java/clean/core/src/classpath/javax/javax/swing/JLayeredPane.java
|
mapper.removeKeyStroke((String)functions.getSelectedValue());
|
mapper.removeKeyStroke(k);
|
private void removeIt() { if (!macros && !special) { mapper.removeKeyStroke(mnemonicData[functions.getSelectedIndex()]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[functions.getSelectedIndex()])); } else { if (macros) { mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } mods = true; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/28b79ccd7c9f719dbca3fa123fcf90885ecc153b/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
valueClass = getFormattedTextField().getValue().getClass();
|
{ JFormattedTextField jft = getFormattedTextField(); if (jft != null) valueClass = jft.getValue().getClass(); }
|
public Object stringToValue(String string) throws ParseException { Object value = string; Class valueClass = getValueClass(); if (valueClass == null) valueClass = getFormattedTextField().getValue().getClass(); if (valueClass != null) try { Constructor constr = valueClass.getConstructor (new Class[]{String.class}); value = constr.newInstance(new Object[]{ string }); } catch (NoSuchMethodException ex) { // leave value as string } catch (Exception ex) { throw new ParseException(string, 0); } return value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/DefaultFormatter.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultFormatter.java
|
return super.clone();
|
return new MacAdapter((IMac) mac.clone(), new HashMap(attributes));
|
public Object clone() throws CloneNotSupportedException { return super.clone(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/MacAdapter.java/clean/core/src/classpath/gnu/gnu/javax/crypto/jce/mac/MacAdapter.java
|
}
|
}
|
public int compare(Object one, Object two) { String s1 = one.toString(); String s2 = two.toString(); return s1.compareToIgnoreCase(s2); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
private void loadList(String which) { lm.clear(); lm.removeAllElements(); if (which.equals(LangTool.getString("key.labelKeys"))) { Vector lk = new Vector(mnemonicData.length); for (int x = 0; x < mnemonicData.length; x++) { lk.addElement(new KeyDescription(LangTool.getString("key."+mnemonicData[x]),x)); } Collections.sort(lk,new KeyDescriptionCompare()); for (int x = 0; x < mnemonicData.length; x++) {// lm.addElement(LangTool.getString("key."+mnemonicData[x])); lm.addElement(lk.get(x)); } macros = false; special = false; } else { if (which.equals(LangTool.getString("key.labelMacros"))) { if (macrosList != null) for (int x = 0; x < macrosList.length; x++) { lm.addElement(macrosList[x]); } macros = true; special = false; } else { // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; StringBuffer sb = new StringBuffer(); Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = codePage.ebcdic2uni(x); char ac = codePage.getASCIIChar(x); if (!Character.isISOControl(c)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c + " - " + getUnicodeString(c)); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); lm.addElement(keyc.getSourceString()); } macros = false; special = true; } } if (!lm.isEmpty()) functions.setSelectedIndex(0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
||
lm.addElement(macrosList[x]);
|
macrosVector.add(macrosList[x]);
|
private void loadList(String which) { lm.clear(); lm.removeAllElements(); if (which.equals(LangTool.getString("key.labelKeys"))) { Vector lk = new Vector(mnemonicData.length); for (int x = 0; x < mnemonicData.length; x++) { lk.addElement(new KeyDescription(LangTool.getString("key."+mnemonicData[x]),x)); } Collections.sort(lk,new KeyDescriptionCompare()); for (int x = 0; x < mnemonicData.length; x++) {// lm.addElement(LangTool.getString("key."+mnemonicData[x])); lm.addElement(lk.get(x)); } macros = false; special = false; } else { if (which.equals(LangTool.getString("key.labelMacros"))) { if (macrosList != null) for (int x = 0; x < macrosList.length; x++) { lm.addElement(macrosList[x]); } macros = true; special = false; } else { // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; StringBuffer sb = new StringBuffer(); Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = codePage.ebcdic2uni(x); char ac = codePage.getASCIIChar(x); if (!Character.isISOControl(c)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c + " - " + getUnicodeString(c)); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); lm.addElement(keyc.getSourceString()); } macros = false; special = true; } } if (!lm.isEmpty()) functions.setSelectedIndex(0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
scriptDir("scripts",macrosVector); loadListModel(lm,macrosVector,null,0);
|
private void loadList(String which) { lm.clear(); lm.removeAllElements(); if (which.equals(LangTool.getString("key.labelKeys"))) { Vector lk = new Vector(mnemonicData.length); for (int x = 0; x < mnemonicData.length; x++) { lk.addElement(new KeyDescription(LangTool.getString("key."+mnemonicData[x]),x)); } Collections.sort(lk,new KeyDescriptionCompare()); for (int x = 0; x < mnemonicData.length; x++) {// lm.addElement(LangTool.getString("key."+mnemonicData[x])); lm.addElement(lk.get(x)); } macros = false; special = false; } else { if (which.equals(LangTool.getString("key.labelMacros"))) { if (macrosList != null) for (int x = 0; x < macrosList.length; x++) { lm.addElement(macrosList[x]); } macros = true; special = false; } else { // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; StringBuffer sb = new StringBuffer(); Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = codePage.ebcdic2uni(x); char ac = codePage.getASCIIChar(x); if (!Character.isISOControl(c)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c + " - " + getUnicodeString(c)); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); lm.addElement(keyc.getSourceString()); } macros = false; special = true; } } if (!lm.isEmpty()) functions.setSelectedIndex(0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
|
function = ((KeyDescription)functions.getSelectedValue()).toString();
|
if (functions.getSelectedValue() instanceof Macro) { function = ((Macro)functions.getSelectedValue()).toString(); } else function = ((KeyDescription)functions.getSelectedValue()).toString();
|
private void mapIt() { Object[] message = new Object[1]; JPanel kgp = new JPanel(); final KeyGetter kg = new KeyGetter(); kg.setForeground(Color.blue); message[0] = kgp; String function; if (functions.getSelectedValue() instanceof String) function = (String)functions.getSelectedValue(); else function = ((KeyDescription)functions.getSelectedValue()).toString(); kg.setText(LangTool.getString("key.labelMessage") + function); kgp.add(kg); String[] options = new String[1]; options[0] = LangTool.getString("key.labelClose"); JPanel kp = new JPanel(); JOptionPane opain = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, // option type null, options, options[0]); dialog = opain.createDialog(this, getTitle()); // add window listener to the dialog so that we can place focus on the // key getter label instead of default and set the new key value when // the window is closed. dialog.addWindowListener(new WindowAdapter() { boolean gotFocus = false; public void windowClosed(WindowEvent we) { setNewKeyStrokes(kg.keyevent); } public void windowActivated(WindowEvent we) { // Once window gets focus, set initial focus to our KeyGetter // component if (!gotFocus) { kg.grabFocus(); gotFocus = true; } } }); dialog.setVisible(true); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
mapper.removeKeyStroke((String)functions.getSelectedValue());
|
Object o = functions.getSelectedValue(); String name; if (o instanceof Macro) { name = ((Macro)o).getFullName(); } else { name = (String)o; } mapper.removeKeyStroke(name);
|
private void removeIt() { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); mapper.removeKeyStroke(mnemonicData[index]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } mods = true; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
(String)functions.getSelectedValue()));
|
name));
|
private void removeIt() { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); mapper.removeKeyStroke(mnemonicData[index]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } mods = true; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
System.out.println((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc((String)lm.getElementAt(index)));
|
Object o = lm.getElementAt(index); if (o instanceof String) { System.out.println((String)o); strokeDesc.setText(mapper.getKeyStrokeDesc((String)o)); } else if (o instanceof Macro) { Macro m = (Macro)o; strokeDesc.setText(mapper.getKeyStrokeDesc(m.getFullName())); }
|
private void setKeyDescription(int index) { // This try and catch is to fix a problem in JDK1.4-betas try { if (!macros && !special) { KeyDescription kd = (KeyDescription)lm.getElementAt(index); strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()])); } else { if (macros) { System.out.println((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc((String)lm.getElementAt(index))); } if (special) { System.out.println((String)lm.getElementAt(index)); String k = ""; k += ((String)lm.getElementAt(index)).charAt(7); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } } catch (ArrayIndexOutOfBoundsException ar) { System.out.println("ar at index " + index + " - " + ar.getMessage()); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
System.out.println((String)functions.getSelectedValue());
|
Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; System.out.println(macro);
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); if (isLinux) mapper.setKeyStroke(mnemonicData[index],ke,isAltGr); else mapper.setKeyStroke(mnemonicData[index],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr);
|
mapper.setKeyStroke(macro,ke,isAltGr);
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); if (isLinux) mapper.setKeyStroke(mnemonicData[index],ke,isAltGr); else mapper.setKeyStroke(mnemonicData[index],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
mapper.setKeyStroke((String)functions.getSelectedValue(),ke);
|
mapper.setKeyStroke(macro,ke);
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); if (isLinux) mapper.setKeyStroke(mnemonicData[index],ke,isAltGr); else mapper.setKeyStroke(mnemonicData[index],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
(String)functions.getSelectedValue()));
|
macro));
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); if (isLinux) mapper.setKeyStroke(mnemonicData[index],ke,isAltGr); else mapper.setKeyStroke(mnemonicData[index],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
|
public MenuItemUI() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MenuItemUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/MenuItemUI.java
|
||
public DataFormat getDatatype()
|
public String getDatatype()
|
public DataFormat getDatatype() { return (DataFormat) ((XMLAttribute) attribHash.get("axisDatatype")).getAttribValue(); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/4a2c60ef6dcd498fd96a6b0c2034467f25a3556c/Axis.java/clean/src/gov/nasa/gsfc/adc/xdf/Axis.java
|
return (DataFormat) ((XMLAttribute) attribHash.get("axisDatatype")).getAttribValue();
|
return (String) ((XMLAttribute) attribHash.get("axisDatatype")).getAttribValue();
|
public DataFormat getDatatype() { return (DataFormat) ((XMLAttribute) attribHash.get("axisDatatype")).getAttribValue(); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/4a2c60ef6dcd498fd96a6b0c2034467f25a3556c/Axis.java/clean/src/gov/nasa/gsfc/adc/xdf/Axis.java
|
attribHash.put("axisDatatype",new XMLAttribute(new StringDataFormat(), Constants.STRING_TYPE));
|
attribHash.put("axisDatatype",new XMLAttribute(null, Constants.STRING_TYPE));
|
private void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.add(0,"axisUnits"); attribOrder.add(0,"axisDatatype"); attribOrder.add(0,"description"); attribOrder.add(0,"name"); //set up the attribute hashtable key with the default initial value //set the minimum array size(essentially the size of the axis) attribHash.put("valueList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE)); attribHash.put("axisIdRef", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("axisId", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("aligh", new XMLAttribute(null, Constants.STRING_TYPE)); //double check??? //set up the axisUnits attribute Units unitsObj = new Units(); attribHash.put("axisUnits", new XMLAttribute(unitsObj, Constants.OBJECT_TYPE)); unitsObj.setXDFNodeName("axisUnits"); attribHash.put("axisDatatype",new XMLAttribute(new StringDataFormat(), Constants.STRING_TYPE)); attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); length = 0; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/4a2c60ef6dcd498fd96a6b0c2034467f25a3556c/Axis.java/clean/src/gov/nasa/gsfc/adc/xdf/Axis.java
|
public DataFormat setDatatype(DataFormat datatype)
|
public String setDatatype(String strDatatype)
|
public DataFormat setDatatype(DataFormat datatype) { return (DataFormat) ((XMLAttribute) attribHash.get("axisDatatype")).setAttribValue(datatype); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/4a2c60ef6dcd498fd96a6b0c2034467f25a3556c/Axis.java/clean/src/gov/nasa/gsfc/adc/xdf/Axis.java
|
return (DataFormat) ((XMLAttribute) attribHash.get("axisDatatype")).setAttribValue(datatype);
|
if (Utility.isValidDatatype(strDatatype)) return (String) ((XMLAttribute) attribHash.get("axisDatatype")).setAttribValue(strDatatype); else return null;
|
public DataFormat setDatatype(DataFormat datatype) { return (DataFormat) ((XMLAttribute) attribHash.get("axisDatatype")).setAttribValue(datatype); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/4a2c60ef6dcd498fd96a6b0c2034467f25a3556c/Axis.java/clean/src/gov/nasa/gsfc/adc/xdf/Axis.java
|
public QName(String namespaceURI, String localPart, String prefix)
|
public QName(String namespaceURI, String localPart)
|
public QName(String namespaceURI, String localPart, String prefix) { if (namespaceURI == null) { namespaceURI = XMLConstants.NULL_NS_URI; } if (localPart == null) { throw new IllegalArgumentException(); } if (prefix == null) { prefix = XMLConstants.DEFAULT_NS_PREFIX; } this.namespaceURI = namespaceURI; this.localPart = localPart; this.prefix = prefix; StringBuffer buf = new StringBuffer(); if (namespaceURI != null && namespaceURI.length() > 0) { buf.append('{'); buf.append(namespaceURI); buf.append('}'); } if (prefix != null && prefix.length() > 0) { buf.append(prefix); buf.append(':'); } buf.append(localPart); qName = buf.toString(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/QName.java/clean/core/src/classpath/javax/javax/xml/namespace/QName.java
|
if (namespaceURI == null) { namespaceURI = XMLConstants.NULL_NS_URI; } if (localPart == null) { throw new IllegalArgumentException(); } if (prefix == null) { prefix = XMLConstants.DEFAULT_NS_PREFIX; } this.namespaceURI = namespaceURI; this.localPart = localPart; this.prefix = prefix; StringBuffer buf = new StringBuffer(); if (namespaceURI != null && namespaceURI.length() > 0) { buf.append('{'); buf.append(namespaceURI); buf.append('}'); } if (prefix != null && prefix.length() > 0) { buf.append(prefix); buf.append(':'); } buf.append(localPart); qName = buf.toString();
|
this(namespaceURI, localPart, null);
|
public QName(String namespaceURI, String localPart, String prefix) { if (namespaceURI == null) { namespaceURI = XMLConstants.NULL_NS_URI; } if (localPart == null) { throw new IllegalArgumentException(); } if (prefix == null) { prefix = XMLConstants.DEFAULT_NS_PREFIX; } this.namespaceURI = namespaceURI; this.localPart = localPart; this.prefix = prefix; StringBuffer buf = new StringBuffer(); if (namespaceURI != null && namespaceURI.length() > 0) { buf.append('{'); buf.append(namespaceURI); buf.append('}'); } if (prefix != null && prefix.length() > 0) { buf.append(prefix); buf.append(':'); } buf.append(localPart); qName = buf.toString(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/QName.java/clean/core/src/classpath/javax/javax/xml/namespace/QName.java
|
int numberFileCopyed = 0;
|
int numberFileCopied = 0;
|
private int copyDir() throws Exception { final File dstDir = new File(_fileDst.getAbsoluteFile() + File.separator);//+_fileSrc.getName()+File.separator); final File[] subFile = _fileSrc.listFiles(); int numberFileCopyed = 0; if (!dstDir.exists()) { if (!dstDir.mkdir()) { System.err.println(_fileDst.getParentFile().getAbsolutePath() + " cannot create "); return 0; } } for (int i = 0; i < subFile.length; i++) { final String name = subFile[ i].getName(); if (name.equals(".") || name.equals("..")) continue; File subDstDir = new File(dstDir.getAbsoluteFile() + File.separator + name); CpCommand cp = new CpCommand(subFile[ i], subDstDir, _mode, _recursive, _verbose); numberFileCopyed += cp.copy(); } return numberFileCopyed; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe79dcca97131f1a361865f207fec6173708f17/CpCommand.java/buggy/fs/src/fs/org/jnode/fs/command/CpCommand.java
|
numberFileCopyed += cp.copy();
|
numberFileCopied += cp.copy();
|
private int copyDir() throws Exception { final File dstDir = new File(_fileDst.getAbsoluteFile() + File.separator);//+_fileSrc.getName()+File.separator); final File[] subFile = _fileSrc.listFiles(); int numberFileCopyed = 0; if (!dstDir.exists()) { if (!dstDir.mkdir()) { System.err.println(_fileDst.getParentFile().getAbsolutePath() + " cannot create "); return 0; } } for (int i = 0; i < subFile.length; i++) { final String name = subFile[ i].getName(); if (name.equals(".") || name.equals("..")) continue; File subDstDir = new File(dstDir.getAbsoluteFile() + File.separator + name); CpCommand cp = new CpCommand(subFile[ i], subDstDir, _mode, _recursive, _verbose); numberFileCopyed += cp.copy(); } return numberFileCopyed; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe79dcca97131f1a361865f207fec6173708f17/CpCommand.java/buggy/fs/src/fs/org/jnode/fs/command/CpCommand.java
|
return numberFileCopyed;
|
return numberFileCopied;
|
private int copyDir() throws Exception { final File dstDir = new File(_fileDst.getAbsoluteFile() + File.separator);//+_fileSrc.getName()+File.separator); final File[] subFile = _fileSrc.listFiles(); int numberFileCopyed = 0; if (!dstDir.exists()) { if (!dstDir.mkdir()) { System.err.println(_fileDst.getParentFile().getAbsolutePath() + " cannot create "); return 0; } } for (int i = 0; i < subFile.length; i++) { final String name = subFile[ i].getName(); if (name.equals(".") || name.equals("..")) continue; File subDstDir = new File(dstDir.getAbsoluteFile() + File.separator + name); CpCommand cp = new CpCommand(subFile[ i], subDstDir, _mode, _recursive, _verbose); numberFileCopyed += cp.copy(); } return numberFileCopyed; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe79dcca97131f1a361865f207fec6173708f17/CpCommand.java/buggy/fs/src/fs/org/jnode/fs/command/CpCommand.java
|
int nbCopyedFile = cpCommand.copy(); System.out.println(nbCopyedFile + " file(s) copied");
|
int nbCopiedFile = cpCommand.copy(); System.out.println(nbCopiedFile + " file(s) copied");
|
public static void main(String[] args) throws Exception { CpCommand cpCommand = new CpCommand(args); int nbCopyedFile = cpCommand.copy(); System.out.println(nbCopyedFile + " file(s) copied"); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe79dcca97131f1a361865f207fec6173708f17/CpCommand.java/buggy/fs/src/fs/org/jnode/fs/command/CpCommand.java
|
if (providers == null)
|
if (providers != null)
|
public static Enumeration getSaslClientFactories() { Vector result = new Vector(); HashSet names = new HashSet(); Provider[] providers = Security.getProviders(); Iterator it; if (providers == null) { Provider p; String key; for (int i = 0; i < providers.length; i++) { p = providers[i]; for (it = p.keySet().iterator(); it.hasNext(); ) { key = (String) it.next(); // add key's binding (a) it is a class of a client factory, // and (b) the key does not include blanks if (key.startsWith(CLIENT_FACTORY_SVC) && key.indexOf(" ") == -1) { names.add(p.getProperty(key)); break; } } } } // we have the factory class names in names; instantiate and enumerate String c; for (it = names.iterator(); it.hasNext(); ) { c = (String) it.next(); try { SaslClientFactory f = (SaslClientFactory) Class.forName(c).newInstance(); if (f != null) result.add(f); } catch (ClassCastException ignored) { // ignore instantiation exceptions } catch (ClassNotFoundException ignored) { } catch (InstantiationException ignored) { } catch (IllegalAccessException ignored) { } } return result.elements(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6ebf1f74ce34c04205e65bfd96c25a18c5a0861/Sasl.java/buggy/core/src/classpath/javax/javax/security/sasl/Sasl.java
|
if (providers == null)
|
if (providers != null)
|
public static Enumeration getSaslServerFactories() { Vector result = new Vector(); HashSet names = new HashSet(); Provider[] providers = Security.getProviders(); Iterator it; if (providers == null) { Provider p; String key; for (int i = 0; i < providers.length; i++) { p = providers[i]; for (it = p.keySet().iterator(); it.hasNext(); ) { key = (String) it.next(); // add key's binding (a) it is a class of a server factory, // and (b) the key does not include blanks if (key.startsWith(SERVER_FACTORY_SVC) && key.indexOf(" ") == -1) { names.add(p.getProperty(key)); break; } } } } // we have the factory class names in names; instantiate and enumerate String c; for (it = names.iterator(); it.hasNext(); ) { c = (String) it.next(); try { SaslServerFactory f = (SaslServerFactory) Class.forName(c).newInstance(); if (f != null) result.add(f); } catch (ClassCastException ignored) // ignore instantiation exceptions { } catch (ClassNotFoundException ignored) { } catch (InstantiationException ignored) { } catch (IllegalAccessException ignored) { } } return result.elements(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6ebf1f74ce34c04205e65bfd96c25a18c5a0861/Sasl.java/buggy/core/src/classpath/javax/javax/security/sasl/Sasl.java
|
result.prefix = (byte[])this.prefix.clone();
|
result.prefix = (byte[]) this.prefix.clone();
|
public Object clone() throws CloneNotSupportedException { TMMH16 result = (TMMH16) super.clone(); if (this.keystream != null) result.keystream = (IRandom) this.keystream.clone(); if (this.prefix != null) result.prefix = (byte[])this.prefix.clone(); if (this.context != null) result.context = (int[])this.context.clone(); if (this.K0 != null) result.K0 = (int[])this.K0.clone(); if (this.Ki != null) result.Ki = (int[])this.Ki.clone(); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/TMMH16.java/buggy/core/src/classpath/gnu/gnu/javax/crypto/mac/TMMH16.java
|
result.context = (int[])this.context.clone();
|
result.context = (int[]) this.context.clone();
|
public Object clone() throws CloneNotSupportedException { TMMH16 result = (TMMH16) super.clone(); if (this.keystream != null) result.keystream = (IRandom) this.keystream.clone(); if (this.prefix != null) result.prefix = (byte[])this.prefix.clone(); if (this.context != null) result.context = (int[])this.context.clone(); if (this.K0 != null) result.K0 = (int[])this.K0.clone(); if (this.Ki != null) result.Ki = (int[])this.Ki.clone(); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/TMMH16.java/buggy/core/src/classpath/gnu/gnu/javax/crypto/mac/TMMH16.java
|
result.K0 = (int[])this.K0.clone();
|
result.K0 = (int[]) this.K0.clone();
|
public Object clone() throws CloneNotSupportedException { TMMH16 result = (TMMH16) super.clone(); if (this.keystream != null) result.keystream = (IRandom) this.keystream.clone(); if (this.prefix != null) result.prefix = (byte[])this.prefix.clone(); if (this.context != null) result.context = (int[])this.context.clone(); if (this.K0 != null) result.K0 = (int[])this.K0.clone(); if (this.Ki != null) result.Ki = (int[])this.Ki.clone(); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/TMMH16.java/buggy/core/src/classpath/gnu/gnu/javax/crypto/mac/TMMH16.java
|
result.Ki = (int[])this.Ki.clone();
|
result.Ki = (int[]) this.Ki.clone();
|
public Object clone() throws CloneNotSupportedException { TMMH16 result = (TMMH16) super.clone(); if (this.keystream != null) result.keystream = (IRandom) this.keystream.clone(); if (this.prefix != null) result.prefix = (byte[])this.prefix.clone(); if (this.context != null) result.context = (int[])this.context.clone(); if (this.K0 != null) result.K0 = (int[])this.K0.clone(); if (this.Ki != null) result.Ki = (int[])this.Ki.clone(); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/TMMH16.java/buggy/core/src/classpath/gnu/gnu/javax/crypto/mac/TMMH16.java
|
public void connect(Remote remote, Remote remote1)
|
public void connect(Remote a_target, Remote a_source)
|
public void connect(Remote remote, Remote remote1) throws RemoteException { throw new Error("Not implemented for PortableRemoteObjectDelegateImpl"); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
throw new Error("Not implemented for PortableRemoteObjectDelegateImpl");
|
ORB orb = null; POA poa = null; boolean ok = false; try { if (a_source instanceof Servant) { Servant s = (Servant) a_source; orb = s._orb(); poa = s._poa(); ok = true;
|
public void connect(Remote remote, Remote remote1) throws RemoteException { throw new Error("Not implemented for PortableRemoteObjectDelegateImpl"); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
if (!ok && a_source instanceof ObjectImpl) { ObjectImpl o = (ObjectImpl) a_source; orb = o._orb(); ok = true; try { if (orb instanceof ORB_1_4) { ORB_1_4 xorb = (ORB_1_4) orb; Delegate d = o._get_delegate(); if (d instanceof LocalDelegate) { LocalDelegate l = (LocalDelegate) d; poa = l.poa; } else if (d instanceof Simple_delegate) { byte[] ior_key = ((Simple_delegate) d).getIor().key; activeObjectMap.Obj ref = xorb.rootPOA.findIorKey(ior_key); if (ref != null) poa = ref.poa; } } } catch (Exception ex) { } } } catch (Exception ex) { RuntimeException rex = new RuntimeException("Unable to get info from " + a_source); rex.initCause(ex); throw rex; } if (!ok && a_source instanceof Tie) { Tie t = (Tie) a_source; orb = t.orb(); poa = null; ok = true; } if (orb == null) throw new RemoteException("Unable to determine ORB from " + a_source); if (a_target instanceof Stub) { StubDelegateImpl.connect((Stub) a_target, orb, poa); } else if (a_target instanceof Servant) { try { if (poa == null) { poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA")); if (poa.the_POAManager().get_state().value() == State._HOLDING) poa.the_POAManager().activate(); } poa.servant_to_reference((Servant) a_target); } catch (Exception ex) { throw new Unexpected(ex); } } else if (a_target instanceof org.omg.CORBA.Object) { orb.connect((org.omg.CORBA.Object) a_target); } else if (a_target instanceof Tie) { ((Tie) a_target).orb(orb); } }
|
public void connect(Remote remote, Remote remote1) throws RemoteException { throw new Error("Not implemented for PortableRemoteObjectDelegateImpl"); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
|
PortableServer.exportObject(obj);
|
if (obj instanceof Stub) Util.registerTarget(StubDelegateImpl.getTieFromStub((Stub) obj), obj); else if (obj instanceof Tie) { Tie t = (Tie) obj; Util.registerTarget(t, null); }
|
public void exportObject(Remote obj) throws RemoteException { PortableServer.exportObject(obj); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
if (narrowFrom == null)
|
else if (narrowFrom == null)
|
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (narrowTo.isAssignableFrom(fromClass)) result = narrowFrom; else { System.out.println("We still haven't implement this case: narrow " + narrowFrom + " of type " + fromClass + " to " + narrowTo); Class[] cs = fromClass.getInterfaces(); for (int i = 0; i < cs.length; i++) System.out.println(cs[i]); Exception e1 = new Exception(); try { throw e1; } catch(Exception ee) { ee.printStackTrace(); } System.exit(2); //throw new Error("We still haven't implement this case: narrow " // + narrowFrom + " of type " + fromClass + " to " // + narrowTo); /* ObjectImpl objimpl = (ObjectImpl)narrowFrom; if(objimpl._is_a(PortableServer.getTypeName(narrowTo))) result = PortableServer.getStubFromObjectImpl(objimpl, narrowTo); */ } } catch(Exception e) { result = null; } if (result == null) throw new ClassCastException("Can't narrow from " + fromClass + " to " + narrowTo); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
Class fromClass = narrowFrom.getClass(); Object result = null;
|
String interf = narrowTo.getName(); String stubClassName; stubClassName = getStubClassName(interf);
|
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (narrowTo.isAssignableFrom(fromClass)) result = narrowFrom; else { System.out.println("We still haven't implement this case: narrow " + narrowFrom + " of type " + fromClass + " to " + narrowTo); Class[] cs = fromClass.getInterfaces(); for (int i = 0; i < cs.length; i++) System.out.println(cs[i]); Exception e1 = new Exception(); try { throw e1; } catch(Exception ee) { ee.printStackTrace(); } System.exit(2); //throw new Error("We still haven't implement this case: narrow " // + narrowFrom + " of type " + fromClass + " to " // + narrowTo); /* ObjectImpl objimpl = (ObjectImpl)narrowFrom; if(objimpl._is_a(PortableServer.getTypeName(narrowTo))) result = PortableServer.getStubFromObjectImpl(objimpl, narrowTo); */ } } catch(Exception e) { result = null; } if (result == null) throw new ClassCastException("Can't narrow from " + fromClass + " to " + narrowTo); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
if (narrowTo.isAssignableFrom(fromClass)) result = narrowFrom; else
|
narrowTo = Util.loadClass(stubClassName, null, narrowTo.getClassLoader()); } catch (ClassNotFoundException e)
|
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (narrowTo.isAssignableFrom(fromClass)) result = narrowFrom; else { System.out.println("We still haven't implement this case: narrow " + narrowFrom + " of type " + fromClass + " to " + narrowTo); Class[] cs = fromClass.getInterfaces(); for (int i = 0; i < cs.length; i++) System.out.println(cs[i]); Exception e1 = new Exception(); try { throw e1; } catch(Exception ee) { ee.printStackTrace(); } System.exit(2); //throw new Error("We still haven't implement this case: narrow " // + narrowFrom + " of type " + fromClass + " to " // + narrowTo); /* ObjectImpl objimpl = (ObjectImpl)narrowFrom; if(objimpl._is_a(PortableServer.getTypeName(narrowTo))) result = PortableServer.getStubFromObjectImpl(objimpl, narrowTo); */ } } catch(Exception e) { result = null; } if (result == null) throw new ClassCastException("Can't narrow from " + fromClass + " to " + narrowTo); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
System.out.println("We still haven't implement this case: narrow " + narrowFrom + " of type " + fromClass + " to " + narrowTo); Class[] cs = fromClass.getInterfaces(); for (int i = 0; i < cs.length; i++) System.out.println(cs[i]); Exception e1 = new Exception(); try { throw e1; } catch(Exception ee) { ee.printStackTrace(); } System.exit(2); /* ObjectImpl objimpl = (ObjectImpl)narrowFrom; if(objimpl._is_a(PortableServer.getTypeName(narrowTo))) result = PortableServer.getStubFromObjectImpl(objimpl, narrowTo); */
|
ClassCastException cex = new ClassCastException("Class not found: " + stubClassName); cex.initCause(e); throw cex;
|
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (narrowTo.isAssignableFrom(fromClass)) result = narrowFrom; else { System.out.println("We still haven't implement this case: narrow " + narrowFrom + " of type " + fromClass + " to " + narrowTo); Class[] cs = fromClass.getInterfaces(); for (int i = 0; i < cs.length; i++) System.out.println(cs[i]); Exception e1 = new Exception(); try { throw e1; } catch(Exception ee) { ee.printStackTrace(); } System.exit(2); //throw new Error("We still haven't implement this case: narrow " // + narrowFrom + " of type " + fromClass + " to " // + narrowTo); /* ObjectImpl objimpl = (ObjectImpl)narrowFrom; if(objimpl._is_a(PortableServer.getTypeName(narrowTo))) result = PortableServer.getStubFromObjectImpl(objimpl, narrowTo); */ } } catch(Exception e) { result = null; } if (result == null) throw new ClassCastException("Can't narrow from " + fromClass + " to " + narrowTo); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
result = null;
|
ClassCastException cex = new ClassCastException("Cannot instantiate " + narrowTo.getName()); cex.initCause(e); throw cex;
|
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (narrowTo.isAssignableFrom(fromClass)) result = narrowFrom; else { System.out.println("We still haven't implement this case: narrow " + narrowFrom + " of type " + fromClass + " to " + narrowTo); Class[] cs = fromClass.getInterfaces(); for (int i = 0; i < cs.length; i++) System.out.println(cs[i]); Exception e1 = new Exception(); try { throw e1; } catch(Exception ee) { ee.printStackTrace(); } System.exit(2); //throw new Error("We still haven't implement this case: narrow " // + narrowFrom + " of type " + fromClass + " to " // + narrowTo); /* ObjectImpl objimpl = (ObjectImpl)narrowFrom; if(objimpl._is_a(PortableServer.getTypeName(narrowTo))) result = PortableServer.getStubFromObjectImpl(objimpl, narrowTo); */ } } catch(Exception e) { result = null; } if (result == null) throw new ClassCastException("Can't narrow from " + fromClass + " to " + narrowTo); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
if (result == null) throw new ClassCastException("Can't narrow from " + fromClass + " to " + narrowTo); return result;
|
if (narrowed instanceof ObjectImpl) { ObjectImpl target = (ObjectImpl) narrowed; target._set_delegate(((ObjectImpl) narrowFrom)._get_delegate()); } else if (narrowed instanceof Tie && narrowFrom instanceof Remote) { ((Tie) narrowed).setTarget((Remote) narrowFrom); } else throw new ClassCastException("Narrowing of " + narrowFrom.getClass() + " to " + narrowTo + " is either not possible or not implemented."); return narrowed;
|
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (narrowTo.isAssignableFrom(fromClass)) result = narrowFrom; else { System.out.println("We still haven't implement this case: narrow " + narrowFrom + " of type " + fromClass + " to " + narrowTo); Class[] cs = fromClass.getInterfaces(); for (int i = 0; i < cs.length; i++) System.out.println(cs[i]); Exception e1 = new Exception(); try { throw e1; } catch(Exception ee) { ee.printStackTrace(); } System.exit(2); //throw new Error("We still haven't implement this case: narrow " // + narrowFrom + " of type " + fromClass + " to " // + narrowTo); /* ObjectImpl objimpl = (ObjectImpl)narrowFrom; if(objimpl._is_a(PortableServer.getTypeName(narrowTo))) result = PortableServer.getStubFromObjectImpl(objimpl, narrowTo); */ } } catch(Exception e) { result = null; } if (result == null) throw new ClassCastException("Can't narrow from " + fromClass + " to " + narrowTo); return result; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
public Remote toStub(Remote obj)
|
public Remote toStub(Remote ObjImpl)
|
public Remote toStub(Remote obj) throws NoSuchObjectException { return PortableServer.toStub(obj); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
return PortableServer.toStub(obj);
|
String icn = ObjImpl.getClass().getName(); if (!icn.endsWith("Impl")) throw new BAD_PARAM("Invalid class name '" + icn + "', must end with 'Impl'"); String sn = "_" + icn.substring(0, icn.length() - "Impl".length()) + "_Stub"; Class stubClass; Object o_stub; try { stubClass = RMIClassLoader.loadClass(sn); o_stub = stubClass.newInstance(); } catch (Exception e) { NoSuchObjectException n = new NoSuchObjectException(sn); n.initCause(e); throw n; } if (!Remote.class.isAssignableFrom(stubClass)) throw new ClassCastException(stubClass.getName() + " exists but cannot be returned as it does not inherit from " + Remote.class.getName()); return (Remote) o_stub;
|
public Remote toStub(Remote obj) throws NoSuchObjectException { return PortableServer.toStub(obj); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
PortableServer.unexportObject(obj);
|
Util.unexportObject(obj);
|
public void unexportObject(Remote obj) throws NoSuchObjectException { PortableServer.unexportObject(obj); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
|
scroll(bar, delta);
|
scroll(bar, wheel > 0 ? delta : -delta);
|
public void mouseWheelMoved(MouseWheelEvent e) { if (scrollpane.getViewport().getComponentCount() == 0) return; Component target = scrollpane.getViewport().getComponent(0); JScrollBar bar = scrollpane.getVerticalScrollBar(); Scrollable scrollable = (target instanceof Scrollable) ? (Scrollable) target : null; boolean tracksHeight = scrollable != null && scrollable.getScrollableTracksViewportHeight(); int wheel = e.getWheelRotation() * ROWS_PER_WHEEL_CLICK; int delta; // If possible, scroll vertically. if (bar != null && ! tracksHeight) { if (scrollable != null) { bounds(target); delta = scrollable.getScrollableUnitIncrement( rect, SwingConstants.VERTICAL, wheel); } else { // Scroll non scrollables. delta = wheel * SCROLL_NON_SCROLLABLES; } scroll(bar, delta); } // If not, try to scroll horizontally else { bar = scrollpane.getHorizontalScrollBar(); boolean tracksWidth = scrollable != null && scrollable.getScrollableTracksViewportWidth(); if (bar != null && ! tracksWidth) { if (scrollable != null) { bounds(target); delta = scrollable.getScrollableUnitIncrement( rect, SwingConstants.HORIZONTAL, wheel); } else { // Scroll non scrollables. delta = wheel * SCROLL_NON_SCROLLABLES; } scroll(bar, delta); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicScrollPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicScrollPaneUI.java
|
Border vpBorder = p.getViewportBorder(); if (vpBorder == null || vpBorder instanceof UIResource) { vpBorder = UIManager.getBorder("ScrollPane.viewportBorder"); p.setViewportBorder(vpBorder); }
|
protected void installDefaults(JScrollPane p) { scrollpane = p; LookAndFeel.installColorsAndFont(p, "ScrollPane.background", "ScrollPane.foreground", "ScrollPane.font"); LookAndFeel.installBorder(p, "ScrollPane.border"); p.setOpaque(true); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicScrollPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicScrollPaneUI.java
|
|
Border vpBorder = scrollpane.getViewportBorder(); if (vpBorder != null) { Rectangle r = scrollpane.getViewportBorderBounds(); vpBorder.paintBorder(scrollpane, g, r.x, r.y, r.width, r.height); }
|
public void paint(Graphics g, JComponent c) { // do nothing; the normal painting-of-children algorithm, along with // ScrollPaneLayout, does all the relevant work. }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicScrollPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicScrollPaneUI.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.