rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
public void setLocationRelativeTo(Component c) { int x = 0; int y = 0; if (c == null || !c.isShowing()) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Point center = ge.getCenterPoint(); x = center.x - (width / 2); y = center.y - (height / 2); } else { int cWidth = c.getWidth(); int cHeight = c.getHeight(); Dimension screenSize = getToolkit().getScreenSize(); x = c.getLocationOnScreen().x; y = c.getLocationOnScreen().y; // If bottom of component is cut off, window placed // on the left or the right side of component if ((y + cHeight) > screenSize.height) { // If the right side of the component is closer to the center if ((screenSize.width / 2 - x) <= 0) { if ((x - width) >= 0) x -= width; else x = 0; } else { if ((x + cWidth + width) <= screenSize.width) x += cWidth; else x = screenSize.width - width; } y = screenSize.height - height; } else if (cWidth > width || cHeight > height) { // If right side of component is cut off if ((x + width) > screenSize.width) x = screenSize.width - width; // If left side of component is cut off else if (x < 0) x = 0; else x += (cWidth - width) / 2; y += (cHeight - height) / 2; } else { // If right side of component is cut off if ((x + width) > screenSize.width) x = screenSize.width - width; // If left side of component is cut off else if (x < 0 || (x - (width - cWidth) / 2) < 0) x = 0; else x -= (width - cWidth) / 2; if ((y - (height - cHeight) / 2) > 0) y -= (height - cHeight) / 2; else y = 0; } } setLocation(x, y); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6e9e807110ca5387384fb5569869118ad80844bc/Window.java/buggy/core/src/classpath/java/java/awt/Window.java |
||
public void setLocationRelativeTo(Component c) { int x = 0; int y = 0; if (c == null || !c.isShowing()) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Point center = ge.getCenterPoint(); x = center.x - (width / 2); y = center.y - (height / 2); } else { int cWidth = c.getWidth(); int cHeight = c.getHeight(); Dimension screenSize = getToolkit().getScreenSize(); x = c.getLocationOnScreen().x; y = c.getLocationOnScreen().y; // If bottom of component is cut off, window placed // on the left or the right side of component if ((y + cHeight) > screenSize.height) { // If the right side of the component is closer to the center if ((screenSize.width / 2 - x) <= 0) { if ((x - width) >= 0) x -= width; else x = 0; } else { if ((x + cWidth + width) <= screenSize.width) x += cWidth; else x = screenSize.width - width; } y = screenSize.height - height; } else if (cWidth > width || cHeight > height) { // If right side of component is cut off if ((x + width) > screenSize.width) x = screenSize.width - width; // If left side of component is cut off else if (x < 0) x = 0; else x += (cWidth - width) / 2; y += (cHeight - height) / 2; } else { // If right side of component is cut off if ((x + width) > screenSize.width) x = screenSize.width - width; // If left side of component is cut off else if (x < 0 || (x - (width - cWidth) / 2) < 0) x = 0; else x -= (width - cWidth) / 2; if ((y - (height - cHeight) / 2) > 0) y -= (height - cHeight) / 2; else y = 0; } } setLocation(x, y); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6e9e807110ca5387384fb5569869118ad80844bc/Window.java/buggy/core/src/classpath/java/java/awt/Window.java |
||
public void setLocationRelativeTo(Component c) { int x = 0; int y = 0; if (c == null || !c.isShowing()) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Point center = ge.getCenterPoint(); x = center.x - (width / 2); y = center.y - (height / 2); } else { int cWidth = c.getWidth(); int cHeight = c.getHeight(); Dimension screenSize = getToolkit().getScreenSize(); x = c.getLocationOnScreen().x; y = c.getLocationOnScreen().y; // If bottom of component is cut off, window placed // on the left or the right side of component if ((y + cHeight) > screenSize.height) { // If the right side of the component is closer to the center if ((screenSize.width / 2 - x) <= 0) { if ((x - width) >= 0) x -= width; else x = 0; } else { if ((x + cWidth + width) <= screenSize.width) x += cWidth; else x = screenSize.width - width; } y = screenSize.height - height; } else if (cWidth > width || cHeight > height) { // If right side of component is cut off if ((x + width) > screenSize.width) x = screenSize.width - width; // If left side of component is cut off else if (x < 0) x = 0; else x += (cWidth - width) / 2; y += (cHeight - height) / 2; } else { // If right side of component is cut off if ((x + width) > screenSize.width) x = screenSize.width - width; // If left side of component is cut off else if (x < 0 || (x - (width - cWidth) / 2) < 0) x = 0; else x -= (width - cWidth) / 2; if ((y - (height - cHeight) / 2) > 0) y -= (height - cHeight) / 2; else y = 0; } } setLocation(x, y); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6e9e807110ca5387384fb5569869118ad80844bc/Window.java/buggy/core/src/classpath/java/java/awt/Window.java |
||
{ | { | public void setOptions(Object[] newOptions) { if (options != newOptions) { Object[] old = options; options = newOptions; firePropertyChange(OPTIONS_PROPERTY, old, options); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java |
} | } | public void setOptions(Object[] newOptions) { if (options != newOptions) { Object[] old = options; options = newOptions; firePropertyChange(OPTIONS_PROPERTY, old, options); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java |
super(dir); } | super(dir); } | public TN5250jFileChooser(String dir) { super(dir); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/23b9082401e6c07b6befa90f25fb355bdb4ae9b5/TN5250jFileChooser.java/buggy/tn5250j/src/org/tn5250j/gui/TN5250jFileChooser.java |
super(frame, title, modal); try { jbInit(); pack(); } catch(Exception ex) { ex.printStackTrace(); } } | super(frame, title, modal); try { jbInit(); pack(); } catch (Exception ex) { ex.printStackTrace(); } } | public SMTPConfig(Frame frame, String title, boolean modal) { super(frame, title, modal); try { jbInit(); pack(); } catch(Exception ex) { ex.printStackTrace(); } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java |
public boolean send() throws Exception, AddressException, MessagingException { | public boolean send() throws Exception { | public boolean send() throws Exception, AddressException, MessagingException { try { if(!loadConfig(configFile)) return false; Session session = Session.getDefaultInstance(SMTPProperties, null); session.setDebug(false); // create the Multipart and its parts to it Multipart mp = new MimeMultipart(); Message msg = new MimeMessage(session); InternetAddress[] toAddrs = null, ccAddrs = null; toAddrs = InternetAddress.parse(to, false); msg.setRecipients(Message.RecipientType.TO, toAddrs); if (cc != null) { ccAddrs = InternetAddress.parse(cc, false); msg.setRecipients(Message.RecipientType.CC, ccAddrs); } if (subject != null) msg.setSubject(subject.trim()); if (from != null && from.length() > 0) msg.setFrom(new InternetAddress(from)); if (message != null && message.length() > 0) { // create and fill the attachment message part MimeBodyPart mbp = new MimeBodyPart(); mbp.setText(message,"us-ascii"); mp.addBodyPart(mbp); } msg.setSentDate(new Date()); if (attachment != null && attachment.length() > 0) { // create and fill the attachment message part MimeBodyPart abp = new MimeBodyPart(); abp.setText(attachment,"us-ascii"); if (attachmentName == null || attachmentName.length() == 0) abp.setFileName("tn5250j.txt"); else abp.setFileName(attachmentName); mp.addBodyPart(abp); } if (fileName != null && fileName.length() > 0) { // create and fill the attachment message part MimeBodyPart fbp = new MimeBodyPart(); fbp.setText("File sent using tn5250j","us-ascii"); if (attachmentName == null || attachmentName.length() == 0) fbp.setFileName("tn5250j.txt"); else fbp.setFileName(attachmentName); // Get the attachment DataSource source = new FileDataSource(fileName); // Set the data handler to the attachment fbp.setDataHandler(new DataHandler(source)); mp.addBodyPart(fbp); } // add the Multipart to the message msg.setContent(mp); // send the message Transport.send(msg); return true; } catch (SendFailedException sfe) { showFailedException(sfe); } return false; } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3706ce7dfcedf2cc1918edd6389de5e0ab5d5f2b/SendEMail.java/buggy/tn5250j/src/org/tn5250j/mailtools/SendEMail.java |
public boolean send() throws Exception, AddressException, MessagingException { try { if(!loadConfig(configFile)) return false; Session session = Session.getDefaultInstance(SMTPProperties, null); session.setDebug(false); // create the Multipart and its parts to it Multipart mp = new MimeMultipart(); Message msg = new MimeMessage(session); InternetAddress[] toAddrs = null, ccAddrs = null; toAddrs = InternetAddress.parse(to, false); msg.setRecipients(Message.RecipientType.TO, toAddrs); if (cc != null) { ccAddrs = InternetAddress.parse(cc, false); msg.setRecipients(Message.RecipientType.CC, ccAddrs); } if (subject != null) msg.setSubject(subject.trim()); if (from != null && from.length() > 0) msg.setFrom(new InternetAddress(from)); if (message != null && message.length() > 0) { // create and fill the attachment message part MimeBodyPart mbp = new MimeBodyPart(); mbp.setText(message,"us-ascii"); mp.addBodyPart(mbp); } msg.setSentDate(new Date()); if (attachment != null && attachment.length() > 0) { // create and fill the attachment message part MimeBodyPart abp = new MimeBodyPart(); abp.setText(attachment,"us-ascii"); if (attachmentName == null || attachmentName.length() == 0) abp.setFileName("tn5250j.txt"); else abp.setFileName(attachmentName); mp.addBodyPart(abp); } if (fileName != null && fileName.length() > 0) { // create and fill the attachment message part MimeBodyPart fbp = new MimeBodyPart(); fbp.setText("File sent using tn5250j","us-ascii"); if (attachmentName == null || attachmentName.length() == 0) fbp.setFileName("tn5250j.txt"); else fbp.setFileName(attachmentName); // Get the attachment DataSource source = new FileDataSource(fileName); // Set the data handler to the attachment fbp.setDataHandler(new DataHandler(source)); mp.addBodyPart(fbp); } // add the Multipart to the message msg.setContent(mp); // send the message Transport.send(msg); return true; } catch (SendFailedException sfe) { showFailedException(sfe); } return false; } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3706ce7dfcedf2cc1918edd6389de5e0ab5d5f2b/SendEMail.java/buggy/tn5250j/src/org/tn5250j/mailtools/SendEMail.java |
||
if (dataModel instanceof DefaultComboBoxModel) { | if (dataModel instanceof DefaultComboBoxModel) | public void removeAllItems() { if (dataModel instanceof DefaultComboBoxModel) { // Uses special method if we have a DefaultComboBoxModel. ((DefaultComboBoxModel) dataModel).removeAllElements(); } else if(dataModel instanceof MutableComboBoxModel){ // Iterates over all items and removes each. MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel; /* We intentionally remove the items backwards to support * models which shift their content to the beginning (e.g. * linked lists) */ for(int i=mcbm.getSize()-1; i >= 0; i--) { mcbm.removeElementAt(i); } } else { throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel."); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java |
} else if(dataModel instanceof MutableComboBoxModel){ | else if (dataModel instanceof MutableComboBoxModel) { | public void removeAllItems() { if (dataModel instanceof DefaultComboBoxModel) { // Uses special method if we have a DefaultComboBoxModel. ((DefaultComboBoxModel) dataModel).removeAllElements(); } else if(dataModel instanceof MutableComboBoxModel){ // Iterates over all items and removes each. MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel; /* We intentionally remove the items backwards to support * models which shift their content to the beginning (e.g. * linked lists) */ for(int i=mcbm.getSize()-1; i >= 0; i--) { mcbm.removeElementAt(i); } } else { throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel."); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java |
/* We intentionally remove the items backwards to support * models which shift their content to the beginning (e.g. * linked lists) */ for(int i=mcbm.getSize()-1; i >= 0; i--) { | for (int i = mcbm.getSize() - 1; i >= 0; i--) | public void removeAllItems() { if (dataModel instanceof DefaultComboBoxModel) { // Uses special method if we have a DefaultComboBoxModel. ((DefaultComboBoxModel) dataModel).removeAllElements(); } else if(dataModel instanceof MutableComboBoxModel){ // Iterates over all items and removes each. MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel; /* We intentionally remove the items backwards to support * models which shift their content to the beginning (e.g. * linked lists) */ for(int i=mcbm.getSize()-1; i >= 0; i--) { mcbm.removeElementAt(i); } } else { throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel."); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java |
} else { throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel."); } | else throw new RuntimeException("Unable to remove the items because the data " +"model it is not an instance of " + "MutableComboBoxModel."); | public void removeAllItems() { if (dataModel instanceof DefaultComboBoxModel) { // Uses special method if we have a DefaultComboBoxModel. ((DefaultComboBoxModel) dataModel).removeAllElements(); } else if(dataModel instanceof MutableComboBoxModel){ // Iterates over all items and removes each. MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel; /* We intentionally remove the items backwards to support * models which shift their content to the beginning (e.g. * linked lists) */ for(int i=mcbm.getSize()-1; i >= 0; i--) { mcbm.removeElementAt(i); } } else { throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel."); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java |
firePropertyChange("editable", ! isEditable, isEditable); | firePropertyChange("editable", !isEditable, isEditable); | public void setEditable(boolean editable) { if (isEditable != editable) { isEditable = editable; firePropertyChange("editable", ! isEditable, isEditable); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java |
if (button.getParent() instanceof JToolBar) button.setBorder(MetalBorders.getToolbarButtonBorder()); | public void installDefaults(AbstractButton button) { super.installDefaults(button); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); button.setFont(defaults.getFont("Button.font")); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/MetalButtonUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalButtonUI.java |
|
b.setRolloverEnabled(defaults.getBoolean(prefix + "rollover")); | protected void installDefaults(AbstractButton b) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); String prefix = getPropertyPrefix(); focusColor = defaults.getColor(prefix + "focus"); b.setForeground(defaults.getColor(prefix + "foreground")); b.setBackground(defaults.getColor(prefix + "background")); b.setMargin(defaults.getInsets(prefix + "margin")); b.setBorder(defaults.getBorder(prefix + "border")); b.setIconTextGap(defaults.getInt(prefix + "textIconGap")); b.setInputMap(JComponent.WHEN_FOCUSED, (InputMap) defaults.get(prefix + "focusInputMap")); b.setOpaque(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicButtonUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicButtonUI.java |
|
public abstract void generateCodeFor(VarReturnQuad quad); | public abstract void generateCodeFor(ConditionalBranchQuad quad); | public abstract void generateCodeFor(VarReturnQuad quad); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/CodeGenerator.java/buggy/core/src/core/org/jnode/vm/compiler/ir/CodeGenerator.java |
FileURLLoader(URLClassLoader classloader, URL url) | FileURLLoader(URLClassLoader classloader, URL url, URL absoluteUrl) | FileURLLoader(URLClassLoader classloader, URL url) { super(classloader, url); dir = new File(baseURL.getFile()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5ea1e3b700721d6128a08407f3e4ab153f1a8df6/URLClassLoader.java/clean/core/src/classpath/java/java/net/URLClassLoader.java |
super(classloader, url); dir = new File(baseURL.getFile()); | super(classloader, url, absoluteUrl); dir = new File(absoluteUrl.getFile()); | FileURLLoader(URLClassLoader classloader, URL url) { super(classloader, url); dir = new File(baseURL.getFile()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5ea1e3b700721d6128a08407f3e4ab153f1a8df6/URLClassLoader.java/clean/core/src/classpath/java/java/net/URLClassLoader.java |
public JarURLLoader(URLClassLoader classloader, URL baseURL) | public JarURLLoader(URLClassLoader classloader, URL baseURL, URL absoluteUrl) | public JarURLLoader(URLClassLoader classloader, URL baseURL) { super(classloader, baseURL); // Cache url prefix for all resources in this jar url. String external = baseURL.toExternalForm(); StringBuffer sb = new StringBuffer(external.length() + 6); sb.append("jar:"); sb.append(external); sb.append("!/"); String jarURL = sb.toString(); this.classPath = null; URL baseJarURL = null; JarFile jarfile = null; try { baseJarURL = new URL(null, jarURL, classloader.getURLStreamHandler("jar")); jarfile = ((JarURLConnection) baseJarURL.openConnection()).getJarFile(); Manifest manifest; Attributes attributes; String classPathString; if ((manifest = jarfile.getManifest()) != null && (attributes = manifest.getMainAttributes()) != null && ((classPathString = attributes.getValue(Attributes.Name.CLASS_PATH)) != null)) { this.classPath = new Vector(); StringTokenizer st = new StringTokenizer(classPathString, " "); while (st.hasMoreElements ()) { String e = st.nextToken (); try { URL url = new URL(baseURL, e); this.classPath.add(url); } catch (java.net.MalformedURLException xx) { // Give up } } } } catch (IOException ioe) { /* ignored */ } this.baseJarURL = baseJarURL; this.jarfile = jarfile; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5ea1e3b700721d6128a08407f3e4ab153f1a8df6/URLClassLoader.java/clean/core/src/classpath/java/java/net/URLClassLoader.java |
super(classloader, baseURL); | super(classloader, baseURL, absoluteUrl); | public JarURLLoader(URLClassLoader classloader, URL baseURL) { super(classloader, baseURL); // Cache url prefix for all resources in this jar url. String external = baseURL.toExternalForm(); StringBuffer sb = new StringBuffer(external.length() + 6); sb.append("jar:"); sb.append(external); sb.append("!/"); String jarURL = sb.toString(); this.classPath = null; URL baseJarURL = null; JarFile jarfile = null; try { baseJarURL = new URL(null, jarURL, classloader.getURLStreamHandler("jar")); jarfile = ((JarURLConnection) baseJarURL.openConnection()).getJarFile(); Manifest manifest; Attributes attributes; String classPathString; if ((manifest = jarfile.getManifest()) != null && (attributes = manifest.getMainAttributes()) != null && ((classPathString = attributes.getValue(Attributes.Name.CLASS_PATH)) != null)) { this.classPath = new Vector(); StringTokenizer st = new StringTokenizer(classPathString, " "); while (st.hasMoreElements ()) { String e = st.nextToken (); try { URL url = new URL(baseURL, e); this.classPath.add(url); } catch (java.net.MalformedURLException xx) { // Give up } } } } catch (IOException ioe) { /* ignored */ } this.baseJarURL = baseJarURL; this.jarfile = jarfile; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5ea1e3b700721d6128a08407f3e4ab153f1a8df6/URLClassLoader.java/clean/core/src/classpath/java/java/net/URLClassLoader.java |
loader = new JarURLLoader(this, newUrl); | loader = new JarURLLoader(this, newUrl, absoluteURL); | private void addURLImpl(URL newUrl) { synchronized (this) { if (newUrl == null) return; // Silently ignore... // Reset the toString() value. thisString = null; // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); String protocol = newUrl.getProtocol(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(protocol)) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urlinfos.add(loader); Vector extraUrls = loader.getClassPath(); if (extraUrls != null) { Iterator it = extraUrls.iterator(); while (it.hasNext()) { URL url = (URL)it.next(); URLLoader extraLoader = (URLLoader) urlloaders.get(url); if (! urlinfos.contains (extraLoader)) addURLImpl(url); } } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5ea1e3b700721d6128a08407f3e4ab153f1a8df6/URLClassLoader.java/clean/core/src/classpath/java/java/net/URLClassLoader.java |
loader = new FileURLLoader(this, newUrl); | loader = new FileURLLoader(this, newUrl, absoluteURL); | private void addURLImpl(URL newUrl) { synchronized (this) { if (newUrl == null) return; // Silently ignore... // Reset the toString() value. thisString = null; // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); String protocol = newUrl.getProtocol(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(protocol)) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urlinfos.add(loader); Vector extraUrls = loader.getClassPath(); if (extraUrls != null) { Iterator it = extraUrls.iterator(); while (it.hasNext()) { URL url = (URL)it.next(); URLLoader extraLoader = (URLLoader) urlloaders.get(url); if (! urlinfos.contains (extraLoader)) addURLImpl(url); } } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5ea1e3b700721d6128a08407f3e4ab153f1a8df6/URLClassLoader.java/clean/core/src/classpath/java/java/net/URLClassLoader.java |
public Attributes getMainAttributes() { | public Attributes getMainAttributes() { | public Attributes getMainAttributes() { return mainAttr; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/Manifest.java/buggy/core/src/classpath/java/java/util/jar/Manifest.java |
public Attributes getAttributes(String entryName) { | public Attributes getAttributes(String entryName) { | public Attributes getAttributes(String entryName) { return (Attributes) getEntries().get(entryName); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/Manifest.java/buggy/core/src/classpath/java/java/util/jar/Manifest.java |
result.setBlock( result.getBlock()+superblock.getFirstDataBlock() ); | result.setBlock(blockNr); | public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is not a data block but a filesystem * metadata block, as the beginning of each block group is filesystem * metadata: * superblock copy (if present) * block bitmap * inode bitmap * inode table * Free blocks begin after the inode table. */ long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if(blockNr<firstNonMetadataBlock) return new BlockReservation(false, -1, -1); byte[] bitmap = getBlock(groupDescriptors[group].getBlockBitmap()); //at any time, only one copy of the Block exists in the cache, so it is //safe to synchronize to the bitmapBlock object (it's part of Block) synchronized( bitmap ) { BlockReservation result = BlockBitmap.testAndSetBlock( bitmap, index ); //update the block bitmap if(result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, -1-result.getPreallocCount()); result.setBlock( result.getBlock()+superblock.getFirstDataBlock() ); } return result; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/052fc489d30725556cfdc680b282f9b0bed89fe2/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java |
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is not a data block but a filesystem * metadata block, as the beginning of each block group is filesystem * metadata: * superblock copy (if present) * block bitmap * inode bitmap * inode table * Free blocks begin after the inode table. */ long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if(blockNr<firstNonMetadataBlock) return new BlockReservation(false, -1, -1); byte[] bitmap = getBlock(groupDescriptors[group].getBlockBitmap()); //at any time, only one copy of the Block exists in the cache, so it is //safe to synchronize to the bitmapBlock object (it's part of Block) synchronized( bitmap ) { BlockReservation result = BlockBitmap.testAndSetBlock( bitmap, index ); //update the block bitmap if(result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, -1-result.getPreallocCount()); result.setBlock( result.getBlock()+superblock.getFirstDataBlock() ); } return result; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/052fc489d30725556cfdc680b282f9b0bed89fe2/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java |
||
public INodeDescriptor(INodeTable iNodeTable, int iNodeNr, int group, int index) { this.iNodeTable = iNodeTable; this.iNodeNr = iNodeNr; this.group = group; this.index = index; preallocCount = 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/INodeDescriptor.java/buggy/fs/src/fs/org/jnode/fs/ext2/INodeDescriptor.java |
||
public FileSystemException(String message, Throwable cause) { super(message, cause); | public FileSystemException() { super(); | public FileSystemException(String message, Throwable cause) { super(message, cause); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/FileSystemException.java/buggy/fs/src/fs/org/jnode/fs/FileSystemException.java |
public BlockReservation(boolean successful, long block, int preallocCount, long freeBlocksCount) { | public BlockReservation(boolean successful, long block, int preallocCount) { | public BlockReservation(boolean successful, long block, int preallocCount, long freeBlocksCount) { this.successful = successful; this.block = block; this.preallocCount = preallocCount; this.freeBlocksCount = freeBlocksCount; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/BlockReservation.java/buggy/fs/src/fs/org/jnode/fs/ext2/BlockReservation.java |
this.freeBlocksCount = freeBlocksCount; | public BlockReservation(boolean successful, long block, int preallocCount, long freeBlocksCount) { this.successful = successful; this.block = block; this.preallocCount = preallocCount; this.freeBlocksCount = freeBlocksCount; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/BlockReservation.java/buggy/fs/src/fs/org/jnode/fs/ext2/BlockReservation.java |
|
public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { | public TreeModelEvent(Object source, Object[] path) { | public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { super(source); this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } // TreeModelEvent() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } | this.path = new TreePath(path); } | public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { super(source); this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } // TreeModelEvent() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
public int[] getChildIndices() { | public int[] getChildIndices() { | public int[] getChildIndices() { return childIndices; } // getChildIndices() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
} | } | public int[] getChildIndices() { return childIndices; } // getChildIndices() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
public Object[] getChildren() { | public Object[] getChildren() { | public Object[] getChildren() { return children; } // getChildren() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
} | } | public Object[] getChildren() { return children; } // getChildren() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
public Object[] getPath() { | public Object[] getPath() { | public Object[] getPath() { return path.getPath(); } // getPath() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
} | } | public Object[] getPath() { return path.getPath(); } // getPath() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
public String toString() { return getClass() + " [Source: " + getSource() + ", TreePath: " + getTreePath() + ", Child Indicies: " + getChildIndices() + ", Children: " + getChildren() + ", Path: " + getPath() +"]"; } | public String toString() { return getClass() + " [Source: " + getSource() + ", TreePath: " + getTreePath() + ", Child Indicies: " + getChildIndices() + ", Children: " + getChildren() + ", Path: " + getPath() +"]"; } | public String toString() { return getClass() + " [Source: " + getSource() + ", TreePath: " + getTreePath() + ", Child Indicies: " + getChildIndices() + ", Children: " + getChildren() + ", Path: " + getPath() +"]"; } // toString() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/TreeModelEvent.java/clean/core/src/classpath/javax/javax/swing/event/TreeModelEvent.java |
vm.dumpStatistics(out); | public static void main(String[] args) { final Vm vm = getVm(); if ((vm != null) && !vm.isBootstrap()) { final PrintStream out = System.out; out.println("JNode VM " + vm.getVersion()); vm.getStatics().dumpStatistics(out); if (vm.hotMethodManager != null) { vm.hotMethodManager.dumpStatistics(out); } vm.heapManager.dumpStatistics(out); final SecurityManager sm = System.getSecurityManager(); out.println("Security manager: " + sm); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/Vm.java/clean/core/src/core/org/jnode/vm/Vm.java |
|
for(int i = 0; i < listeners.length; ++i) | for (int i = 0; i < listeners.length; ++i) | protected void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); for(int i = 0; i < listeners.length; ++i) listeners[i].stateChanged(changeEvent); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/AbstractSpinnerModel.java/clean/core/src/classpath/javax/javax/swing/AbstractSpinnerModel.java |
public File createFileObject(File directory, String filename) { return null; } | public File createFileObject(File dir, String filename) { return new File(dir, filename); } | public File createFileObject(File directory, String filename) { return null; // TODO } // createFileObject() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public abstract File createNewFolder(File file) throws IOException; | public abstract File createNewFolder(File containingDir) throws IOException; | public abstract File createNewFolder(File file) throws IOException; | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public static FileSystemView getFileSystemView() { return null; } | public static FileSystemView getFileSystemView() { if (File.separator.equals("/")) return new UnixFileSystemView(); return null; } | public static FileSystemView getFileSystemView() { return null; // TODO } // getFileSystemView() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public File[] getFiles(File directory, boolean fileHiding) { return null; } | public File[] getFiles(File dir, boolean useFileHiding) { if (dir == null) return null; File[] files = dir.listFiles(); if (! useFileHiding) return files; ArrayList trim = new ArrayList(); for (int i = 0; i < files.length; i++) if (! files[i].isHidden()) trim.add(files[i]); File[] value = (File[]) trim.toArray(new File[0]); return value; } | public File[] getFiles(File directory, boolean fileHiding) { return null; // TODO } // getFiles() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public File getHomeDirectory() { return null; } | public File getHomeDirectory() { return createFileObject(System.getProperty("user.home")); } | public File getHomeDirectory() { return null; // TODO } // getHomeDirectory() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public File getParentDirectory(File directory) { return null; } | public File getParentDirectory(File f) { if (f == null) return null; return f.getParentFile(); } | public File getParentDirectory(File directory) { return null; // TODO } // getParentDirectory() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public abstract File[] getRoots(); | public File[] getRoots() { return null; } | public abstract File[] getRoots(); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public abstract boolean isHiddenFile(File file); | public boolean isHiddenFile(File f) { return f.isHidden(); } | public abstract boolean isHiddenFile(File file); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public abstract boolean isRoot(File file); | public boolean isRoot(File f) { return false; } | public abstract boolean isRoot(File file); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/FileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/FileSystemView.java |
public TabbedPaneLayout() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalTabbedPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalTabbedPaneUI.java |
||
showMe_itemStateChanged(e); | hideTabBar_itemStateChanged(e); | public void itemStateChanged(ItemEvent e) { showMe_itemStateChanged(e); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/cc98935b482abc7940bafbda30a26d1bea33bd44/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java |
sessions.requestFocus(); | addWindowListener(new WindowAdapter() { public void windowOpened(WindowEvent e) { SwingUtilities.invokeLater(new Runnable() { public void run() { sessions.requestFocus(); } }); } }); | void jbInit() throws Exception { // make it non resizable setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create sessions panel createSessionsPanel(); // create emulator options panel createEmulatorOptionsPanel(); // create the button options createButtonOptions(); JTabbedPane optionTabs = new JTabbedPane(); optionTabs.addChangeListener(this); optionTabs.addTab(LangTool.getString("ss.labelConnections"),sessionPanel); optionTabs.addTab(LangTool.getString("ss.labelOptions1"),emulOptPanel); // add the panels to our dialog getContentPane().add(optionTabs,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // set default selection value as the first row or default session if (sessions.getRowCount() > 0) { int selInterval = 0; for (int x = 0; x < sessions.getRowCount(); x++) { if (((Boolean)ctm.getValueAt(x,2)).booleanValue()) selInterval = x; } sessions.getSelectionModel().setSelectionInterval(selInterval,selInterval); } sessions.requestFocus(); // now show the world what we and they can do this.setVisible(true); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/cc98935b482abc7940bafbda30a26d1bea33bd44/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java |
addLabelComponent("", sdn, sip); sdn.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); | public static void doEntry(Frame parent, String propKey, Properties props) { confTabs = new JTabbedPane(); ec = new JCheckBox(LangTool.getString("conf.labelEnhanced")); tc = new JCheckBox(LangTool.getString("conf.labelUseSystemName")); useProxy = new JCheckBox(LangTool.getString("conf.labelUseProxy")); sdNormal = new JRadioButton(LangTool.getString("conf.label24")); JRadioButton sdBig = new JRadioButton(LangTool.getString("conf.label27")); noEmbed = new JCheckBox(LangTool.getString("conf.labelEmbed")); deamon = new JCheckBox(LangTool.getString("conf.labelDeamon")); newJVM = new JCheckBox(LangTool.getString("conf.labelNewJVM")); cpb = new JComboBox(); String[] availCP = CharMappings.getAvailableCodePages(); cpb.addItem(LangTool.getString("conf.labelDefault")); for (int x = 0; x < availCP.length; x++) { cpb.addItem(availCP[x]); } sslType = new JComboBox(); for (int x = 0; x < SSL_TYPES.length; x++) { sslType.addItem(SSL_TYPES[x]); } if (propKey == null) { systemName = new JTextField(20); systemId = new JTextField(20); port = new JTextField("23",5); deviceName = new JTextField(20); fpn = new JTextField(20); proxyHost = new JTextField(20); proxyPort = new JTextField("1080",5); ec.setSelected(true); tc.setSelected(true); sdNormal.setSelected(true); deamon.setSelected(true); } else { String[] args = new String[20]; parseArgs((String)props.get(propKey),args); systemName = new JTextField(propKey,20); systemName.setEditable(false); systemName.setEnabled(false); systemId = new JTextField(args[0],20); if (isSpecified("-p",args)) { port = new JTextField(getParm("-p",args),5); } else { port = new JTextField("23",5); } if (isSpecified("-sslType",args)) sslType.setSelectedItem(getParm("-sslType",args)); if (isSpecified("-sph",args)) proxyHost = new JTextField(getParm("-sph",args),20); else proxyHost = new JTextField(20); if (isSpecified("-f",args)) fpn = new JTextField(getParm("-f",args),20); else fpn = new JTextField(20); if (isSpecified("-cp",args)) cpb.setSelectedItem(getParm("-cp",args)); if (isSpecified("-e",args)) ec.setSelected(true); else ec.setSelected(false); if (isSpecified("-t",args)) tc.setSelected(true); else tc.setSelected(false); if (isSpecified("-132",args)) sdBig.setSelected(true); else sdNormal.setSelected(true); if (isSpecified("-dn",args)) deviceName = new JTextField(getParm("-dn",args),20); else deviceName = new JTextField(20); if (isSpecified("-spp",args)) { proxyPort = new JTextField(getParm("-spp",args),5); } else { proxyPort = new JTextField("1080",5); } if (isSpecified("-usp",args)) useProxy.setSelected(true); else useProxy.setSelected(false); if (isSpecified("-noembed",args)) noEmbed.setSelected(true); else noEmbed.setSelected(false); if (isSpecified("-d",args)) deamon.setSelected(true); else deamon.setSelected(false); if (isSpecified("-nc",args)) newJVM.setSelected(true); else newJVM.setSelected(false); } //Create main attributes panel JPanel mp = new JPanel(); BoxLayout mpLayout = new BoxLayout(mp,BoxLayout.Y_AXIS); mp.setLayout(mpLayout); //System Name panel JPanel snp = new JPanel(); AlignLayout snpLayout = new AlignLayout(2,5,5); snp.setLayout(snpLayout); snp.setBorder(BorderFactory.createEtchedBorder()); addLabelComponent(LangTool.getString("conf.labelSystemName"), systemName, snp); addLabelComponent(" ", noEmbed, snp); addLabelComponent(" ", deamon, snp); addLabelComponent(" ", newJVM, snp); //System Id panel JPanel sip = new JPanel(); AlignLayout al = new AlignLayout(2,5,5); sip.setLayout(al); sip.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelSystemIdTitle"))); addLabelComponent(LangTool.getString("conf.labelSystemId"), systemId, sip); addLabelComponent(LangTool.getString("conf.labelPort"), port, sip); addLabelComponent(LangTool.getString("conf.labelDeviceName"), deviceName, sip); addLabelComponent(LangTool.getString("conf.labelSSLType"), sslType, sip); // options panel JPanel op = new JPanel(); BoxLayout opLayout = new BoxLayout(op,BoxLayout.Y_AXIS); op.setLayout(opLayout); op.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelOptionsTitle"))); // file name panel JPanel fp = new JPanel(); BoxLayout fpLayout = new BoxLayout(fp,BoxLayout.Y_AXIS); fp.setLayout(fpLayout); fp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelConfFile"))); fp.add(fpn); // screen dimensions panel JPanel sdp = new JPanel(); BoxLayout sdpLayout = new BoxLayout(sdp,BoxLayout.X_AXIS); sdp.setLayout(sdpLayout); sdp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelDimensions"))); // Group the radio buttons. ButtonGroup sdGroup = new ButtonGroup(); sdGroup.add(sdNormal); sdGroup.add(sdBig); sdp.add(sdNormal); sdp.add(sdBig); // code page panel JPanel cp = new JPanel(); BoxLayout cpLayout = new BoxLayout(cp,BoxLayout.Y_AXIS); cp.setLayout(cpLayout); cp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelCodePage"))); cp.add(cpb); // emulation mode panel JPanel ep = new JPanel(); BoxLayout epLayout = new BoxLayout(ep,BoxLayout.X_AXIS); ep.setLayout(epLayout); ep.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelEmulateMode"))); ep.add(ec); // title to be use panel JPanel tp = new JPanel(); BoxLayout tpLayout = new BoxLayout(tp,BoxLayout.X_AXIS); tp.setLayout(tpLayout); tp.setBorder(BorderFactory.createTitledBorder( "")); addLabelComponent("", tc, tp); // add all options to Options panel op.add(fp); op.add(sdp); op.add(cp); op.add(ep); op.add(tp); //System Id panel JPanel sprox = new JPanel(); AlignLayout spal = new AlignLayout(2,5,5); sprox.setLayout(spal); sprox.setBorder(BorderFactory.createEtchedBorder()); addLabelComponent("", useProxy, sprox); addLabelComponent(LangTool.getString("conf.labelProxyHost"), proxyHost, sprox); addLabelComponent(LangTool.getString("conf.labelProxyPort"), proxyPort, sprox); confTabs.addTab(LangTool.getString("conf.tabGeneral"),snp); confTabs.addTab(LangTool.getString("conf.tabTCP"),sip); confTabs.addTab(LangTool.getString("conf.tabOptions"),op); confTabs.addTab(LangTool.getString("conf.tabProxy"),sprox); systemName.setAlignmentX(Component.CENTER_ALIGNMENT); systemId.setAlignmentX(Component.CENTER_ALIGNMENT); fpn.setAlignmentX(Component.CENTER_ALIGNMENT); cpb.setAlignmentX(Component.CENTER_ALIGNMENT); Object[] message = new Object[1]; message[0] = confTabs; String[] options = new String[2]; String title; if (propKey == null) { options[0] = LangTool.getString("conf.optAdd"); title = LangTool.getString("conf.addEntryATitle"); } else { options[0] = LangTool.getString("conf.optEdit"); title = LangTool.getString("conf.addEntryETitle"); } options[1] = LangTool.getString("conf.optCancel"); int result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array title, // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.PLAIN_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { if (propKey == null) { props.put(systemName.getText(),toArgString()); } else { props.setProperty(systemName.getText(),toArgString()); } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/1628a5b2ea01b3bfb66854e9d7b426faf9acd581/Configure.java/buggy/tn5250j/src/org/tn5250j/Configure.java |
|
public static TitledBorder createTitledBorder (String title) | public static TitledBorder createTitledBorder(String title) | public static TitledBorder createTitledBorder (String title) { return new TitledBorder (title); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/BorderFactory.java/buggy/core/src/classpath/javax/javax/swing/BorderFactory.java |
return new TitledBorder (title); | return new TitledBorder(title); | public static TitledBorder createTitledBorder (String title) { return new TitledBorder (title); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/BorderFactory.java/buggy/core/src/classpath/javax/javax/swing/BorderFactory.java |
{ selectionModel.setSelectionMode(s); | { selectionModel.setSelectionMode(s); | public void setSelectionMode(int s) { selectionModel.setSelectionMode(s); columnModel.getSelectionModel().setSelectionMode(s); repaint(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTable.java/buggy/core/src/classpath/javax/javax/swing/JTable.java |
public static Border createRaisedBevelBorder () | public static Border createRaisedBevelBorder() | public static Border createRaisedBevelBorder () { return new BevelBorder (BevelBorder.RAISED); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/BorderFactory.java/buggy/core/src/classpath/javax/javax/swing/BorderFactory.java |
return new BevelBorder (BevelBorder.RAISED); | return new BevelBorder(BevelBorder.RAISED); | public static Border createRaisedBevelBorder () { return new BevelBorder (BevelBorder.RAISED); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/BorderFactory.java/buggy/core/src/classpath/javax/javax/swing/BorderFactory.java |
public final boolean hasFeature(int feature) { return ((this.features & feature) == feature); | public final boolean hasFeature(long feature) { return ((this.exFeatures & feature) == feature); | public final boolean hasFeature(int feature) { return ((this.features & feature) == feature); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/X86CpuID.java/buggy/core/src/core/org/jnode/vm/x86/X86CpuID.java |
public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, int size, int mode) throws ResourceNotFreeException; | public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, Extent size, int mode) throws ResourceNotFreeException; | public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, int size, int mode) throws ResourceNotFreeException; | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ResourceManager.java/buggy/core/src/core/org/jnode/system/ResourceManager.java |
protected DoubleWordItem(int kind, int offsetToFP, Register lsb, Register msb) { super(kind, offsetToFP); this.lsb = lsb; this.msb = msb; } | protected DoubleWordItem(ItemFactory factory) { super(factory); } | protected DoubleWordItem(int kind, int offsetToFP, Register lsb, Register msb) { super(kind, offsetToFP); this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); | final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; | switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; | case Kind.LOCAL: res = (DoubleWordItem)factory.createLocal(getType(), super.getOffsetToFP()); break; | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.CONSTANT: res = cloneConstant(); break; | case Kind.CONSTANT: res = cloneConstant(); break; | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.FPUSTACK: notImplemented(); res = null; break; | case Kind.FPUSTACK: notImplemented(); res = null; break; case Kind.STACK: notImplemented(); res = null; break; | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.STACK: notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
return 2; } | return 2; } | final int getCategory() { return 2; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
return super.getOffsetToFP(); } | return super.getOffsetToFP(); } | final int getLsbOffsetToFP() { return super.getOffsetToFP(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return lsb; } | assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return lsb; } | final Register getLsbRegister() { assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return lsb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
return super.getOffsetToFP() + 4; } | return super.getOffsetToFP() + 4; } | final int getMsbOffsetToFP() { return super.getOffsetToFP() + 4; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return msb; } | assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return msb; } | final Register getMsbRegister() { assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
throw new Error("Do not use this"); } | throw new Error("Do not use this"); } | final int getOffsetToFP() { throw new Error("Do not use this"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); | if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); | final void load(EmitterContext ec) { if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } } | Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } } | final void load(EmitterContext ec) { if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); | final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); | assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
switch (kind) { case Kind.REGISTER: if (msb != this.lsb) { if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { os.writeMOV(INTSIZE, lsb, this.lsb); pool.release(this.lsb); } } else if (lsb != this.msb) { os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); pool.release(this.msb); } else { os.writeXCHG(this.lsb, this.msb); } break; | switch (kind) { case Kind.REGISTER: if (msb != this.lsb) { if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { os.writeMOV(INTSIZE, lsb, this.lsb); pool.release(this.lsb); } } else if (lsb != this.msb) { os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); pool.release(this.msb); } else { os.writeXCHG(this.lsb, this.msb); } break; | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; | case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; | case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.FPUSTACK: stack.fpuStack.pop(this); os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; | case Kind.FPUSTACK: stack.fpuStack.pop(this); os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; | case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
} kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
AbstractX86Stream os, Register lsb, Register msb); | AbstractX86Stream os, Register lsb, Register msb); | protected abstract void loadToConstant(EmitterContext ec, AbstractX86Stream os, Register lsb, Register msb); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
if (kind != Kind.REGISTER) { Register lsb = ec.getPool().request(JvmType.INT); if (lsb == null) { ec.getVStack().push(ec); lsb = ec.getPool().request(JvmType.INT); } assertCondition(lsb != null, "lsb != null"); Register msb = ec.getPool().request(JvmType.INT); if (msb == null) { ec.getVStack().push(ec); msb = ec.getPool().request(JvmType.INT); } assertCondition(msb != null, "msb != null"); loadTo(ec, lsb, msb); } } | if (kind != Kind.REGISTER) { Register lsb = ec.getPool().request(JvmType.INT); if (lsb == null) { ec.getVStack().push(ec); lsb = ec.getPool().request(JvmType.INT); } assertCondition(lsb != null, "lsb != null"); Register msb = ec.getPool().request(JvmType.INT); if (msb == null) { ec.getVStack().push(ec); msb = ec.getPool().request(JvmType.INT); } assertCondition(msb != null, "msb != null"); loadTo(ec, lsb, msb); } } | final void loadToGPR(EmitterContext ec) { if (kind != Kind.REGISTER) { Register lsb = ec.getPool().request(JvmType.INT); if (lsb == null) { ec.getVStack().push(ec); lsb = ec.getPool().request(JvmType.INT); } assertCondition(lsb != null, "lsb != null"); Register msb = ec.getPool().request(JvmType.INT); if (msb == null) { ec.getVStack().push(ec); msb = ec.getPool().request(JvmType.INT); } assertCondition(msb != null, "msb != null"); loadTo(ec, lsb, msb); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
int disp); | int disp); | protected abstract void popFromFPU(AbstractX86Stream os, Register reg, int disp); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); | final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; | switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; | case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.CONSTANT: pushConstant(ec, os); break; | case Kind.CONSTANT: pushConstant(ec, os); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.FPUSTACK: final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; | case Kind.FPUSTACK: final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } break; } | case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } break; } | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
release(ec); kind = Kind.STACK; | cleanup(ec); kind = Kind.STACK; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
int disp); | int disp); | protected abstract void pushToFPU(AbstractX86Stream os, Register reg, int disp); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(lsb); pool.release(msb); break; case Kind.LOCAL: break; case Kind.CONSTANT: break; case Kind.FPUSTACK: break; case Kind.STACK: break; } this.lsb = null; this.msb = null; this.kind = 0; } | cleanup(ec); factory.release(this); } | final void release(EmitterContext ec) { //assertCondition(!ec.getVStack().contains(this), "Cannot release while on vstack"); final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(lsb); pool.release(msb); break; case Kind.LOCAL: // nothing to do break; case Kind.CONSTANT: // nothing to do break; case Kind.FPUSTACK: // nothing to do break; case Kind.STACK: // nothing to do break; } this.lsb = null; this.msb = null; this.kind = 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
final Register r = pool.request(JvmType.INT); assertCondition(r != null, "r != null"); return r; } | final Register r = pool.request(JvmType.INT); assertCondition(r != null, "r != null"); return r; } | private final Register request(EmitterContext ec, X86RegisterPool pool) { final Register r = pool.request(JvmType.INT); assertCondition(r != null, "r != null"); return r; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } | assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } | final void spill(EmitterContext ec, Register reg) { assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newMsb); pool.transferOwnerTo(newLsb, this); pool.transferOwnerTo(newMsb, this); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.