rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
if (sdn.isSelected()) sb.append(" -dn=hostname");
private static String toArgString() { StringBuffer sb = new StringBuffer(); sb.append(systemId.getText()); // port if (port.getText() != null) if (port.getText().trim().length() > 0) sb.append(" -p " + port.getText().trim()); if (fpn.getText() != null) if (fpn.getText().length() > 0) sb.append(" -f " + fpn.getText()); if (!LangTool.getString("conf.labelDefault").equals( (String)cpb.getSelectedItem())) sb.append(" -cp " + (String)cpb.getSelectedItem()); if (!SSL_TYPE_NONE.equals((String)sslType.getSelectedItem())) sb.append(" -sslType " + (String)sslType.getSelectedItem()); if (ec.isSelected()) sb.append(" -e" ); if (tc.isSelected()) sb.append(" -t" ); if (!sdNormal.isSelected()) sb.append(" -132" ); if (deviceName.getText() != null) if (deviceName.getText().trim().length() > 0) if (deviceName.getText().trim().length() > 10) sb.append(" -dn " + deviceName.getText().trim().substring(0,10).toUpperCase()); else sb.append(" -dn " + deviceName.getText().trim().toUpperCase()); if (useProxy.isSelected()) sb.append(" -usp" ); if (proxyHost.getText() != null) if (proxyHost.getText().length() > 0) sb.append(" -sph " + proxyHost.getText()); if (proxyPort.getText() != null) if (proxyPort.getText().length() > 0) sb.append(" -spp " + proxyPort.getText()); if (noEmbed.isSelected()) sb.append(" -noembed "); if (deamon.isSelected()) sb.append(" -d "); if (newJVM.isSelected()) sb.append(" -nc "); return sb.toString(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/1628a5b2ea01b3bfb66854e9d7b426faf9acd581/Configure.java/clean/tn5250j/src/org/tn5250j/Configure.java
bad.minor = Minor.Any;
public static AdapterAlreadyExists extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (AdapterAlreadyExists) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("AdapterAlreadyExists expected"); bad.initCause(cex); throw bad; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/AdapterAlreadyExistsHelper.java/buggy/core/src/classpath/org/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java
return null;
if (accessibleContext == null) accessibleContext = new AccessibleJPanel(); return accessibleContext;
public AccessibleContext getAccessibleContext() { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/JPanel.java/clean/core/src/classpath/javax/javax/swing/JPanel.java
public PanelUI getUI() { return (PanelUI)ui;
public PanelUI getUI() { return (PanelUI) ui;
public PanelUI getUI() { return (PanelUI)ui; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/JPanel.java/clean/core/src/classpath/javax/javax/swing/JPanel.java
{ return "PanelUI"; }
{ return "PanelUI"; }
public String getUIClassID() { return "PanelUI"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/JPanel.java/clean/core/src/classpath/javax/javax/swing/JPanel.java
throw new Error("Not implemented");
return RemoteServer.getClientHost();
public String getClientHost() throws ServerNotActiveException { throw new Error("Not implemented");}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastServerRef.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastServerRef.java
public UnicastRef(ObjID objid) { this.objid = objid;
public UnicastRef() {
public UnicastRef(ObjID objid) { this.objid = objid;}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastRef.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastRef.java
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) { if (ssf == null) { ssf = defaultSocketFactory;
public static synchronized UnicastConnectionManager getInstance(String host, int port, RMIClientSocketFactory csf) { if (csf == null) { csf = defaultSocketFactory;
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key); if (man == null) { man = new UnicastConnectionManager(port, ssf); if (debug) { nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n"); } // The provided port might not be the set port. key.port = man.serverPort; servers.put(key, man); } return (man);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastConnectionManager.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastConnectionManager.java
TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key);
try{ host = InetAddress.getByName(host).getHostAddress(); }catch(Exception _){} TripleKey key = new TripleKey(host, port, csf); UnicastConnectionManager man = (UnicastConnectionManager)clients.get(key);
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key); if (man == null) { man = new UnicastConnectionManager(port, ssf); if (debug) { nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n"); } // The provided port might not be the set port. key.port = man.serverPort; servers.put(key, man); } return (man);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastConnectionManager.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastConnectionManager.java
man = new UnicastConnectionManager(port, ssf);
man = new UnicastConnectionManager(host, port, csf);
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key); if (man == null) { man = new UnicastConnectionManager(port, ssf); if (debug) { nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n"); } // The provided port might not be the set port. key.port = man.serverPort; servers.put(key, man); } return (man);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastConnectionManager.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastConnectionManager.java
nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n");
ncmanager++; System.out.println("\n\n ====== " + ncmanager + " client managers.\n\n");
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key); if (man == null) { man = new UnicastConnectionManager(port, ssf); if (debug) { nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n"); } // The provided port might not be the set port. key.port = man.serverPort; servers.put(key, man); } return (man);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastConnectionManager.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastConnectionManager.java
key.port = man.serverPort; servers.put(key, man);
clients.put(key, man); UnicastConnectionManager svrman = (UnicastConnectionManager)servers.get(key); if(svrman != null){ man.serverobj = svrman.serverobj; }
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key); if (man == null) { man = new UnicastConnectionManager(port, ssf); if (debug) { nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n"); } // The provided port might not be the set port. key.port = man.serverPort; servers.put(key, man); } return (man);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastConnectionManager.java/buggy/core/src/classpath/gnu/gnu/java/rmi/server/UnicastConnectionManager.java
public GeneralSecurityException(String msg)
public GeneralSecurityException()
public GeneralSecurityException(String msg) { super(msg); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/GeneralSecurityException.java/buggy/core/src/classpath/java/java/security/GeneralSecurityException.java
super(msg);
public GeneralSecurityException(String msg) { super(msg); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/GeneralSecurityException.java/buggy/core/src/classpath/java/java/security/GeneralSecurityException.java
void makeConnection(int protocol) throws IOException { //Use BufferedXXXStream would be more efficient din = new DataInputStream(new BufferedInputStream(sock.getInputStream())); dout = new DataOutputStream(new BufferedOutputStream(sock.getOutputStream())); // Send header dout.writeInt(PROTOCOL_HEADER); dout.writeShort(PROTOCOL_VERSION); dout.writeByte(protocol); dout.flush(); if (protocol != SINGLE_OP_PROTOCOL) { // Get back ack. int ack = din.readUnsignedByte(); if (ack != PROTOCOL_ACK) { throw new RemoteException("Unsupported protocol"); } // Read in host and port String dicard_rhost = din.readUTF(); int discard_rport = din.readInt(); // Send them my endpoint dout.writeUTF(manager.serverName); dout.writeInt(manager.serverPort); dout.flush(); } // Okay, ready to roll ...}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/UnicastConnection.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastConnection.java
int sum = 0;
int i = 0; int pos = 0; boolean lengthWritten = false;
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum += 2; else sum += 3; } if (sum > 65535) throw new UTFDataFormatException (); int pos = 0; byte[] buf = new byte[sum]; for (int i = 0; i < len; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') buf[pos++] = (byte) c; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) { buf[pos++] = (byte) (0xc0 | (0x1f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } else { // JSL says the first byte should be or'd with 0xc0, but // that is a typo. Unicode says 0xe0, and that is what is // consistent with DataInputStream. buf[pos++] = (byte) (0xe0 | (0x0f & (c >> 12))); buf[pos++] = (byte) (0x80 | (0x3f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } } writeShort (sum); write(buf, 0, sum); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b10fa909426425230c585bcb0b5cdbe927382d3b/DataOutputStream.java/buggy/core/src/classpath/5.0/java/io/DataOutputStream.java
for (int i = 0; i < len && sum <= 65535; ++i)
if (buf == null) buf = new byte[512]; do
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum += 2; else sum += 3; } if (sum > 65535) throw new UTFDataFormatException (); int pos = 0; byte[] buf = new byte[sum]; for (int i = 0; i < len; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') buf[pos++] = (byte) c; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) { buf[pos++] = (byte) (0xc0 | (0x1f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } else { // JSL says the first byte should be or'd with 0xc0, but // that is a typo. Unicode says 0xe0, and that is what is // consistent with DataInputStream. buf[pos++] = (byte) (0xe0 | (0x0f & (c >> 12))); buf[pos++] = (byte) (0x80 | (0x3f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } } writeShort (sum); write(buf, 0, sum); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b10fa909426425230c585bcb0b5cdbe927382d3b/DataOutputStream.java/buggy/core/src/classpath/5.0/java/io/DataOutputStream.java
char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum += 2; else sum += 3; } if (sum > 65535) throw new UTFDataFormatException (); int pos = 0; byte[] buf = new byte[sum]; for (int i = 0; i < len; ++i) { char c = value.charAt(i);
while (i < len && pos < buf.length - 3) { char c = value.charAt(i++);
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum += 2; else sum += 3; } if (sum > 65535) throw new UTFDataFormatException (); int pos = 0; byte[] buf = new byte[sum]; for (int i = 0; i < len; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') buf[pos++] = (byte) c; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) { buf[pos++] = (byte) (0xc0 | (0x1f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } else { // JSL says the first byte should be or'd with 0xc0, but // that is a typo. Unicode says 0xe0, and that is what is // consistent with DataInputStream. buf[pos++] = (byte) (0xe0 | (0x0f & (c >> 12))); buf[pos++] = (byte) (0x80 | (0x3f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } } writeShort (sum); write(buf, 0, sum); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b10fa909426425230c585bcb0b5cdbe927382d3b/DataOutputStream.java/buggy/core/src/classpath/5.0/java/io/DataOutputStream.java
writeShort (sum); write(buf, 0, sum);
if (! lengthWritten) { if (i == len) writeShort(pos); else writeShort(getUTFlength(value, i, pos)); lengthWritten = true; } write(buf, 0, pos); pos = 0; } while (i < len);
public final synchronized void writeUTF(String value) throws IOException { int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) sum += 2; else sum += 3; } if (sum > 65535) throw new UTFDataFormatException (); int pos = 0; byte[] buf = new byte[sum]; for (int i = 0; i < len; ++i) { char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') buf[pos++] = (byte) c; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) { buf[pos++] = (byte) (0xc0 | (0x1f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } else { // JSL says the first byte should be or'd with 0xc0, but // that is a typo. Unicode says 0xe0, and that is what is // consistent with DataInputStream. buf[pos++] = (byte) (0xe0 | (0x0f & (c >> 12))); buf[pos++] = (byte) (0x80 | (0x3f & (c >> 6))); buf[pos++] = (byte) (0x80 | (0x3f & c)); } } writeShort (sum); write(buf, 0, sum); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b10fa909426425230c585bcb0b5cdbe927382d3b/DataOutputStream.java/buggy/core/src/classpath/5.0/java/io/DataOutputStream.java
/* Menu item is considered to be highlighted when it is selected. It is considered to be selected if menu item is inside some menu and is armed or if it is both armed and pressed */ if (m.getModel().isArmed() && (m.getParent() instanceof MenuElement || m.getModel().isPressed()))
if ((m.isSelected() && checkIcon == null) || m.getModel().isArmed() && (m.getParent() instanceof MenuElement))
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new Rectangle(); // icon rectangle Rectangle vr = new Rectangle(); // view rectangle Rectangle br = new Rectangle(); // border rectangle Rectangle ar = new Rectangle(); // accelerator rectangle Rectangle cr = new Rectangle(); // checkIcon rectangle int vertAlign = m.getVerticalAlignment(); int horAlign = m.getHorizontalAlignment(); int vertTextPos = m.getVerticalTextPosition(); int horTextPos = m.getHorizontalTextPosition(); Font f = m.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); SwingUtilities.calculateInnerArea(m, br); SwingUtilities.calculateInsetArea(br, m.getInsets(), vr); paintBackground(g, m, m.getBackground()); /* MenuItems insets are equal to menuItems margin, space between text and menuItems border. We need to paint insets region as well. */ Insets insets = m.getInsets(); br.x -= insets.left; br.y -= insets.top; br.width += insets.right + insets.left; br.height += insets.top + insets.bottom; /* Menu item is considered to be highlighted when it is selected. It is considered to be selected if menu item is inside some menu and is armed or if it is both armed and pressed */ if (m.getModel().isArmed() && (m.getParent() instanceof MenuElement || m.getModel().isPressed())) { if (m.isContentAreaFilled()) { g.setColor(selectionBackground); g.fillRect(br.x, br.y, br.width, br.height); } } else { if (m.isContentAreaFilled()) { g.setColor(m.getBackground()); g.fillRect(br.x, br.y, br.width, br.height); } } // If this menu item is a JCheckBoxMenuItem then paint check icon if (checkIcon != null) { SwingUtilities.layoutCompoundLabel(m, fm, null, checkIcon, vertAlign, horAlign, vertTextPos, horTextPos, vr, cr, tr, defaultTextIconGap); checkIcon.paintIcon(m, g, cr.x, cr.y); // We need to calculate position of the menu text and position of // user menu icon if there exists one relative to the check icon. // So we need to adjust view rectangle s.t. its starting point is at // checkIcon.width + defaultTextIconGap. vr.x = cr.x + cr.width + defaultTextIconGap; } // if this is a submenu, then paint arrow icon to indicate it. if (arrowIcon != null && (c instanceof JMenu)) { if (! ((JMenu) c).isTopLevelMenu()) { int width = arrowIcon.getIconWidth(); int height = arrowIcon.getIconHeight(); arrowIcon.paintIcon(m, g, vr.width - width + defaultTextIconGap, vr.y + 2); } } // paint text and user menu icon if it exists Icon i = m.getIcon(); SwingUtilities.layoutCompoundLabel(c, fm, m.getText(), i, vertAlign, horAlign, vertTextPos, horTextPos, vr, ir, tr, defaultTextIconGap); if (i != null) i.paintIcon(c, g, ir.x, ir.y); paintText(g, m, tr, m.getText()); // paint accelerator String acceleratorText = ""; if (m.getAccelerator() != null) { acceleratorText = getAcceleratorText(m.getAccelerator()); fm = g.getFontMetrics(acceleratorFont); ar.width = fm.stringWidth(acceleratorText); ar.x = br.width - ar.width; vr.x = br.width - ar.width; SwingUtilities.layoutCompoundLabel(m, fm, acceleratorText, null, vertAlign, horAlign, vertTextPos, horTextPos, vr, ir, ar, defaultTextIconGap); paintAccelerator(g, m, ar, acceleratorText); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicMenuItemUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java
/* Menu item is considered to be highlighted when it is selected. It is considered to be selected if menu item is inside some menu and is armed or if it is both armed and pressed */ if (menuItem.getModel().isArmed() && (menuItem.getParent() instanceof MenuElement || menuItem.getModel().isPressed()))
if ((menuItem.isSelected() && checkIcon == null) || menuItem.getModel().isArmed() && (menuItem.getParent() instanceof MenuElement))
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && ! text.equals("")) { if (menuItem.isEnabled()) { /* Menu item is considered to be highlighted when it is selected. It is considered to be selected if menu item is inside some menu and is armed or if it is both armed and pressed */ if (menuItem.getModel().isArmed() && (menuItem.getParent() instanceof MenuElement || menuItem.getModel().isPressed())) g.setColor(selectionForeground); else g.setColor(menuItem.getForeground()); } else // FIXME: should fix this to use 'disabledForeground', but its // default value in BasicLookAndFeel is null. g.setColor(Color.gray); int mnemonicIndex = menuItem.getDisplayedMnemonicIndex(); if (mnemonicIndex != -1) BasicGraphicsUtils.drawStringUnderlineCharAt(g, text, mnemonicIndex, textRect.x, textRect.y + fm.getAscent()); else BasicGraphicsUtils.drawString(g, text, 0, textRect.x, textRect.y + fm.getAscent()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicMenuItemUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && ! text.equals("")) { if (menuItem.isEnabled()) { /* Menu item is considered to be highlighted when it is selected. It is considered to be selected if menu item is inside some menu and is armed or if it is both armed and pressed */ if (menuItem.getModel().isArmed() && (menuItem.getParent() instanceof MenuElement || menuItem.getModel().isPressed())) g.setColor(selectionForeground); else g.setColor(menuItem.getForeground()); } else // FIXME: should fix this to use 'disabledForeground', but its // default value in BasicLookAndFeel is null. g.setColor(Color.gray); int mnemonicIndex = menuItem.getDisplayedMnemonicIndex(); if (mnemonicIndex != -1) BasicGraphicsUtils.drawStringUnderlineCharAt(g, text, mnemonicIndex, textRect.x, textRect.y + fm.getAscent()); else BasicGraphicsUtils.drawString(g, text, 0, textRect.x, textRect.y + fm.getAscent()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicMenuItemUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java
KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length]; for (int i = 0; i < superKeys.length; ++i)
int skl = 0; int mkl = 0; if (superKeys != null) skl = superKeys.length; if (mapKeys != null) mkl = mapKeys.length; KeyStroke[] bothKeys = new KeyStroke[skl + mkl]; for (int i = 0; i < skl; ++i)
public KeyStroke[] allKeys() { KeyStroke[] superKeys = super.allKeys(); KeyStroke[] mapKeys = map.getBoundKeyStrokes(); KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length]; for (int i = 0; i < superKeys.length; ++i) bothKeys[i] = superKeys[i]; for (int i = 0; i < mapKeys.length; ++i) bothKeys[i + superKeys.length] = mapKeys[i]; return bothKeys; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
for (int i = 0; i < mapKeys.length; ++i) bothKeys[i + superKeys.length] = mapKeys[i];
for (int i = 0; i < mkl; ++i) bothKeys[i + skl] = mapKeys[i];
public KeyStroke[] allKeys() { KeyStroke[] superKeys = super.allKeys(); KeyStroke[] mapKeys = map.getBoundKeyStrokes(); KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length]; for (int i = 0; i < superKeys.length; ++i) bothKeys[i] = superKeys[i]; for (int i = 0; i < mapKeys.length; ++i) bothKeys[i + superKeys.length] = mapKeys[i]; return bothKeys; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
boolean creatingKeymap = false;
public JTextComponent() { Keymap defkeymap = getKeymap(DEFAULT_KEYMAP); boolean creatingKeymap = false; if (defkeymap == null) { defkeymap = addKeymap(DEFAULT_KEYMAP, null); defkeymap.setDefaultAction(new DefaultEditorKit.DefaultKeyTypedAction()); creatingKeymap = true; } setFocusable(true); setEditable(true); enableEvents(AWTEvent.KEY_EVENT_MASK); updateUI(); // need to do this after updateUI() if (creatingKeymap) loadKeymap( defkeymap, new KeyBinding[] { new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), DefaultEditorKit.backwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), DefaultEditorKit.forwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \b"), DefaultEditorKit.deletePrevCharAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.cutAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.copyAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.pasteAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionBackwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionForwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \u007f"), DefaultEditorKit.deleteNextCharAction) }, getActions()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
creatingKeymap = true;
public JTextComponent() { Keymap defkeymap = getKeymap(DEFAULT_KEYMAP); boolean creatingKeymap = false; if (defkeymap == null) { defkeymap = addKeymap(DEFAULT_KEYMAP, null); defkeymap.setDefaultAction(new DefaultEditorKit.DefaultKeyTypedAction()); creatingKeymap = true; } setFocusable(true); setEditable(true); enableEvents(AWTEvent.KEY_EVENT_MASK); updateUI(); // need to do this after updateUI() if (creatingKeymap) loadKeymap( defkeymap, new KeyBinding[] { new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), DefaultEditorKit.backwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), DefaultEditorKit.forwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \b"), DefaultEditorKit.deletePrevCharAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.cutAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.copyAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.pasteAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionBackwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionForwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \u007f"), DefaultEditorKit.deleteNextCharAction) }, getActions()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
if (creatingKeymap) loadKeymap( defkeymap, new KeyBinding[] { new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), DefaultEditorKit.backwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), DefaultEditorKit.forwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \b"), DefaultEditorKit.deletePrevCharAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.cutAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.copyAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.pasteAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionBackwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionForwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \u007f"), DefaultEditorKit.deleteNextCharAction) }, getActions());
public JTextComponent() { Keymap defkeymap = getKeymap(DEFAULT_KEYMAP); boolean creatingKeymap = false; if (defkeymap == null) { defkeymap = addKeymap(DEFAULT_KEYMAP, null); defkeymap.setDefaultAction(new DefaultEditorKit.DefaultKeyTypedAction()); creatingKeymap = true; } setFocusable(true); setEditable(true); enableEvents(AWTEvent.KEY_EVENT_MASK); updateUI(); // need to do this after updateUI() if (creatingKeymap) loadKeymap( defkeymap, new KeyBinding[] { new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), DefaultEditorKit.backwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), DefaultEditorKit.forwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \b"), DefaultEditorKit.deletePrevCharAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.cutAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.copyAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK), DefaultEditorKit.pasteAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionBackwardAction), new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK), DefaultEditorKit.selectionForwardAction), new KeyBinding(KeyStroke.getKeyStroke("typed \u007f"), DefaultEditorKit.deleteNextCharAction) }, getActions()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
private KeyStroke() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/KeyStroke.java/clean/core/src/classpath/javax/javax/swing/KeyStroke.java
return "DERValue [ tag=" + tag + ", class=" + tagClass + ", constructed=" + constructed + ", value=" + value + " ]";
String start = "DERValue ( ["; if (tagClass == DER.UNIVERSAL) start = start + "UNIVERSAL "; else if (tagClass == DER.PRIVATE) start = start + "PRIVATE "; else if (tagClass == DER.APPLICATION) start = start + "APPLICATION "; start = start + tag + "] constructed=" + constructed + ", value="; if (constructed) start = start + "\n" + Util.hexDump(getEncoded(), "\t"); else start = start + value; return start + " )";
public String toString() { return "DERValue [ tag=" + tag + ", class=" + tagClass + ", constructed=" + constructed + ", value=" + value + " ]"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DERValue.java/buggy/core/src/classpath/gnu/gnu/java/security/der/DERValue.java
checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field");
DerUtil.checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(derVersion, "Wrong Version field");
DerUtil.checkIsBigInteger(derVersion, "Wrong Version field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field");
DerUtil.checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field");
DerUtil.checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong RSAPrivateKey Version field");
DerUtil.checkIsBigInteger(val, "Wrong RSAPrivateKey Version field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong modulus field");
DerUtil.checkIsBigInteger(val, "Wrong modulus field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong publicExponent field");
DerUtil.checkIsBigInteger(val, "Wrong publicExponent field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong privateExponent field");
DerUtil.checkIsBigInteger(val, "Wrong privateExponent field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong prime1 field");
DerUtil.checkIsBigInteger(val, "Wrong prime1 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong prime2 field");
DerUtil.checkIsBigInteger(val, "Wrong prime2 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong exponent1 field");
DerUtil.checkIsBigInteger(val, "Wrong exponent1 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong exponent2 field");
DerUtil.checkIsBigInteger(val, "Wrong exponent2 field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
checkIsBigInteger(val, "Wrong coefficient field");
DerUtil.checkIsBigInteger(val, "Wrong coefficient field");
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, n, e, d, p, q, dP, dQ, qInv; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); checkIsBigInteger(derVersion, "Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); byte[] pkBytes = (byte[]) val.getValue(); der = new DERReader(pkBytes); DERValue derRSAPrivateKey = der.read(); checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field"); val = der.read(); checkIsBigInteger(val, "Wrong RSAPrivateKey Version field"); version = (BigInteger) val.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected RSAPrivateKey Version: " + version); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong privateExponent field"); d = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime1 field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong prime2 field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent1 field"); dP = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong exponent2 field"); dQ = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong coefficient field"); qInv = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e, d, p, q, dP, dQ, qInv); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/RSAKeyPairPKCS8Codec.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
DisabledFocusManager() {
DisabledFocusManager() {
DisabledFocusManager() { // TODO } // DisabledFocusManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
DisabledFocusManager() { // TODO } // DisabledFocusManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public void focusNextComponent(Component component) {
public void focusNextComponent(Component component) {
public void focusNextComponent(Component component) { // TODO } // focusNextComponent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public void focusNextComponent(Component component) { // TODO } // focusNextComponent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public void focusPreviousComponent(Component value0) {
public void focusPreviousComponent(Component value0) {
public void focusPreviousComponent(Component value0) { // TODO } // focusPreviousComponent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public void focusPreviousComponent(Component value0) { // TODO } // focusPreviousComponent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public void processKeyEvent(Component component, KeyEvent event) {
public void processKeyEvent(Component component, KeyEvent event) {
public void processKeyEvent(Component component, KeyEvent event) { // TODO } // processKeyEvent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public void processKeyEvent(Component component, KeyEvent event) { // TODO } // processKeyEvent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public FocusManager() {
public FocusManager() {
public FocusManager() { // TODO } // FocusManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public FocusManager() { // TODO } // FocusManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public static void disableSwingFocusManager() {
public static void disableSwingFocusManager() {
public static void disableSwingFocusManager() { // TODO } // disableSwingFocusManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public static void disableSwingFocusManager() { // TODO } // disableSwingFocusManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public static FocusManager getCurrentManager() {
public static FocusManager getCurrentManager() {
public static FocusManager getCurrentManager() { return null; // TODO } // getCurrentManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public static FocusManager getCurrentManager() { return null; // TODO } // getCurrentManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public static boolean isFocusManagerEnabled() {
public static boolean isFocusManagerEnabled() {
public static boolean isFocusManagerEnabled() { return false; // TODO } // isFocusManagerEnabled()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public static boolean isFocusManagerEnabled() { return false; // TODO } // isFocusManagerEnabled()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
public static void setCurrentManager(FocusManager manager) {
public static void setCurrentManager(FocusManager manager) {
public static void setCurrentManager(FocusManager manager) { // TODO } // setCurrentManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
}
}
public static void setCurrentManager(FocusManager manager) { // TODO } // setCurrentManager()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FocusManager.java/clean/core/src/classpath/javax/javax/swing/FocusManager.java
final VmNormalClass< ? > normalClass = (VmNormalClass) objectClass;
final VmNormalClass< ? > normalClass = (VmNormalClass<?>) objectClass;
public final Object clone(Cloneable object) { testInited(); final VmClassType< ? > objectClass = VmMagic.getObjectType(object); final Address objectPtr = ObjectReference.fromObject(object) .toAddress(); final int size; if (objectClass.isArray()) { final int slotSize = Unsafe.getCurrentProcessor().getArchitecture() .getReferenceSize(); final VmArrayClass< ? > arrayClass = (VmArrayClass< ? >) objectClass; final int length = objectPtr.loadInt(Offset .fromIntSignExtend(VmArray.LENGTH_OFFSET * slotSize)); final int elemSize = arrayClass.getComponentType().getTypeSize(); size = (VmArray.DATA_OFFSET * slotSize) * (length * elemSize); } else { final VmNormalClass< ? > normalClass = (VmNormalClass) objectClass; size = normalClass.getObjectSize(); } final Object newObj = allocObject(objectClass, size); helper.copy(objectPtr, ObjectReference.fromObject(newObj).toAddress(), Extent.fromIntZeroExtend(size)); return newObj; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/93e73e97455aa3906c618e19bc5fa1e895db005d/VmHeapManager.java/clean/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java
cls.initialize();
public final Object newInstance(VmType< ? > cls) { // cls.link(); cls.initialize(); return newInstance(cls, ((VmNormalClass< ? >) cls).getObjectSize()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/93e73e97455aa3906c618e19bc5fa1e895db005d/VmHeapManager.java/clean/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java
public NegativeArraySizeException(String s) { super(s);
public NegativeArraySizeException() {
public NegativeArraySizeException(String s) { super(s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/NegativeArraySizeException.java/buggy/core/src/classpath/java/java/lang/NegativeArraySizeException.java
public OutOfMemoryError() { super();
public OutOfMemoryError() {
public OutOfMemoryError() { super(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/OutOfMemoryError.java/buggy/core/src/classpath/java/java/lang/OutOfMemoryError.java
public HostArgument(String name, String description) { super(name, description);
public HostArgument(String name, String description, boolean multi) { super(name, description, multi);
public HostArgument(String name, String description) { super(name, description); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/HostArgument.java/buggy/net/src/net/org/jnode/net/command/HostArgument.java
public AbstractSpinnerModel() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/AbstractSpinnerModel.java/buggy/core/src/classpath/javax/javax/swing/AbstractSpinnerModel.java
editor.setBorder(new EmptyBorder(1, 1, 1, 1));
editor.setBorder(null); editor.setColumns(9);
public BasicComboBoxEditor() { editor = new JTextField(); editor.setBorder(new EmptyBorder(1, 1, 1, 1)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4f54b4c49f6326d2bfe26573a0af55c73b713f0a/BasicComboBoxEditor.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxEditor.java
Window w = base.getAWTComponent(); if(w instanceof Frame){ MenuBar mb = ((Frame)w).getMenuBar(); if(mb != null){ JMenuBar jmb = ((SwingMenuBarPeer)mb.getPeer()).jComponent; Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, jmb); comp = SwingUtilities.getDeepestComponentAt(jmb, p.x, p.y); if(comp != null && (comp != jmb || comp == jmb && jmb.contains(p.x,p.y))){ return comp;
if(base.isShowing()){ Window w = base.getAWTComponent(); if(w instanceof Frame){ MenuBar mb = ((Frame)w).getMenuBar(); if(mb != null){ JMenuBar jmb = ((SwingMenuBarPeer)mb.getPeer()).jComponent; Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, jmb); comp = SwingUtilities.getDeepestComponentAt(jmb, p.x, p.y); if(comp != null && (comp != jmb || comp == jmb && jmb.contains(p.x,p.y))){ return comp; }
public Component getTopComponentAt(int x, int y) { if(desktopFrame == null){ //no AWT yet, drop the event return null; } Component comp = desktopFrame.getDesktop().getComponentAt(x,y); if(comp instanceof SwingBaseWindow){ SwingBaseWindow base = (SwingBaseWindow) comp; Window w = base.getAWTComponent(); if(w instanceof Frame){ MenuBar mb = ((Frame)w).getMenuBar(); if(mb != null){ JMenuBar jmb = ((SwingMenuBarPeer)mb.getPeer()).jComponent; Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, jmb); comp = SwingUtilities.getDeepestComponentAt(jmb, p.x, p.y); if(comp != null && (comp != jmb || comp == jmb && jmb.contains(p.x,p.y))){ return comp; } } } Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, w); comp = SwingUtilities.getDeepestComponentAt(w, p.x, p.y); if(comp == w){ p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, base); comp = SwingUtilities.getDeepestComponentAt(base, p.x, p.y); } } else { comp = super.getTopComponentAt(x, y); SwingFrame sfp = (SwingFrame) SwingUtilities.getAncestorOfClass( SwingFrame.class, comp); if (sfp != null) { Rectangle r = sfp.getBounds(); Insets ins = sfp.getSwingPeer().getInsets(); r.x = r.x + ins.left; r.y = r.y + ins.top; r.width = r.width - ins.left - ins.right; r.height = r.height - ins.top - ins.bottom; if (r.contains(x, y)) { Component c = sfp.getAWTComponent().findComponentAt(x, y); if (c != null) { comp = c; } } } } return comp; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8130575aafedecec87d3d19a605185419b446362/SwingToolkit.java/clean/gui/src/awt/org/jnode/awt/swingpeers/SwingToolkit.java
} Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, w); comp = SwingUtilities.getDeepestComponentAt(w, p.x, p.y); if(comp == w){ p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, base); comp = SwingUtilities.getDeepestComponentAt(base, p.x, p.y);
Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, w); comp = SwingUtilities.getDeepestComponentAt(w, p.x, p.y); if(comp == w){ p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, base); comp = SwingUtilities.getDeepestComponentAt(base, p.x, p.y); }
public Component getTopComponentAt(int x, int y) { if(desktopFrame == null){ //no AWT yet, drop the event return null; } Component comp = desktopFrame.getDesktop().getComponentAt(x,y); if(comp instanceof SwingBaseWindow){ SwingBaseWindow base = (SwingBaseWindow) comp; Window w = base.getAWTComponent(); if(w instanceof Frame){ MenuBar mb = ((Frame)w).getMenuBar(); if(mb != null){ JMenuBar jmb = ((SwingMenuBarPeer)mb.getPeer()).jComponent; Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, jmb); comp = SwingUtilities.getDeepestComponentAt(jmb, p.x, p.y); if(comp != null && (comp != jmb || comp == jmb && jmb.contains(p.x,p.y))){ return comp; } } } Point p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, w); comp = SwingUtilities.getDeepestComponentAt(w, p.x, p.y); if(comp == w){ p = new Point(x,y); SwingUtilities.convertPointFromScreen(p, base); comp = SwingUtilities.getDeepestComponentAt(base, p.x, p.y); } } else { comp = super.getTopComponentAt(x, y); SwingFrame sfp = (SwingFrame) SwingUtilities.getAncestorOfClass( SwingFrame.class, comp); if (sfp != null) { Rectangle r = sfp.getBounds(); Insets ins = sfp.getSwingPeer().getInsets(); r.x = r.x + ins.left; r.y = r.y + ins.top; r.width = r.width - ins.left - ins.right; r.height = r.height - ins.top - ins.bottom; if (r.contains(x, y)) { Component c = sfp.getAWTComponent().findComponentAt(x, y); if (c != null) { comp = c; } } } } return comp; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8130575aafedecec87d3d19a605185419b446362/SwingToolkit.java/clean/gui/src/awt/org/jnode/awt/swingpeers/SwingToolkit.java
double tx = (x - getCenterX()) / rx; double ty = (y - getCenterY()) / ry; return tx * tx + ty * ty <= 1.0;
double tx = (x - (getX() + rx)) / rx; double ty = (y - (getY() + ry)) / ry; return tx * tx + ty * ty < 1.0;
public boolean contains(double x, double y) { double rx = getWidth() / 2; double ry = getHeight() / 2; double tx = (x - getCenterX()) / rx; double ty = (y - getCenterY()) / ry; return tx * tx + ty * ty <= 1.0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Ellipse2D.java/buggy/core/src/classpath/java/java/awt/geom/Ellipse2D.java
Rectangle2D r = new Rectangle2D.Double(x, y, w, h); if (! r.intersects(getX(), getY(), getWidth(), getHeight())) return false; if (contains(x, y) || contains(x, y + h) || contains(x + w, y) || contains(x + w, y + h)) return true; Line2D l1 = new Line2D.Double(getX(), getY() + (getHeight() / 2), getX() + getWidth(), getY() + (getHeight() / 2)); Line2D l2 = new Line2D.Double(getX() + (getWidth() / 2), getY(), getX() + (getWidth() / 2), getY() + getHeight()); if (l1.intersects(r) || l2.intersects(r)) return true;
public boolean intersects(double x, double y, double w, double h) { // fixme return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Ellipse2D.java/buggy/core/src/classpath/java/java/awt/geom/Ellipse2D.java
if ( ! repeats)
if (!repeats)
public void run() { if (logTimers) System.out.println("javax.swing.Timer -> queueEvent()"); queueEvent(); if ( ! repeats) task = null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/39b6fa6b2c83d98e97f872ed8ae18d9f4803884d/Timer.java/clean/core/src/classpath/javax/javax/swing/Timer.java
dragging = true;
public void mouseDragged(MouseEvent e) { if (slider.isEnabled()) { currentMouseX = e.getX(); currentMouseY = e.getY(); if (slider.getValueIsAdjusting()) { int value; if (slider.getOrientation() == JSlider.HORIZONTAL) value = valueForXPosition(currentMouseX) - offset; else value = valueForYPosition(currentMouseY) - offset; slider.setValue(value); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
dragging = false;
public void mouseReleased(MouseEvent e) { if (slider.isEnabled()) { currentMouseX = e.getX(); currentMouseY = e.getY(); if (slider.getValueIsAdjusting()) { slider.setValueIsAdjusting(false); if (slider.getSnapToTicks()) slider.setValue(findClosestTick(slider.getValue())); } if (scrollTimer != null) scrollTimer.stop(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
return (value > slider.getValue());
return value > slider.getValue();
public boolean shouldScroll(int direction) { int value; if (slider.getOrientation() == JSlider.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > slider.getValue()); else return (value < slider.getValue()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
return (value < slider.getValue());
return value < slider.getValue();
public boolean shouldScroll(int direction) { int value; if (slider.getOrientation() == JSlider.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > slider.getValue()); else return (value < slider.getValue()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
labelRect.y = tickRect.y + tickRect.height;
labelRect.y = tickRect.y + tickRect.height - 1;
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRect.width; labelRect.y = contentRect.y; labelRect.width = getWidthOfWidestLabel(); labelRect.height = contentRect.height; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
labelRect.x = tickRect.x + tickRect.width;
if (slider.getPaintLabels()) { labelRect.x = tickRect.x + tickRect.width - 1;
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRect.width; labelRect.y = contentRect.y; labelRect.width = getWidthOfWidestLabel(); labelRect.height = contentRect.height; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
labelRect.width = getWidthOfWidestLabel();
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRect.width; labelRect.y = contentRect.y; labelRect.width = getWidthOfWidestLabel(); labelRect.height = contentRect.height; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
else { labelRect.x = tickRect.x + tickRect.width; labelRect.y = trackRect.y; labelRect.height = trackRect.height; } labelRect.width = getWidthOfWidestLabel(); }
protected void calculateLabelRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { labelRect.x = contentRect.x; labelRect.y = tickRect.y + tickRect.height; labelRect.width = contentRect.width; labelRect.height = getHeightOfTallestLabel(); } else { labelRect.x = tickRect.x + tickRect.width; labelRect.y = contentRect.y; labelRect.width = getWidthOfWidestLabel(); labelRect.height = contentRect.height; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
thumbRect.y = trackRect.y;
thumbRect.y = trackRect.y + 1;
protected void calculateThumbLocation() { int value = slider.getValue(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.x = xPositionForValue(value) - thumbRect.width / 2; thumbRect.y = trackRect.y; } else { thumbRect.x = trackRect.x; thumbRect.y = yPositionForValue(value) - thumbRect.height / 2; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
thumbRect.x = trackRect.x;
thumbRect.x = trackRect.x + 1;
protected void calculateThumbLocation() { int value = slider.getValue(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.x = xPositionForValue(value) - thumbRect.width / 2; thumbRect.y = trackRect.y; } else { thumbRect.x = trackRect.x; thumbRect.y = yPositionForValue(value) - thumbRect.height / 2; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
if (slider.getOrientation() == JSlider.HORIZONTAL) thumbRect.y = trackRect.y; else thumbRect.x = trackRect.x;
protected void calculateThumbSize() { Dimension d = getThumbSize(); thumbRect.width = d.width; thumbRect.height = d.height; if (slider.getOrientation() == JSlider.HORIZONTAL) thumbRect.y = trackRect.y; else thumbRect.x = trackRect.x; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0);
tickRect.height = slider.getPaintTicks() ? getTickLength() : 0; if (!slider.getPaintTicks()) tickRect.y--;
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0); if (tickRect.y + tickRect.height > contentRect.y + contentRect.height) tickRect.height = contentRect.y + contentRect.height - tickRect.y; } else { tickRect.x = trackRect.x + trackRect.width; tickRect.y = trackRect.y; tickRect.width = (slider.getPaintTicks() ? getTickLength() : 0); tickRect.height = trackRect.height; if (tickRect.x + tickRect.width > contentRect.x + contentRect.width) tickRect.width = contentRect.x + contentRect.width - tickRect.x; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
tickRect.width = (slider.getPaintTicks() ? getTickLength() : 0);
tickRect.width = slider.getPaintTicks() ? getTickLength() : 0;
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0); if (tickRect.y + tickRect.height > contentRect.y + contentRect.height) tickRect.height = contentRect.y + contentRect.height - tickRect.y; } else { tickRect.x = trackRect.x + trackRect.width; tickRect.y = trackRect.y; tickRect.width = (slider.getPaintTicks() ? getTickLength() : 0); tickRect.height = trackRect.height; if (tickRect.x + tickRect.width > contentRect.x + contentRect.width) tickRect.width = contentRect.x + contentRect.width - tickRect.x; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
if (!slider.getPaintTicks()) tickRect.x--;
protected void calculateTickRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { tickRect.x = trackRect.x; tickRect.y = trackRect.y + trackRect.height; tickRect.width = trackRect.width; tickRect.height = (slider.getPaintTicks() ? getTickLength() : 0); if (tickRect.y + tickRect.height > contentRect.y + contentRect.height) tickRect.height = contentRect.y + contentRect.height - tickRect.y; } else { tickRect.x = trackRect.x + trackRect.width; tickRect.y = trackRect.y; tickRect.width = (slider.getPaintTicks() ? getTickLength() : 0); tickRect.height = trackRect.height; if (tickRect.x + tickRect.width > contentRect.x + contentRect.width) tickRect.width = contentRect.x + contentRect.width - tickRect.x; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
Point a = new Point(trackRect.x, trackRect.y);
Point a = new Point(trackRect.x, trackRect.y + 1);
public void paintTrack(Graphics g) { Color saved_color = g.getColor(); int width; int height; Point a = new Point(trackRect.x, trackRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); if (slider.getOrientation() == JSlider.HORIZONTAL) { width = trackRect.width; height = (thumbRect.height / 4 == 0) ? 1 : thumbRect.height / 4; a.translate(0, (trackRect.height / 2) - (height / 2)); b.translate(0, (trackRect.height / 2) + (height / 2)); c.translate(trackRect.width, (trackRect.height / 2) + (height / 2)); d.translate(trackRect.width, (trackRect.height / 2) - (height / 2)); } else { width = (thumbRect.width / 4 == 0) ? 1 : thumbRect.width / 4; height = trackRect.height; a.translate((trackRect.width / 2) - (width / 2), 0); b.translate((trackRect.width / 2) - (width / 2), trackRect.height); c.translate((trackRect.width / 2) + (width / 2), trackRect.height); d.translate((trackRect.width / 2) + (width / 2), 0); } g.setColor(Color.GRAY); g.fillRect(a.x, a.y, width, height); g.setColor(getHighlightColor()); g.drawLine(b.x, b.y, c.x, c.y); g.drawLine(c.x, c.y, d.x, d.y); g.setColor(getShadowColor()); g.drawLine(b.x, b.y, a.x, a.y); g.drawLine(a.x, a.y, d.x, d.y); g.setColor(saved_color); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
return ((max - min) / 2);
return (max - min) / 2;
public int valueForXPosition(int xPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // the middle. if (len == 0) return ((max - min) / 2); if (! drawInverted()) value = ((xPos - trackRect.x) * (max - min) / len + min); else value = ((len - (xPos - trackRect.x)) * (max - min) / len + min); // If this isn't a legal value, then we'll have to move to one now. if (value > max) value = max; else if (value < min) value = min; return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
value = ((xPos - trackRect.x) * (max - min) / len + min);
value = (xPos - trackRect.x) * (max - min) / len + min;
public int valueForXPosition(int xPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // the middle. if (len == 0) return ((max - min) / 2); if (! drawInverted()) value = ((xPos - trackRect.x) * (max - min) / len + min); else value = ((len - (xPos - trackRect.x)) * (max - min) / len + min); // If this isn't a legal value, then we'll have to move to one now. if (value > max) value = max; else if (value < min) value = min; return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
value = ((len - (xPos - trackRect.x)) * (max - min) / len + min);
value = (len - (xPos - trackRect.x)) * (max - min) / len + min;
public int valueForXPosition(int xPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // the middle. if (len == 0) return ((max - min) / 2); if (! drawInverted()) value = ((xPos - trackRect.x) * (max - min) / len + min); else value = ((len - (xPos - trackRect.x)) * (max - min) / len + min); // If this isn't a legal value, then we'll have to move to one now. if (value > max) value = max; else if (value < min) value = min; return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
return ((max - min) / 2);
return (max - min) / 2;
public int valueForYPosition(int yPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // the middle. if (len == 0) return ((max - min) / 2); if (! drawInverted()) value = ((len - (yPos - trackRect.y)) * (max - min) / len + min); else value = ((yPos - trackRect.y) * (max - min) / len + min); // If this isn't a legal value, then we'll have to move to one now. if (value > max) value = max; else if (value < min) value = min; return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
value = ((len - (yPos - trackRect.y)) * (max - min) / len + min);
value = (len - (yPos - trackRect.y)) * (max - min) / len + min;
public int valueForYPosition(int yPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // the middle. if (len == 0) return ((max - min) / 2); if (! drawInverted()) value = ((len - (yPos - trackRect.y)) * (max - min) / len + min); else value = ((yPos - trackRect.y) * (max - min) / len + min); // If this isn't a legal value, then we'll have to move to one now. if (value > max) value = max; else if (value < min) value = min; return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
value = ((yPos - trackRect.y) * (max - min) / len + min);
value = (yPos - trackRect.y) * (max - min) / len + min;
public int valueForYPosition(int yPos) { int min = slider.getMinimum(); int max = slider.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the slider // is. This really shouldn't ever happen, but just in case, we'll return // the middle. if (len == 0) return ((max - min) / 2); if (! drawInverted()) value = ((len - (yPos - trackRect.y)) * (max - min) / len + min); else value = ((yPos - trackRect.y) * (max - min) / len + min); // If this isn't a legal value, then we'll have to move to one now. if (value > max) value = max; else if (value < min) value = min; return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java
public SliderUI() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/SliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/SliderUI.java
public synchronized void write (byte[] buf, int offset, int len) throws IOException
public synchronized void write (int value) throws IOException
public synchronized void write (byte[] buf, int offset, int len) throws IOException { out.write(buf, offset, len); written += len; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b10fa909426425230c585bcb0b5cdbe927382d3b/DataOutputStream.java/buggy/core/src/classpath/5.0/java/io/DataOutputStream.java
out.write(buf, offset, len); written += len;
out.write (value); ++written;
public synchronized void write (byte[] buf, int offset, int len) throws IOException { out.write(buf, offset, len); written += len; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b10fa909426425230c585bcb0b5cdbe927382d3b/DataOutputStream.java/buggy/core/src/classpath/5.0/java/io/DataOutputStream.java
this.operand = getOperand(varIndex); refs = new Operand[] { operand };
refs = new Operand[] { getOperand(varIndex) };
public UnaryQuad(int address, IRBasicBlock block, int lhsIndex, int operation, int varIndex) { super(address, block, lhsIndex); this.operation = operation; this.operand = getOperand(varIndex); refs = new Operand[] { operand }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/UnaryQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryQuad.java
operand = operand.simplify(); if (operand instanceof Variable) { Variable v = (Variable) operand;
refs[0] = refs[0].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0];
public void doPass2(BootableHashMap liveVariables) { operand = operand.simplify(); if (operand instanceof Variable) { Variable v = (Variable) operand; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/UnaryQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryQuad.java
if(operand instanceof Constant){ Constant c = (Constant) operand;
if(refs[0] instanceof Constant){ Constant c = (Constant) refs[0];
private Quad foldConstants() { if(operand instanceof Constant){ Constant c = (Constant) operand; switch (operation) { case I2L: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.i2l()); case I2F: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.i2f()); case I2D: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.i2d()); case L2I: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.l2i()); case L2F: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.l2f()); case L2D: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.l2d()); case F2I: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.f2i()); case F2L: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.f2l()); case F2D: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.f2d()); case D2I: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.d2i()); case D2L: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.d2l()); case D2F: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.d2f()); case I2B: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.i2b()); case I2C: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.i2c()); case I2S: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.i2s()); case INEG: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.iNeg()); case LNEG: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.lNeg()); case FNEG: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.fNeg()); case DNEG: return new ConstantRefAssignQuad(this.getAddress(), this.getBasicBlock(), this.getLHS().getIndex(), c.dNeg()); default: throw new IllegalArgumentException("Don't know how to fold those yet..."); } } return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/UnaryQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryQuad.java
if (operand instanceof Variable) { Variable var = (Variable) operand;
if (refs[0] instanceof Variable) { Variable var = (Variable) refs[0];
public void generateCode(CodeGenerator cg) { Variable lhs = getLHS(); Location lhsLoc = lhs.getLocation(); if (lhsLoc instanceof RegisterLocation) { RegisterLocation regLoc = (RegisterLocation) lhsLoc; Object lhsReg = regLoc.getRegister(); if (operand instanceof Variable) { Variable var = (Variable) operand; Location varLoc = var.getLocation(); if (varLoc instanceof RegisterLocation) { RegisterLocation vregLoc = (RegisterLocation) varLoc; cg.generateCodeFor(this, lhsReg, operation, vregLoc.getRegister()); } else if (varLoc instanceof StackLocation) { StackLocation stackLoc = (StackLocation) varLoc; cg.generateCodeFor(this, lhsReg, operation, stackLoc.getDisplacement()); } else { throw new IllegalArgumentException("Unknown location: " + varLoc); } } else if (operand instanceof Constant) { // this probably won't happen, is should be folded earlier Constant con = (Constant) operand; cg.generateCodeFor(this, lhsReg, operation, con); } else { throw new IllegalArgumentException("Unknown operand: " + operand); } } else if (lhsLoc instanceof StackLocation) { StackLocation lhsStackLoc = (StackLocation) lhsLoc; int lhsDisp = lhsStackLoc.getDisplacement(); if (operand instanceof Variable) { Variable var = (Variable) operand; Location varLoc = var.getLocation(); if (varLoc instanceof RegisterLocation) { RegisterLocation vregLoc = (RegisterLocation) varLoc; cg.generateCodeFor(this, lhsDisp, operation, vregLoc.getRegister()); } else if (varLoc instanceof StackLocation) { StackLocation stackLoc = (StackLocation) varLoc; cg.generateCodeFor(this, lhsDisp, operation, stackLoc.getDisplacement()); } else { throw new IllegalArgumentException("Unknown location: " + varLoc); } } else if (operand instanceof Constant) { Constant con = (Constant) operand; cg.generateCodeFor(this, lhsDisp, operation, con); } else { throw new IllegalArgumentException("Unknown operand: " + operand); } } else { throw new IllegalArgumentException("Unknown location: " + lhsLoc); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/568227fef1ae7ced51f104ef1af634c7a6188718/UnaryQuad.java/buggy/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryQuad.java