rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
public boolean equals(Object obj)
private static boolean equals(BigInteger x, BigInteger y)
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java
if (! (obj instanceof BigInteger))
if (x.words == null && y.words == null) return x.ival == y.ival; if (x.words == null || y.words == null || x.ival != y.ival)
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java
return equals(this, (BigInteger) obj);
for (int i = x.ival; --i >= 0; ) { if (x.words[i] != y.words[i]) return false; } return true;
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java
public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); /*try { Thread.sleep(2500); } catch (InterruptedException ex2) { }*/
public static void error(String msg) { log(ERROR, System.err, msg, null);
public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); /*try { Thread.sleep(2500); } catch (InterruptedException ex2) { // Ignore }*/ }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/BootLog.java/buggy/core/src/core/org/jnode/system/BootLog.java
double small = getFlatness() * (1E-10);
double small = getFlatness() * EPSILON;
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java
a0 += small;
a0 -= small;
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java
a2 += small;
a2 -= small;
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java
if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0))
if (Line2D.linesIntersect(b0, a0, b2, a2, EPSILON, 0.0, distance, 0.0))
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java
if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance))
if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, EPSILON, 0.0, distance))
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java
double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0)
double a1, a2, a3, a4; if ((a1 = area2(x1, y1, x2, y2, x3, y3)) == 0.0) { if (between(x1, y1, x2, y2, x3, y3)) { return true; } else { if (area2(x1, y1, x2, y2, x4, y4) == 0.0) { return between(x3, y3, x4, y4, x1, y1) || between (x3, y3, x4, y4, x2, y2); } else {
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0) return false; double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Line2D.java/buggy/core/src/classpath/java/java/awt/geom/Line2D.java
double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0;
} } } else if ((a2 = area2(x1, y1, x2, y2, x4, y4)) == 0.0) { return between(x1, y1, x2, y2, x4, y4); } if ((a3 = area2(x3, y3, x4, y4, x1, y1)) == 0.0) { if (between(x3, y3, x4, y4, x1, y1)) { return true; } else { if (area2(x3, y3, x4, y4, x2, y2) == 0.0) { return between(x1, y1, x2, y2, x3, y3) || between (x1, y1, x2, y2, x4, y4); } else { return false; } } } else if ((a4 = area2(x3, y3, x4, y4, x2, y2)) == 0.0) { return between(x3, y3, x4, y4, x2, y2); } else { return ((a1 > 0.0) ^ (a2 > 0.0)) && ((a3 > 0.0) ^ (a4 > 0.0)); }
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0) return false; double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Line2D.java/buggy/core/src/classpath/java/java/awt/geom/Line2D.java
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num)
public Point2D transform(Point2D src, Point2D dst)
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstOff++] = (float) (m10 * x + m11 * y + m12); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/AffineTransform.java/buggy/core/src/classpath/java/java/awt/geom/AffineTransform.java
if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstOff++] = (float) (m10 * x + m11 * y + m12); }
if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); double nx = m00 * x + m01 * y + m02; double ny = m10 * x + m11 * y + m12; dst.setLocation(nx, ny); return dst;
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstOff++] = (float) (m10 * x + m11 * y + m12); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/AffineTransform.java/buggy/core/src/classpath/java/java/awt/geom/AffineTransform.java
public static double abs(double d) { return (d <= 0) ? 0 - d : d;
public static int abs(int i) { return (i < 0) ? -i : i;
public static double abs(double d) { return (d <= 0) ? 0 - d : d; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0bfec329053442bf284a75378b15938abd962e63/Math.java/buggy/core/src/classpath/java/java/lang/Math.java
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals)
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions)
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, classloader, principals, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/ProtectionDomain.java/clean/core/src/classpath/java/java/security/ProtectionDomain.java
this(codesource, permissions, classloader, principals, false);
this(codesource, permissions, null, null, true);
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, classloader, principals, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/ProtectionDomain.java/clean/core/src/classpath/java/java/security/ProtectionDomain.java
String linesep = System.getProperty("line.separator");
String linesep = SystemProperties.getProperty("line.separator");
public String toString() { String linesep = System.getProperty("line.separator"); StringBuffer sb = new StringBuffer("ProtectionDomain (").append(linesep); if (code_source == null) sb.append("CodeSource:null"); else sb.append(code_source); sb.append(linesep); if (classloader == null) sb.append("ClassLoader:null"); else sb.append(classloader); sb.append(linesep); sb.append("Principals:"); if (principals != null && principals.length > 0) { sb.append("["); Principal pal; for (int i = 0; i < principals.length; i++) { pal = principals[i]; sb.append("'").append(pal.getName()) .append("' of type ").append(pal.getClass().getName()); if (i < principals.length-1) sb.append(", "); } sb.append("]"); } else sb.append("none"); sb.append(linesep); if (!staticBinding) // include all but dont force loading Policy.currentPolicy if (Policy.isLoaded()) sb.append(Policy.getCurrentPolicy().getPermissions(this)); else // fallback on this one's permissions sb.append(perms); else sb.append(perms); return sb.append(linesep).append(")").append(linesep).toString(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/ProtectionDomain.java/clean/core/src/classpath/java/java/security/ProtectionDomain.java
throw new BAD_OPERATION("Invalid enumeration code " + code);
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad;
public static IdAssignmentPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/IdAssignmentPolicyValue.java/clean/core/src/classpath/org/org/omg/PortableServer/IdAssignmentPolicyValue.java
if (workingThread != null)
if (workingThread != null) {
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) workingThread.interrupt(); this.hide(); this.dispose(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c59a9f4b67adad6aebc68672c38648b3f16e3eb1/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
workingThread = null; }
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) workingThread.interrupt(); this.hide(); this.dispose(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c59a9f4b67adad6aebc68672c38648b3f16e3eb1/SpoolExportWizard.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
public JFileChooser(String currentDirectoryPath)
public JFileChooser()
public JFileChooser(String currentDirectoryPath) { setup(null); setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/JFileChooser.java/buggy/core/src/classpath/javax/javax/swing/JFileChooser.java
setCurrentDirectory(fsv.createFileObject(currentDirectoryPath));
setCurrentDirectory(null);
public JFileChooser(String currentDirectoryPath) { setup(null); setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/JFileChooser.java/buggy/core/src/classpath/javax/javax/swing/JFileChooser.java
public Process exec(String[] cmd) throws IOException
public Process exec(String cmdline) throws IOException
public Process exec(String[] cmd) throws IOException { return exec(cmd, null, null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Runtime.java/buggy/core/src/classpath/java/java/lang/Runtime.java
return exec(cmd, null, null); }
return exec(cmdline, null, null); }
public Process exec(String[] cmd) throws IOException { return exec(cmd, null, null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/37d5fed12204d348d94cd6409a12ac3d0787ccc3/Runtime.java/buggy/core/src/classpath/java/java/lang/Runtime.java
setIconImage(Image icon) {
public synchronized void setIconImage(Image icon) {
setIconImage(Image icon){ this.icon = icon; if (peer != null) ((FramePeer) peer).setIconImage(icon);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
}
}
setIconImage(Image icon){ this.icon = icon; if (peer != null) ((FramePeer) peer).setIconImage(icon);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
public WizardPage(int button_flags) { setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); Box pageBox = Box.createVerticalBox(); contentPane = new JPanel(); add(contentPane); add(Box.createGlue()); JSeparator js = new JSeparator(); js.setAlignmentY(Component.BOTTOM_ALIGNMENT); add(js); add(Box.createRigidArea(new Dimension(10,10))); buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS)); buttonPanel.setName("buttonPanel"); buttonPanel.add(Box.createHorizontalGlue()); add(buttonPanel); if (button_flags == 0) { return; } if ((button_flags & PREVIOUS) != 0) { previousAction = new AbstractAction(LangTool.getString("wiz.previous")) { public void actionPerformed(ActionEvent e) { } }; previousButton = new JButton(previousAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(previousButton); } if ((button_flags & NEXT) != 0) { nextAction = new AbstractAction(LangTool.getString("wiz.next")) { public void actionPerformed(ActionEvent e) { } }; nextButton = new JButton(nextAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(nextButton); } if ((button_flags & FINISH) != 0) { finishAction = new AbstractAction(LangTool.getString("wiz.finish")) { public void actionPerformed(ActionEvent e) { } }; finishButton = new JButton(finishAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(finishButton); } if ((button_flags & CANCEL) != 0) { cancelAction = new AbstractAction(LangTool.getString("wiz.cancel")) { public void actionPerformed(ActionEvent e) { } }; cancelButton = new JButton(cancelAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(cancelButton); buttonPanel.add(Box.createRigidArea(new Dimension(MARGIN,0))); } if ((button_flags & HELP) != 0) { helpAction = new AbstractAction(LangTool.getString("wiz.help")) { public void actionPerformed(ActionEvent e) { } }; helpButton = new JButton(helpAction); }
public WizardPage() { this(ALL);
public WizardPage(int button_flags) { // set layout as a vertical column setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));// setLayout(new BorderLayout()); Box pageBox = Box.createVerticalBox(); contentPane = new JPanel(); // add the pages contentpane to our wizard page add(contentPane); // lets add some glue here but it still does not stop the separator from // moving up and down. add(Box.createGlue()); // create the separator between the panels JSeparator js = new JSeparator(); js.setAlignmentY(Component.BOTTOM_ALIGNMENT); add(js); add(Box.createRigidArea(new Dimension(10,10))); // create the box for the buttons with an x-axis buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS)); buttonPanel.setName("buttonPanel"); buttonPanel.add(Box.createHorizontalGlue()); add(buttonPanel); if (button_flags == 0) { // no buttons to add :-( return; } if ((button_flags & PREVIOUS) != 0) { previousAction = new AbstractAction(LangTool.getString("wiz.previous")) { public void actionPerformed(ActionEvent e) { } }; previousButton = new JButton(previousAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(previousButton); } if ((button_flags & NEXT) != 0) { nextAction = new AbstractAction(LangTool.getString("wiz.next")) { public void actionPerformed(ActionEvent e) { } }; nextButton = new JButton(nextAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(nextButton); } if ((button_flags & FINISH) != 0) { finishAction = new AbstractAction(LangTool.getString("wiz.finish")) { public void actionPerformed(ActionEvent e) { } }; finishButton = new JButton(finishAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(finishButton); } if ((button_flags & CANCEL) != 0) { cancelAction = new AbstractAction(LangTool.getString("wiz.cancel")) { public void actionPerformed(ActionEvent e) { } }; cancelButton = new JButton(cancelAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(cancelButton); buttonPanel.add(Box.createRigidArea(new Dimension(MARGIN,0))); } if ((button_flags & HELP) != 0) { helpAction = new AbstractAction(LangTool.getString("wiz.help")) { public void actionPerformed(ActionEvent e) { } }; helpButton = new JButton(helpAction); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d4104819203aa6b5361aa997d2cd29a076f417a7/WizardPage.java/buggy/tn5250j/src/org/tn5250j/gui/WizardPage.java
setTitle(String title) {
public synchronized void setTitle(String title) {
setTitle(String title){ this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
}
}
setTitle(String title){ this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
super();
super(kpgName);
protected KeyPairGeneratorAdapter(String kpgName) { super(); this.adaptee = KeyPairGeneratorFactory.getInstance(kpgName); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/KeyPairGeneratorAdapter.java/buggy/core/src/classpath/gnu/gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java
super();
public UIResource() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
public ScrollPaneLayout() {
public ScrollPaneLayout() {
public ScrollPaneLayout() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
if (parent instanceof JScrollPane) {
public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2))); if (!showVsb) x3 = x4; else x3 = x4 - vsb.getPreferredSize().width; if (!showHsb) y3 = y4; else y3 = y4 - hsb.getPreferredSize().height; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3-x2, y3-y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3-x2, y2-y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2-x1, y3-y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4-x3, y3-y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3-x2, y4-y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2-x1, y2-y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4-x3, y2-y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2-x1, y4-y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4-x3, y4-y3)); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
}
public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2))); if (!showVsb) x3 = x4; else x3 = x4 - vsb.getPreferredSize().width; if (!showHsb) y3 = y4; else y3 = y4 - hsb.getPreferredSize().height; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3-x2, y3-y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3-x2, y2-y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2-x1, y3-y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4-x3, y3-y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3-x2, y4-y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2-x1, y2-y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4-x3, y2-y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2-x1, y4-y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4-x3, y4-y3)); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
if (parent != null && parent instanceof JScrollPane) {
public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getMinimumSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getMinimumSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getMinimumSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getMinimumSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
return new Dimension(width, height); } return new Dimension(0,0);
Insets i = sc.getInsets(); return new Dimension(width + i.left + i.right, height + i.top + i.bottom);
public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getMinimumSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getMinimumSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getMinimumSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getMinimumSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
if (parent != null && parent instanceof JScrollPane) {
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
return new Dimension(width, height);
Insets i = sc.getInsets(); return new Dimension(width + i.left + i.right, height + i.left + i.right);
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
return new Dimension(0,0); }
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
public DataCube(Array parentArray) {
public DataCube(ArrayInterface parentArray) {
public DataCube(Array parentArray) { this.parentArray = parentArray; init(); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d3cf59077fd7d0243cdc777745556c82ae0466d5/DataCube.java/buggy/src/gov/nasa/gsfc/adc/xdf/DataCube.java
public Array getParentArray() {
public ArrayInterface getParentArray() {
public Array getParentArray() { return parentArray; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d3cf59077fd7d0243cdc777745556c82ae0466d5/DataCube.java/buggy/src/gov/nasa/gsfc/adc/xdf/DataCube.java
NoDataValues[0] = parentArray.getNoDataValue();
String value = (String) null; if (parentArray.getNoDataValue() != null) { value = parentArray.getNoDataValue().toString(); } NoDataValues[0] = value;
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean writeHrefAttribute = false; boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; String nodeName = getClassXDFNodeName(); if (newNodeNameString != null) nodeName = newNodeNameString; // indent up one indent = indent + strIndent; //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); Href hrefObj = getHref(); //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream = outputstream; if (hrefObj !=null) { //write out to another file, String fileName = hrefObj.getSysId(); String hrefName = hrefObj.getName(); if(hrefName == null) { Log.errorln("Error: href object in dataCube lacks name. Data being written into metadata instead.\n"); } else if (fileName != null) { writeHrefAttribute = true; try { dataOutputStream = new FileOutputStream(hrefObj.getSysId()); } catch (IOException e) { //oops, something. is wrong, writ out to the passed in OutputStream Log.warnln("Error: cannot open file:"+fileName+" for writing. Data being written into metadata.\n"); writeHrefAttribute = false; } } else { Log.warnln("Error: href:"+hrefName+" lacks systemId, cannot write data to a separate file."); Log.warnln("Data are being written into metadata instead.\n"); writeHrefAttribute = false; } } else { // no *href* attribute specified, write out to the passed in OutputStream // dataOutputStream = outputstream; // not needed now } // write data node attributes if (writeHrefAttribute) { writeOut(outputstream, " "+HREF_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, hrefObj.getName()); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " "+CHECKSUM_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } String encoding = getEncoding(); if (encoding!= null) { writeOut(outputstream, " "+ENCODING_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, encoding.toString()); writeOut(outputstream, "\""); } String compress = getCompression(); if (compress != null) { writeOut(outputstream, " "+COMPRESSION_TYPE_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, compress.toString()); writeOut(outputstream, "\""); } if (writeHrefAttribute) writeOut(outputstream, "/>"); //we just close the data node now else writeOut(outputstream, ">"); //end of opening code Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxes().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String[] NoDataValues; if (parentArray.hasFieldAxis()) { NoDataValues = new String[parentArray.getFieldAxis().getLength()]; List fields = parentArray.getFieldAxis().getFields(); Iterator iter = fields.iterator(); int i = 0; while (iter.hasNext()) { Field field = (Field) iter.next(); if (field != null && field.getNoDataValue() != null) NoDataValues[i]=field.getNoDataValue().toString(); i++; } /* DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); }*/ } else { NoDataValues = new String[1]; NoDataValues[0] = parentArray.getNoDataValue();/* // what tis this?? If there is no fieldAxis, then no fields, // and hence, only ONE noDataValue. DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); }*/ } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues, writeHrefAttribute ? false : true ); } else { writeFormattedData( dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues, writeHrefAttribute ? false : true ); } } //close the data section appropriately if (!writeHrefAttribute && niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } // If we didnt write Href attribute, then means that data // were put into document. We need to close the open data // node appropriately. if (!writeHrefAttribute) writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d3cf59077fd7d0243cdc777745556c82ae0466d5/DataCube.java/buggy/src/gov/nasa/gsfc/adc/xdf/DataCube.java
if (axisList.size() == 0){
if (axisList.size() == 0 || !this.hasFieldAxis() ){
public FieldAxis getFieldAxis() { List axisList = getAxes(); if (axisList.size() == 0){ //empty axisList return null; } Object axisObj = axisList.get(0); if (axisObj instanceof FieldAxis) return (FieldAxis) axisObj; else return null; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/3266f401876bff8226e268cfbabeb96a9a320789/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java
if (endian == null) endian = DEFAULT_ENDIAN;
public String getEndian() { String endian = (String) ((Attribute) attribHash.get(ENDIAN_XML_ATTRIBUTE_NAME)).getAttribValue(); // a safety just in case someone asks a stupid question // if (endian == null) endian = DEFAULT_ENDIAN; return endian; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/12741fb3597436ff746fa562142b91acf8d73cf2/XMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
int availSize = getAvailableSize(splitPane.getSize(), splitPane.getInsets()); int[] newSizes = new int[3]; double weight = splitPane.getResizeWeight(); int oldLen = sizes[0] + sizes[1]; availSize -= sizes[2] + oldLen; int rightAlloc = (int) (availSize * (1 - weight)); int leftAlloc = availSize - rightAlloc; sizes[0] += leftAlloc; sizes[1] += rightAlloc;
void distributeExtraSpace() { int availSize = getAvailableSize(splitPane.getSize(), splitPane.getInsets()); int[] newSizes = new int[3]; double weight = splitPane.getResizeWeight(); int oldLen = sizes[0] + sizes[1]; // dividers don't change size. availSize -= sizes[2] + oldLen; int rightAlloc = (int) (availSize * (1 - weight)); int leftAlloc = availSize - rightAlloc; sizes[0] += leftAlloc; sizes[1] += rightAlloc; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
int width = getInitialLocation(insets);
public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; }
int loc = getInitialLocation(insets); int available = getAvailableSize(dims, insets); sizes[0] = getDividerLocation(split) - loc; sizes[1] = available - sizes[0] - sizes[1]; setComponentToSize(components[0], sizes[0], loc, insets, dims); loc += sizes[0]; setComponentToSize(components[2], sizes[2], loc, insets, dims); loc += sizes[2]; setComponentToSize(components[1], sizes[1], loc, insets, dims);
public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
return layoutManager.sizes[0] + layoutManager.getInitialLocation(splitPane.getInsets());
return dividerLocation;
public int getDividerLocation(JSplitPane jc) { return layoutManager.sizes[0] + layoutManager.getInitialLocation(splitPane.getInsets()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
value -= layoutManager.minimumSizeOfComponent(0);
value += layoutManager.minimumSizeOfComponent(0);
public int getMinimumDividerLocation(JSplitPane jc) { int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value -= layoutManager.minimumSizeOfComponent(0); return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
divider.setBorder(UIManager.getBorder("SplitPaneDivider.border"));
protected void installDefaults() { LookAndFeel.installColors(splitPane, "SplitPane.background", "SplitPane.foreground"); LookAndFeel.installBorder(splitPane, "SplitPane.border"); divider = createDefaultDivider(); resetLayoutManager(); nonContinuousLayoutDivider = createDefaultNonContinuousLayoutDivider(); splitPane.add(divider, JSplitPane.DIVIDER); // There is no need to add the nonContinuousLayoutDivider splitPane.setDividerSize(UIManager.getInt("SplitPane.dividerSize")); splitPane.setOpaque(true); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
location = validLocation(location); Container p = jc.getParent(); Component right = jc.getRightComponent(); Dimension rightPrefSize = right == null ? new Dimension(0, 0) : right.getPreferredSize(); Dimension size = jc.getSize(); if (size.width == 0 && size.height == 0) size = jc.getPreferredSize(); if (getOrientation() == 0 && location > size.height) { location = size.height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > size.width) { location = size.width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes);
dividerLocation = validLocation(location);
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Component right = jc.getRightComponent(); Dimension rightPrefSize = right == null ? new Dimension(0, 0) : right.getPreferredSize(); Dimension size = jc.getSize(); // check if the size has been set for the splitpane if (size.width == 0 && size.height == 0) size = jc.getPreferredSize(); if (getOrientation() == 0 && location > size.height) { location = size.height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > size.width) { location = size.width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
if (splitPane.getBorder() instanceof UIResource)
protected void uninstallDefaults() { layoutManager = null; splitPane.remove(divider); divider = null; nonContinuousLayoutDivider = null; splitPane.setBackground(null); splitPane.setBorder(null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
public Canvas() { }
public Canvas() { }
public Canvas() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/Canvas.java/buggy/core/src/classpath/java/java/awt/Canvas.java
public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height);
public static void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) { Container parent = c.getParent(); if (parent != null) parent.remove(c); if (p != null) p.add(c); Shape savedClip = g.getClip(); g.setClip(x, y, w, h); g.translate(x, y); c.paint(g); g.translate(-x, -y); g.setClip(savedClip);
public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/SwingUtilities.java/buggy/core/src/classpath/javax/javax/swing/SwingUtilities.java
public void addSessionView(String tabText,Session session) {
public void addSessionView(String tabText,Session sessionView) { final Session session = sessionView;
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e159ff18f23e366cd46e67f21741f1b497e0e721/Gui5250Frame.java/buggy/tn5250j/src/org/tn5250j/Gui5250Frame.java
session.grabFocus();
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e159ff18f23e366cd46e67f21741f1b497e0e721/Gui5250Frame.java/buggy/tn5250j/src/org/tn5250j/Gui5250Frame.java
ses.grabFocus(); ses.resizeMe(); repaint();
final Session finalSession = ses; SwingUtilities.invokeLater(new Runnable() { public void run() { finalSession.resizeMe(); finalSession.repaint(); } });
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e159ff18f23e366cd46e67f21741f1b497e0e721/Gui5250Frame.java/buggy/tn5250j/src/org/tn5250j/Gui5250Frame.java
session.grabFocus(); session.resizeMe(); session.repaint();
SwingUtilities.invokeLater(new Runnable() { public void run() { session.resizeMe(); session.repaint(); session.grabFocus(); } });
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e159ff18f23e366cd46e67f21741f1b497e0e721/Gui5250Frame.java/buggy/tn5250j/src/org/tn5250j/Gui5250Frame.java
sessionPane.setTitleAt(index,d); }
finalSession.resizeMe(); finalSession.repaint(); }
public void run() { sessionPane.setTitleAt(index,d); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e159ff18f23e366cd46e67f21741f1b497e0e721/Gui5250Frame.java/buggy/tn5250j/src/org/tn5250j/Gui5250Frame.java
{
{
public JTabbedPane() { this(SwingConstants.TOP, WRAP_TAB_LAYOUT); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTabbedPane.java/buggy/core/src/classpath/javax/javax/swing/JTabbedPane.java
public void addTab(String title, Icon icon, Component component)
public void addTab(String title, Icon icon, Component component, String tip)
public void addTab(String title, Icon icon, Component component) { insertTab(title, icon, component, null, tabs.size()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTabbedPane.java/buggy/core/src/classpath/javax/javax/swing/JTabbedPane.java
insertTab(title, icon, component, null, tabs.size());
insertTab(title, icon, component, tip, tabs.size());
public void addTab(String title, Icon icon, Component component) { insertTab(title, icon, component, null, tabs.size()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTabbedPane.java/buggy/core/src/classpath/javax/javax/swing/JTabbedPane.java
public void remove (int index)
public void remove(int index)
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JLayeredPane.java/buggy/core/src/classpath/javax/javax/swing/JLayeredPane.java
Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index);
Component c = getComponent(index); int layer = getLayer(c); decrLayer(new Integer(layer)); componentToLayer.remove(c); super.remove(index);
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JLayeredPane.java/buggy/core/src/classpath/javax/javax/swing/JLayeredPane.java
repaint();
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JLayeredPane.java/buggy/core/src/classpath/javax/javax/swing/JLayeredPane.java
this.inlineDepth--;
public void endInlinedMethod(VmMethod previousMethod) { if (log) { os.log("End of inlined method"); } // Do some housekeeping helper.setMethod(previousMethod); os.setObjectRef(inlinedMethodInfo.getEndOfInlineLabel()); this.currentMethod = previousMethod; // Push the types on the vstack inlinedMethodInfo.pushExitStack(ifac, vstack); // Push the return value inlinedMethodInfo.pushReturnValue(helper); // Cleanup helper.setLabelPrefix(inlinedMethodInfo.getPreviousLabelPrefix()); this.inlinedMethodInfo = inlinedMethodInfo.getPrevious(); if (debug) { BootLog.debug("endInlinedMethod"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
this.inlineDepth++;
public void startInlinedMethodCode(VmMethod inlinedMethod, int newMaxLocals) { if (log) { os.log("Start of inlined method code"); } if (debug) { BootLog.debug("startInlinedMethodCode(" + inlinedMethod + ")"); } // TODO: check whether this is really needed // For now yes, because a new basic block resets the registerpool // and that fails if not all registers are freed. vstack.push(eContext); this.inlinedMethodInfo.setOuterMethodStack(vstack.asTypeStack()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
cm.add(currentMethod, address, offset);
cm.add(currentMethod, address, offset, inlineDepth);
public void startInstruction(int address) { if (debug) { BootLog.debug("#" + address + "\t" + vstack); } if (log) { if (debug) { os.log("#" + address + " VStack: " + vstack.toString()); } else { os.log("#" + address); } } this.curAddress = address; this._curInstrLabel = null; if (startOfBB || setCurInstrLabel) { os.setObjectRef(getCurInstrLabel()); startOfBB = false; setCurInstrLabel = false; } final int offset = os.getLength() - startOffset; cm.add(currentMethod, address, offset); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
os.writeLEA(SP, SP, 8);
os.writeLEA(SP, SP, -8);
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/DoubleWordItem.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java
public final void invokeJavaMethod(VmMethod method) { if (false) { final int staticsIdx = (VmArray.DATA_OFFSET + method.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EAX, STATICS, staticsIdx); } else { os.writeMOV_Const(Register.EAX, method); } invokeJavaMethod(method.getSignature());
public final void invokeJavaMethod(String signature) { final int offset = context.getVmMethodNativeCodeField().getOffset(); os.writeCALL(Register.EAX, offset); pushReturnValue(signature);
public final void invokeJavaMethod(VmMethod method) { if (false) { final int staticsIdx = (VmArray.DATA_OFFSET + method.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EAX, STATICS, staticsIdx); } else { os.writeMOV_Const(Register.EAX, method); } invokeJavaMethod(method.getSignature()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/X86CompilerHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java
os.writeLEA(SP, SP, 4);
os.writeLEA(SP, SP, -4);
final void loadTo(EmitterContext ec, Register reg) { assertCondition(reg != null, "Reg != null"); final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); assertCondition(!pool.isFree(reg), "reg not free"); switch (kind) { case Kind.REGISTER: if (this.reg != reg) { os.writeMOV(INTSIZE, reg, this.reg); release(ec); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, reg, FP, getOffsetToFP()); break; case Kind.CONSTANT: loadToConstant(ec, os, reg); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack FPUHelper.fxch(os, stack.fpuStack, this); stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 4); popFromFPU(os, SP, 0); os.writePOP(reg); break; case Kind.STACK: //TODO: make sure this is on top os stack if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(reg); break; default: throw new IllegalArgumentException("Invalid item kind"); } kind = Kind.REGISTER; this.reg = reg; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/WordItem.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/WordItem.java
if (!resolved) { doResolve(clc); resolved = true; }
public void resolve(VmClassLoader clc) { if (!resolved) { doResolve(clc); resolved = true; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmConstObject.java/buggy/core/src/core/org/jnode/vm/classmgr/VmConstObject.java
public static int SignatureToType(String signature) { return SignatureToType(signature.charAt(0));
public static int SignatureToType(char type) { int res; switch (type) { case 'Z': case 'B': case 'C': case 'S': case 'I': res = JvmType.INT; break; case 'F': res = JvmType.FLOAT; break; case 'L': case ';': case '[': res = JvmType.REFERENCE; break; case 'J': res = JvmType.LONG; break; case 'D': res = JvmType.DOUBLE; break; default: throw new IllegalArgumentException("Unknown type" + type); } return res;
public static int SignatureToType(String signature) { return SignatureToType(signature.charAt(0)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/JvmType.java/buggy/core/src/core/org/jnode/vm/JvmType.java
public DoubleWordItem createReg(int jvmType, Register lsb, Register msb) { final DoubleWordItem item = (DoubleWordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, 0, lsb, msb);
public WordItem createReg(int jvmType, Register reg) { final WordItem item = (WordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, reg, 0);
public DoubleWordItem createReg(int jvmType, Register lsb, Register msb) { final DoubleWordItem item = (DoubleWordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, 0, lsb, msb); return item; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ItemFactory.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java
public CompileError(String s) { super(s);
public CompileError() { super();
public CompileError(String s) { super(s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/CompileError.java/buggy/core/src/core/org/jnode/vm/compiler/CompileError.java
public abstract void visit_ldc(VmConstClass value);
public abstract void visit_ldc(VmConstString value);
public abstract void visit_ldc(VmConstClass value);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/bytecode/BytecodeVisitor.java
os.writeLEA(SP, SP, 4);
os.writeLEA(SP, SP, -4);
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); switch (getKind()) { case Kind.REGISTER: os.writePUSH(reg); break; case Kind.LOCAL: os.writePUSH(FP, offsetToFP); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; FPUHelper.fxch(os, fpuStack, this); stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 4); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; default: throw new IllegalArgumentException("Invalid item kind"); } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/WordItem.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/WordItem.java
&& parent.getHeight() > getUI().getMinimumSize(this).height;
&& parent.getHeight() >= getUI().getMinimumSize(this).height && parent.getHeight() <= getUI().getMaximumSize(this).height;
public boolean getScrollableTracksViewportHeight() { // Tests show that this returns true when the parent is a JViewport // and has a height > minimum UI height. Container parent = getParent(); return parent instanceof JViewport && parent.getHeight() > getUI().getMinimumSize(this).height; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
public AssertionError(Object msg)
public AssertionError()
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f9edc08acdeb1f2f4fe82f01243818bd374a3e46/AssertionError.java/buggy/core/src/classpath/java/java/lang/AssertionError.java
super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg);
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f9edc08acdeb1f2f4fe82f01243818bd374a3e46/AssertionError.java/buggy/core/src/classpath/java/java/lang/AssertionError.java
public void deinstall(JEditorPane c) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/EditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/EditorKit.java
public void install(JEditorPane c) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/EditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/EditorKit.java
bad.minor = Minor.Any;
public static NameComponent extract(Any a) { try { return ((NameComponentHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION("Name component expected"); bad.initCause(ex); throw bad; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/NameComponentHelper.java/clean/core/src/classpath/org/org/omg/CosNaming/NameComponentHelper.java
int y = rect.y;
int y = rect.y + metrics.getAscent();
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y; for (int i = 0; i < root.getElementCount(); i++) { drawLine(i, g, rect.x, y); y += metrics.getHeight(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/PlainView.java/clean/core/src/classpath/javax/javax/swing/text/PlainView.java
public Word sub (Word w2) {
public Word sub (int w2) {
public Word sub (Word w2) { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Word.java/buggy/core/src/vmmagic/org/vmmagic/unboxed/Word.java
toXMLWriter(outputWriter, "", false, null, null);
basicXMLWriter(outputWriter, "", false, null, null);
public String toXMLString () { // hurm. Cant figure out how to use BufferedWriter here. fooey. Writer outputWriter = (Writer) new StringWriter(); try { toXMLWriter(outputWriter, "", false, null, null); } catch (java.io.IOException e) { // weird. Out of memorY? Log.errorln("Cant got IOException for toXMLWriter() method within toXMLString()."); Log.printStackTrace(e); } return outputWriter.toString(); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/8e861c3e39bc28044d8cec7e350188daf73e546e/BaseObject.java/clean/src/gov/nasa/gsfc/adc/xdf/BaseObject.java
public ShortSeqHolder(short[] initial_value)
public ShortSeqHolder()
public ShortSeqHolder(short[] initial_value) { value = initial_value; typecode.setLength(value.length); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9b55eb78411ab1a82da7ba097b7b93a8cd80865/ShortSeqHolder.java/clean/core/src/classpath/org/org/omg/CORBA/ShortSeqHolder.java
value = initial_value; typecode.setLength(value.length);
public ShortSeqHolder(short[] initial_value) { value = initial_value; typecode.setLength(value.length); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9b55eb78411ab1a82da7ba097b7b93a8cd80865/ShortSeqHolder.java/clean/core/src/classpath/org/org/omg/CORBA/ShortSeqHolder.java
public JNodeBufferedImage(int w, int h, int type) { super(w, h, type);
public JNodeBufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable properties) { super(colormodel, writableraster, premultiplied, properties);
public JNodeBufferedImage(int w, int h, int type) { super(w, h, type); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/JNodeBufferedImage.java/buggy/gui/src/awt/org/jnode/awt/image/JNodeBufferedImage.java
public String getValue(Name name)
public String getValue(String name)
public String getValue(Name name) { return (String) get(name); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/Attributes.java/clean/core/src/classpath/java/java/util/jar/Attributes.java
return (String) get(name);
return (String) get(new Name(name));
public String getValue(Name name) { return (String) get(name); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/Attributes.java/clean/core/src/classpath/java/java/util/jar/Attributes.java
EditorKit e = null; String className = (String) registerMap.get(type); if (className != null)
EditorKit e = (EditorKit) editorKits.get(type); if (e == null)
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
e = (EditorKit) Class.forName(className).newInstance();
e = (EditorKit) loader.loadClass(className).newInstance();
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
} if (e != null) editorKits.put(type, e);
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
return (String) registerMap.get(type);
EditorKitMapping m = (EditorKitMapping) registerMap.get(type); String kitName = m != null ? m.className : null; return kitName;
public static String getEditorKitClassNameForContentType(String type) { return (String) registerMap.get(type); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
e = new PlainEditorKit();
e = createDefaultEditorKit();
public EditorKit getEditorKitForContentType(String type) { // First check if an EditorKit has been explicitly set. EditorKit e = (EditorKit) editorMap.get(type); // Then check to see if we can create one. if (e == null) e = createEditorKitForContentType(type); // Otherwise default to PlainEditorKit. if (e == null) e = new PlainEditorKit(); return e; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
return page;
return loader != null ? loader.page : null;
public URL getPage() { return page; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
if (getScrollableTracksViewportWidth()) pref.width = getUI().getMinimumSize(this).width; if (getScrollableTracksViewportHeight()) pref.height = getUI().getMinimumSize(this).height;
Container parent = getParent(); if (parent instanceof JViewport) { JViewport vp = (JViewport) getParent(); TextUI ui = getUI(); Dimension min = null; if (! getScrollableTracksViewportWidth()) { min = ui.getMinimumSize(this); int vpWidth = vp.getWidth(); if (vpWidth != 0 && vpWidth < min.width) pref.width = min.width; } if (! getScrollableTracksViewportHeight()) { if (min == null) min = ui.getMinimumSize(this); int vpHeight = vp.getHeight(); if (vpHeight != 0 && vpHeight < min.height) pref.height = min.height; } }
public Dimension getPreferredSize() { Dimension pref = super.getPreferredSize(); if (getScrollableTracksViewportWidth()) pref.width = getUI().getMinimumSize(this).width; if (getScrollableTracksViewportHeight()) pref.height = getUI().getMinimumSize(this).height; return pref; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
&& parent.getHeight() >= getUI().getMinimumSize(this).height && parent.getHeight() <= getUI().getMaximumSize(this).height;
&& height >= ui.getMinimumSize(this).height && height <= ui.getMaximumSize(this).height;
public boolean getScrollableTracksViewportHeight() { // Tests show that this returns true when the parent is a JViewport // and has a height > minimum UI height. Container parent = getParent(); return parent instanceof JViewport && parent.getHeight() >= getUI().getMinimumSize(this).height && parent.getHeight() <= getUI().getMaximumSize(this).height; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/632f16a08e2d29390bada293407cc91a253b358b/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java