rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
public BindException(String message)
public BindException()
public BindException(String message) { super(message); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/BindException.java/buggy/core/src/classpath/java/java/net/BindException.java
super(message);
public BindException(String message) { super(message); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/BindException.java/buggy/core/src/classpath/java/java/net/BindException.java
public static Object copyObject(Object obj, javax.rmi.ORB orb)
public static java.lang.Object copyObject(java.lang.Object object, ORB orb)
public static Object copyObject(Object obj, javax.rmi.ORB orb) throws RemoteException { if(delegate != null) return delegate.copyObject(obj, orb); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null) return delegate.copyObject(obj, orb); else return null;
return delegate.copyObject(object, orb);
public static Object copyObject(Object obj, javax.rmi.ORB orb) throws RemoteException { if(delegate != null) return delegate.copyObject(obj, orb); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
public static Object[] copyObjects(Object obj[], javax.rmi.ORB orb)
public static java.lang.Object[] copyObjects(java.lang.Object[] object, ORB orb)
public static Object[] copyObjects(Object obj[], javax.rmi.ORB orb) throws RemoteException { if(delegate != null) return delegate.copyObjects(obj, orb); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null) return delegate.copyObjects(obj, orb); else return null;
return delegate.copyObjects(object, orb);
public static Object[] copyObjects(Object obj[], javax.rmi.ORB orb) throws RemoteException { if(delegate != null) return delegate.copyObjects(obj, orb); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null)
public static ValueHandler createValueHandler() { if(delegate != null) return delegate.createValueHandler(); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
else return null;
public static ValueHandler createValueHandler() { if(delegate != null) return delegate.createValueHandler(); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null)
public static String getCodebase(Class clz) { if(delegate != null) return delegate.getCodebase(clz); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
else return null;
public static String getCodebase(Class clz) { if(delegate != null) return delegate.getCodebase(clz); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null)
public static Tie getTie(Remote target) { if(delegate != null) return delegate.getTie(target); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
else return null;
public static Tie getTie(Remote target) { if(delegate != null) return delegate.getTie(target); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null)
public static boolean isLocal(Stub stub) throws RemoteException { if(delegate != null) return delegate.isLocal(stub); else return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
else return false;
public static boolean isLocal(Stub stub) throws RemoteException { if(delegate != null) return delegate.isLocal(stub); else return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null)
public static RemoteException mapSystemException(SystemException ex) { if(delegate != null) return delegate.mapSystemException(ex); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
else return null;
public static RemoteException mapSystemException(SystemException ex) { if(delegate != null) return delegate.mapSystemException(ex); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
public static Object readAny(InputStream in)
public static java.lang.Object readAny(InputStream input)
public static Object readAny(InputStream in) { if(delegate != null) return delegate.readAny(in); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null) return delegate.readAny(in); else return null;
return delegate.readAny(input);
public static Object readAny(InputStream in) { if(delegate != null) return delegate.readAny(in); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null)
public static void registerTarget(Tie tie, Remote target) { if(delegate != null) delegate.registerTarget(tie, target); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null)
public static void unexportObject(Remote target) { if(delegate != null) delegate.unexportObject(target); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
public static RemoteException wrapException(Throwable orig)
public static RemoteException wrapException(Throwable exception)
public static RemoteException wrapException(Throwable orig) { if(delegate != null) return delegate.wrapException(orig); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null) return delegate.wrapException(orig); else return null;
return delegate.wrapException(exception);
public static RemoteException wrapException(Throwable orig) { if(delegate != null) return delegate.wrapException(orig); else return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
public static void writeAbstractObject(OutputStream out, Object obj)
public static void writeAbstractObject(OutputStream output, java.lang.Object object)
public static void writeAbstractObject(OutputStream out, Object obj) { if(delegate != null) delegate.writeAbstractObject(out, obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null) delegate.writeAbstractObject(out, obj);
delegate.writeAbstractObject(output, object);
public static void writeAbstractObject(OutputStream out, Object obj) { if(delegate != null) delegate.writeAbstractObject(out, obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
public static void writeAny(OutputStream out, Object obj)
public static void writeAny(OutputStream output, java.lang.Object object)
public static void writeAny(OutputStream out, Object obj) { if(delegate != null) delegate.writeAny(out, obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null) delegate.writeAny(out, obj);
delegate.writeAny(output, object);
public static void writeAny(OutputStream out, Object obj) { if(delegate != null) delegate.writeAny(out, obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
public static void writeRemoteObject(OutputStream out, Object obj)
public static void writeRemoteObject(OutputStream output, java.lang.Object object)
public static void writeRemoteObject(OutputStream out, Object obj) { if(delegate != null) delegate.writeRemoteObject(out, obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
if(delegate != null) delegate.writeRemoteObject(out, obj);
delegate.writeRemoteObject(output, object);
public static void writeRemoteObject(OutputStream out, Object obj) { if(delegate != null) delegate.writeRemoteObject(out, obj); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Util.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/Util.java
Object copyObject(Object obj, javax.rmi.ORB orb) throws RemoteException;
Object copyObject(Object obj, ORB orb) throws RemoteException;
Object copyObject(Object obj, javax.rmi.ORB orb) throws RemoteException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/UtilDelegate.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/UtilDelegate.java
Object[] copyObjects(Object obj[], javax.rmi.ORB orb) throws RemoteException;
Object[] copyObjects(Object[] obj, ORB orb) throws RemoteException;
Object[] copyObjects(Object obj[], javax.rmi.ORB orb) throws RemoteException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/UtilDelegate.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/UtilDelegate.java
Object readAny(InputStream in);
Object readAny(InputStream input);
Object readAny(InputStream in);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/UtilDelegate.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/UtilDelegate.java
void writeAbstractObject(OutputStream out, Object obj);
void writeAbstractObject(OutputStream output, Object object);
void writeAbstractObject(OutputStream out, Object obj);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/UtilDelegate.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/UtilDelegate.java
void writeAny(OutputStream out, Object obj);
void writeAny(OutputStream output, Object object);
void writeAny(OutputStream out, Object obj);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/UtilDelegate.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/UtilDelegate.java
void writeRemoteObject(OutputStream out, Object obj);
void writeRemoteObject(OutputStream output, Object obj);
void writeRemoteObject(OutputStream out, Object obj);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/UtilDelegate.java/buggy/core/src/classpath/javax/javax/rmi/CORBA/UtilDelegate.java
public abstract void copyArea(int x, int y, int width, int height, int dx, int dy);
public abstract void copyArea(int x, int y, int width, int height, int dx, int dy);
public abstract void copyArea(int x, int y, int width, int height, int dx, int dy);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) { draw(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN));
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) { draw(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN));
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) { draw(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
}
}
public void drawGlyphVector(GlyphVector g, float x, float y) { // TODO Auto-generated method stub }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
final GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO, npoints * 2);
final GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO, npoints * 2);
public final void drawPolyline(int[] xPoints, int[] yPoints, int npoints) { final GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO, npoints * 2); path.moveTo(xPoints[0], yPoints[0]); for (int i = 1; i < npoints; i++) { path.lineTo(xPoints[i], yPoints[i]); } draw(path); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public final void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { draw(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
public final void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { draw(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
public final void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { draw(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public void drawString(AttributedCharacterIterator iterator, float x, float y) {
public void drawString(AttributedCharacterIterator iterator, float x, float y) {
public void drawString(AttributedCharacterIterator iterator, float x, float y) { // TODO Auto-generated method stub }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public final void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) { fill(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN));
public final void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) { fill(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN));
public final void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) { fill(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public final void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { fill(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
public final void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { fill(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
public final void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { fill(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
throw new RuntimeException("Not implemented yet");
throw new RuntimeException("Not implemented yet");
public FontRenderContext getFontRenderContext() { throw new RuntimeException("Not implemented yet"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public void transform(AffineTransform Tx) { transform.concatenate(Tx);
public void transform(AffineTransform tx) { transform.concatenate(tx); Rectangle2D r = clip.getBounds2D(); double[] coords = new double[] { r.getX(), r.getY(), r.getX() + r.getWidth(), r.getY() + r.getHeight() }; try { tx.createInverse().transform(coords, 0, coords, 0, 2); r.setRect(coords[0], coords[1], coords[2] - coords[0], coords[3] - coords[1]); clip = r; } catch (java.awt.geom.NoninvertibleTransformException e) { }
public void transform(AffineTransform Tx) { transform.concatenate(Tx); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa4c18b4d398f6f8638efbc4b8723e673a2cbc83/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
protected void decrLayer(Integer layer)
private void decrLayer(Integer layer)
protected void decrLayer(Integer layer) { int sz = 0; if (layers.containsKey (layer)) sz = ((Integer)(layers.get (layer))).intValue () - 1; layers.put (layer, new Integer(sz)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JLayeredPane.java/clean/core/src/classpath/javax/javax/swing/JLayeredPane.java
protected void incrLayer(Integer layer)
private void incrLayer(Integer layer)
protected void incrLayer(Integer layer) { int sz = 1; if (layers.containsKey (layer)) sz += ((Integer)(layers.get (layer))).intValue (); layers.put (layer, new Integer(sz)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JLayeredPane.java/clean/core/src/classpath/javax/javax/swing/JLayeredPane.java
protected int[] layerToRange (Integer layer)
private int[] layerToRange (Integer layer)
protected 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/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JLayeredPane.java/clean/core/src/classpath/javax/javax/swing/JLayeredPane.java
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;
public Dimension minimumLayoutSize(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. 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; Insets i = sc.getInsets(); return new Dimension(width + i.left + i.right, height + i.top + i.bottom); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
return new Dimension(width + i.left + i.right, height + i.top + i.bottom);
Dimension viewportMinSize = sc.getViewport().getMinimumSize(); int width = i.left + i.right + viewportMinSize.width; if (sc.getVerticalScrollBarPolicy() != JScrollPane.VERTICAL_SCROLLBAR_NEVER) width += sc.getVerticalScrollBar().getMinimumSize().width; int height = i.top + i.bottom + viewportMinSize.height; if (sc.getHorizontalScrollBarPolicy() != JScrollPane.HORIZONTAL_SCROLLBAR_NEVER) height += sc.getHorizontalScrollBar().getMinimumSize().height; return new Dimension(width, height);
public Dimension minimumLayoutSize(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. 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; Insets i = sc.getInsets(); return new Dimension(width + i.left + i.right, height + i.top + i.bottom); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/ScrollPaneLayout.java/clean/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java
return !screen.isKeyboardLocked() && (screen.isWithinScreenArea(b.getStartPoint().x,b.getStartPoint().y));
return screen.isWithinScreenArea(b.getStartPoint().x,b.getStartPoint().y);
public boolean canDrawRubberBand(RubberBand b) { // before we get the row col we first have to translate the x,y point // back to screen coordinates because we are translating the starting // point to the 5250 screen coordinates return !screen.isKeyboardLocked() && (screen.isWithinScreenArea(b.getStartPoint().x,b.getStartPoint().y)); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
screen.getCurrentCol()-1,
screen.getCurrentCol() + 1,
public void doKeyBoundArea(KeyEvent ke,String last) { Point p = new Point(); if (!rubberband.isAreaSelected()) { if (last.equals("[markleft]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-1, p); if (last.equals("[markright]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-2, p); if (last.equals("[markup]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); if (last.equals("[markdown]")) screen.getPointFromRowCol(screen.getCurrentRow()-2, screen.getCurrentCol() - 1, p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); } screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); rubberband.getCanvas().translateEnd(p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_DRAGGED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
screen.getPointFromRowCol(screen.getCurrentRow() - 1,
screen.getPointFromRowCol(screen.getCurrentRow() + 1,
public void doKeyBoundArea(KeyEvent ke,String last) { Point p = new Point(); if (!rubberband.isAreaSelected()) { if (last.equals("[markleft]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-1, p); if (last.equals("[markright]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-2, p); if (last.equals("[markup]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); if (last.equals("[markdown]")) screen.getPointFromRowCol(screen.getCurrentRow()-2, screen.getCurrentCol() - 1, p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); } screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); rubberband.getCanvas().translateEnd(p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_DRAGGED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
screen.getPointFromRowCol(screen.getCurrentRow()-2,
screen.getPointFromRowCol(screen.getCurrentRow() - 2,
public void doKeyBoundArea(KeyEvent ke,String last) { Point p = new Point(); if (!rubberband.isAreaSelected()) { if (last.equals("[markleft]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-1, p); if (last.equals("[markright]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-2, p); if (last.equals("[markup]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); if (last.equals("[markdown]")) screen.getPointFromRowCol(screen.getCurrentRow()-2, screen.getCurrentCol() - 1, p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); } screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); rubberband.getCanvas().translateEnd(p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_DRAGGED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
rubberband.getCanvas().translateEnd(p);
public void doKeyBoundArea(KeyEvent ke,String last) { Point p = new Point(); if (!rubberband.isAreaSelected()) { if (last.equals("[markleft]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-1, p); if (last.equals("[markright]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol()-2, p); if (last.equals("[markup]")) screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); if (last.equals("[markdown]")) screen.getPointFromRowCol(screen.getCurrentRow()-2, screen.getCurrentCol() - 1, p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); } screen.getPointFromRowCol(screen.getCurrentRow() - 1, screen.getCurrentCol() - 1, p); rubberband.getCanvas().translateEnd(p); MouseEvent me = new MouseEvent(this, MouseEvent.MOUSE_DRAGGED, System.currentTimeMillis(), MouseEvent.BUTTON1_MASK, p.x,p.y, 1,false); dispatchEvent(me); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
final int pos = screen.getRowColFromPoint(me.getX(),me.getY());
final int pos = screen.getPosFromView(me.getX(),me.getY());
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width + 1 , workR.height + 1 ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (keyHandler.isRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); getFocusForMe(); } }; xtfrMenu.add(action); popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
screen.sendKeys(MNEMONIC_PASTE);
screen.copyMe();
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width + 1 , workR.height + 1 ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (keyHandler.isRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); getFocusForMe(); } }; xtfrMenu.add(action); popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
rubberband.getBoundingArea(workR); int ePos = screen.getRowColFromPoint(workR.width + 1 , workR.height + 1 );
screen.getBoundingArea(workR);
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width + 1 , workR.height + 1 ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (keyHandler.isRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); getFocusForMe(); } }; xtfrMenu.add(action); popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
+ " " + screen.getCol(ePos));
+ " " + workR.width);
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width + 1 , workR.height + 1 ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (keyHandler.isRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); getFocusForMe(); } }; xtfrMenu.add(action); popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
+ " " + screen.getRow(ePos));
+ " " + workR.height);
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width + 1 , workR.height + 1 ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (keyHandler.isRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); getFocusForMe(); } }; xtfrMenu.add(action); popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
screen.sendKeys(MNEMONIC_PASTE);
screen.copyMe();
public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
public Point translateEnd(Point end) { return screen.translateEnd(end); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
}
public org.omg.CORBA.portable.InputStream create_input_stream() { cdrBufOutput out = new cdrBufOutput(); out.setOrb(orb); write_value(out); cdrBufInput in = new cdrBufInput(out.buffer.toByteArray()); in.setOrb(orb); return in; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/664d51c10013e4cacae28aeda82d586ac5b4250c/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
throw new NO_IMPLEMENT("Not implemented for " + typeNamer.nameIt(a_type) );
{ cdrBufOutput buffer = new cdrBufOutput(); buffer.setOrb(orb); has = new universalHolder(buffer); }
public void read_value(org.omg.CORBA.portable.InputStream input, TypeCode a_type ) throws MARSHAL { try { int kind = a_type.kind().value(); // Fixed needs special handling. if (kind == TCKind._tk_fixed) { BigDecimal dec = BigDecimalHelper.read(input, a_type.fixed_scale()); has = new FixedHolder(dec); } else { has = holderFactory.createHolder(a_type); if (has == null) throw new NO_IMPLEMENT("Not implemented for " + typeNamer.nameIt(a_type) ); } type(a_type); has._read(input); } catch (BadKind ex) { throw new MARSHAL("Bad kind: " + ex.getMessage()); } catch (IOException ex) { throw new MARSHAL("IO exception: " + ex.getMessage()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/664d51c10013e4cacae28aeda82d586ac5b4250c/gnuAny.java/clean/core/src/classpath/gnu/gnu/CORBA/gnuAny.java
System.out.println(" socks set ");
public final void setProxy(String proxyHost, String proxyPort) { this.proxyHost=proxyHost; this.proxyPort = proxyPort; proxySet = true; Properties systemProperties = System.getProperties(); systemProperties.put("socksProxySet","true"); systemProperties.put("socksProxyHost",proxyHost); systemProperties.put("socksProxyPort",proxyPort); System.setProperties(systemProperties); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9e3f98202f0eb0ef5207f9793209ab3f13916f81/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
if (f == null) return;
protected void closeSession(Session targetSession) { Gui5250Frame f = getParentView(targetSession); int tabs = f.getSessionViewCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { f.removeSessionView(targetSession); manager.closeSession(targetSession); targetSession = null; } } else { closingDown(f); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/dcb947eb588a1d04e8bce2a3cb53d901acfa8f65/My5250.java/buggy/tn5250j/src/org/tn5250j/My5250.java
if (root == null) { throw new IllegalArgumentException("null root"); }
public void setRoot(TreeNode root) { // Sanity Check if (root == null) { throw new IllegalArgumentException("null root"); } // Set new root this.root = root; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultTreeModel.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeModel.java
if (a >= sel.length() || a < 0) return false;
public boolean isSelectedIndex(int a) { return sel.get(a); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java
BitSet oldRange = sel.get(lo, hi+1);
public void setLeadSelectionIndex(int leadIndex) { int oldLeadIndex = leadSelectionIndex; if (setLeadCalledFromAdd == false) oldSel = sel.clone(); leadSelectionIndex = leadIndex; if (anchorSelectionIndex == -1) return; int R1 = Math.min(anchorSelectionIndex, oldLeadIndex); int R2 = Math.max(anchorSelectionIndex, oldLeadIndex); int S1 = Math.min(anchorSelectionIndex, leadIndex); int S2 = Math.max(anchorSelectionIndex, leadIndex); int lo = Math.min(R1, S1); int hi = Math.max(R2, S2); BitSet oldRange = sel.get(lo, hi+1); if (isSelectedIndex(anchorSelectionIndex)) { sel.clear(R1, R2+1); sel.set(S1, S2+1); } else { sel.set(R1, R2+1); sel.clear(S1, S2+1); } BitSet newRange = sel.get(lo, hi+1); newRange.xor(oldRange); int beg = sel.nextSetBit(0), end = -1; for(int i=beg; i >= 0; i=sel.nextSetBit(i+1)) end = i; if (sel.equals(oldSel) == false) fireValueChanged(beg, end, valueIsAdjusting); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java
BitSet newRange = sel.get(lo, hi+1); newRange.xor(oldRange);
public void setLeadSelectionIndex(int leadIndex) { int oldLeadIndex = leadSelectionIndex; if (setLeadCalledFromAdd == false) oldSel = sel.clone(); leadSelectionIndex = leadIndex; if (anchorSelectionIndex == -1) return; int R1 = Math.min(anchorSelectionIndex, oldLeadIndex); int R2 = Math.max(anchorSelectionIndex, oldLeadIndex); int S1 = Math.min(anchorSelectionIndex, leadIndex); int S2 = Math.max(anchorSelectionIndex, leadIndex); int lo = Math.min(R1, S1); int hi = Math.max(R2, S2); BitSet oldRange = sel.get(lo, hi+1); if (isSelectedIndex(anchorSelectionIndex)) { sel.clear(R1, R2+1); sel.set(S1, S2+1); } else { sel.set(R1, R2+1); sel.clear(S1, S2+1); } BitSet newRange = sel.get(lo, hi+1); newRange.xor(oldRange); int beg = sel.nextSetBit(0), end = -1; for(int i=beg; i >= 0; i=sel.nextSetBit(i+1)) end = i; if (sel.equals(oldSel) == false) fireValueChanged(beg, end, valueIsAdjusting); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java
if (g instanceof Graphics2D) {
protected Graphics getComponentGraphics(Graphics g) { if (g instanceof Graphics2D) { g.setFont (this.getFont()); g.setColor (this.getForeground()); return g; } else { Graphics g2 = g.create (); g2.setFont (this.getFont()); g2.setColor (this.getForeground()); return g2; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
else { Graphics g2 = g.create (); g2.setFont (this.getFont()); g2.setColor (this.getForeground()); return g2; } }
protected Graphics getComponentGraphics(Graphics g) { if (g instanceof Graphics2D) { g.setFont (this.getFont()); g.setColor (this.getForeground()); return g; } else { Graphics g2 = g.create (); g2.setFont (this.getFont()); g2.setColor (this.getForeground()); return g2; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
ui.update(g, this);
{ Graphics g2 = g; if (!(g instanceof Graphics2D)) g2 = g.create(); ui.update(getComponentGraphics(g2), this); if (!(g instanceof Graphics2D)) g2.dispose(); }
protected void paintComponent(Graphics g) { if (ui != null) ui.update(g, this); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
public void setBackground(Color bg) { super.setBackground(bg); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
public void setBorder(Border newBorder) { Border oldBorder = border; border = newBorder; firePropertyChange("border", oldBorder, newBorder); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
firePropertyChange("enabeld", oldEnabled, enable); revalidate(); repaint();
firePropertyChange("enabled", oldEnabled, enable);
public void setEnabled(boolean enable) { boolean oldEnabled = isEnabled(); super.setEnabled(enable); firePropertyChange("enabeld", oldEnabled, enable); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
public void setFont(Font f) { super.setFont(f); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
public void setForeground(Color fg) { super.setForeground(fg); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
public void setMaximumSize(Dimension max) { Dimension oldMaximumSize = maximumSize; maximumSize = max; firePropertyChange("maximumSize", oldMaximumSize, maximumSize); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
public void setMinimumSize(Dimension min) { Dimension oldMinimumSize = minimumSize; minimumSize = min; firePropertyChange("minimumSize", oldMinimumSize, minimumSize); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
protected void setUI(ComponentUI newUI) { if (ui != null) ui.uninstallUI(this); ComponentUI oldUI = ui; ui = newUI; if (ui != null) ui.installUI(this); firePropertyChange("UI", oldUI, newUI); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
revalidate(); repaint();
public void setVisible(boolean v) { super.setVisible(v); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JComponent.java/clean/core/src/classpath/javax/javax/swing/JComponent.java
int_pixel_buffer[i] = currentModel.getRGB (pixels[p]);
int_pixel_buffer[i] = currentModel.getRGB (pixels[p] & 0xFF);
public synchronized void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { ColorModel currentModel; if (model != null) currentModel = model; else currentModel = this.model; for(int yp = y; yp < (y + h); yp++) { for(int xp = x; xp < (x + w); xp++) { // Check if the coordinates (xp, yp) are within the // pixel block that we are grabbing. if(xp >= this.x && yp >= this.y && xp < (this.x + this.width) && yp < (this.y + this.height)) { int i = (yp - this.y) * this.scansize + (xp - this.x) + this.offset; int p = (yp - y) * scansize + (xp - x) + offset; if (forceRGB) { ints_delivered = true; int_pixel_buffer[i] = currentModel.getRGB (pixels[p]); } else { bytes_delivered = true; byte_pixel_buffer[i] = pixels[p]; } } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f9edc08acdeb1f2f4fe82f01243818bd374a3e46/PixelGrabber.java/buggy/core/src/classpath/java/java/awt/image/PixelGrabber.java
)
)
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { if( getNoteList().size() > 0 ) { super.toXMLOutputStream ( outputstream, XMLDeclAttribs, indent, dontCloseNode, newNodeNameString, noChildObjectNodeName ); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/Notes.java/clean/src/gov/nasa/gsfc/adc/xdf/Notes.java
if( getNoteList().size() > 0 ) {
if( getNoteList().size() > 0 ) {
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { if( getNoteList().size() > 0 ) { super.toXMLOutputStream ( outputstream, XMLDeclAttribs, indent, dontCloseNode, newNodeNameString, noChildObjectNodeName ); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/Notes.java/clean/src/gov/nasa/gsfc/adc/xdf/Notes.java
currentField.getAdjustment() > 0 && currentModified && !currentField.isCanSend())
(currentField.getAdjustment() > 0 || currentField.isSignedNumeric()) && currentModified && isInField() && !currentField.isCanSend())
public boolean isCanSendAid() { if (currentField != null && currentField.getAdjustment() > 0 && currentModified && !currentField.isCanSend()) return false; else return true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bfdc3a6cd533e8ab92b1e1434b62b83cc2023d5b/ScreenFields.java/buggy/tn5250j/src/org/tn5250j/ScreenFields.java
parseExtra ();
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/ZipEntry.java/buggy/core/src/classpath/java/java/util/zip/ZipEntry.java
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos+1] & 0xff) | (extra[pos+2] & 0xff) << 8 | (extra[pos+3] & 0xff) << 16 | (extra[pos+4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/ZipEntry.java/buggy/core/src/classpath/java/java/util/zip/ZipEntry.java
try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos+1] & 0xff) | (extra[pos+2] & 0xff) << 8 | (extra[pos+3] & 0xff) << 16 | (extra[pos+4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
}
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos+1] & 0xff) | (extra[pos+2] & 0xff) << 8 | (extra[pos+3] & 0xff) << 16 | (extra[pos+4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/ZipEntry.java/buggy/core/src/classpath/java/java/util/zip/ZipEntry.java
public boolean loadAllInstruments(Soundbank soundbank) throws IllegalArgumentException;
public boolean loadAllInstruments(Soundbank soundbank);
public boolean loadAllInstruments(Soundbank soundbank) throws IllegalArgumentException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Synthesizer.java/clean/core/src/classpath/javax/javax/sound/midi/Synthesizer.java
public boolean loadInstrument(Instrument instrument) throws IllegalArgumentException;
public boolean loadInstrument(Instrument instrument);
public boolean loadInstrument(Instrument instrument) throws IllegalArgumentException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Synthesizer.java/clean/core/src/classpath/javax/javax/sound/midi/Synthesizer.java
public boolean loadInstruments(Soundbank soundbank, Patch[] patchList) throws IllegalArgumentException;
public boolean loadInstruments(Soundbank soundbank, Patch[] patchList);
public boolean loadInstruments(Soundbank soundbank, Patch[] patchList) throws IllegalArgumentException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Synthesizer.java/clean/core/src/classpath/javax/javax/sound/midi/Synthesizer.java
public boolean remapInstrument(Instrument from, Instrument to) throws IllegalArgumentException;
public boolean remapInstrument(Instrument from, Instrument to);
public boolean remapInstrument(Instrument from, Instrument to) throws IllegalArgumentException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Synthesizer.java/clean/core/src/classpath/javax/javax/sound/midi/Synthesizer.java
public void unloadAllInstruments(Soundbank soundbank) throws IllegalArgumentException;
public void unloadAllInstruments(Soundbank soundbank);
public void unloadAllInstruments(Soundbank soundbank) throws IllegalArgumentException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Synthesizer.java/clean/core/src/classpath/javax/javax/sound/midi/Synthesizer.java
public void unloadInstrument(Instrument instrument) throws IllegalArgumentException;
public void unloadInstrument(Instrument instrument);
public void unloadInstrument(Instrument instrument) throws IllegalArgumentException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Synthesizer.java/clean/core/src/classpath/javax/javax/sound/midi/Synthesizer.java
public void unloadInstruments(Soundbank soundbank, Patch[] patchList) throws IllegalArgumentException;
public void unloadInstruments(Soundbank soundbank, Patch[] patchList);
public void unloadInstruments(Soundbank soundbank, Patch[] patchList) throws IllegalArgumentException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Synthesizer.java/clean/core/src/classpath/javax/javax/sound/midi/Synthesizer.java
data=getBlock(superblock.getFirstDataBlock()+1);
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); byte data[]; blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); groupDescriptorLock = new Object(); superblockLock = new Object(); try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); superblock = new Superblock(data, this); //read the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupDescriptors = new GroupDescriptor[groupCount]; //OLD VERSION for(int i=0; i<groupCount; i++) { data=getBlock(superblock.getFirstDataBlock()+1); groupDescriptors[i] = new GroupDescriptor(data, this, i); } //OLD VERSION /* for(int i=0; i<groupCount; i++) { groupDescriptors[i]=new GroupDescriptor(i, this); } */ } catch (FileSystemException e) { throw e; } catch (Exception e) { throw new FileSystemException(e); } log.info( "Ext2fs filesystem constructed sucessfully"); log.debug( " superblock: #blocks: "+superblock.getBlocksCount()+"\n"+ " #blocks/group: "+superblock.getBlocksPerGroup()+"\n"+ " #block groups: "+groupCount+"\n"+ " block size: "+superblock.getBlockSize()+"\n"+ " #inodes: "+superblock.getINodesCount()+"\n"+ " #inodes/group: "+superblock.getINodesPerGroup()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f03619e78366bc28dfe50fc7787472318ca41010/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
/*
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); byte data[]; blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); groupDescriptorLock = new Object(); superblockLock = new Object(); try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); superblock = new Superblock(data, this); //read the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupDescriptors = new GroupDescriptor[groupCount]; //OLD VERSION for(int i=0; i<groupCount; i++) { data=getBlock(superblock.getFirstDataBlock()+1); groupDescriptors[i] = new GroupDescriptor(data, this, i); } //OLD VERSION /* for(int i=0; i<groupCount; i++) { groupDescriptors[i]=new GroupDescriptor(i, this); } */ } catch (FileSystemException e) { throw e; } catch (Exception e) { throw new FileSystemException(e); } log.info( "Ext2fs filesystem constructed sucessfully"); log.debug( " superblock: #blocks: "+superblock.getBlocksCount()+"\n"+ " #blocks/group: "+superblock.getBlocksPerGroup()+"\n"+ " #block groups: "+groupCount+"\n"+ " block size: "+superblock.getBlockSize()+"\n"+ " #inodes: "+superblock.getINodesCount()+"\n"+ " #inodes/group: "+superblock.getINodesPerGroup()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f03619e78366bc28dfe50fc7787472318ca41010/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
*/
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); byte data[]; blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); groupDescriptorLock = new Object(); superblockLock = new Object(); try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); superblock = new Superblock(data, this); //read the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupDescriptors = new GroupDescriptor[groupCount]; //OLD VERSION for(int i=0; i<groupCount; i++) { data=getBlock(superblock.getFirstDataBlock()+1); groupDescriptors[i] = new GroupDescriptor(data, this, i); } //OLD VERSION /* for(int i=0; i<groupCount; i++) { groupDescriptors[i]=new GroupDescriptor(i, this); } */ } catch (FileSystemException e) { throw e; } catch (Exception e) { throw new FileSystemException(e); } log.info( "Ext2fs filesystem constructed sucessfully"); log.debug( " superblock: #blocks: "+superblock.getBlocksCount()+"\n"+ " #blocks/group: "+superblock.getBlocksPerGroup()+"\n"+ " #block groups: "+groupCount+"\n"+ " block size: "+superblock.getBlockSize()+"\n"+ " #inodes: "+superblock.getINodesCount()+"\n"+ " #inodes/group: "+superblock.getINodesPerGroup()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f03619e78366bc28dfe50fc7787472318ca41010/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
timedRead(nr, data);
getApi().read( nr*blockSize, data, 0, blockSize );
public byte[] getBlock(long nr) throws IOException{ //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) { //check if the block has already been retrieved if(blockCache.containsKey(key)) result=(Block)blockCache.get(key); else{ byte[] data = new byte[blockSize]; //api.read( nr*blockSize, data, 0, blockSize ); timedRead(nr, data); result=new Block(this, nr, data); blockCache.put(key, result); } } return result.getData(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f03619e78366bc28dfe50fc7787472318ca41010/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
public long getBlockSize() {
public int getBlockSize() {
public long getBlockSize() { return superblock.getBlockSize(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f03619e78366bc28dfe50fc7787472318ca41010/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java