rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
found = false; | void setAnnotationSelected(boolean b) { if (b == model.isAnnotationSelected()) return; Boolean oldValue = model.isAnnotationSelected() ? Boolean.TRUE : Boolean.FALSE, newValue = b ? Boolean.TRUE : Boolean.FALSE; model.setAnnotationSelected(b); firePropertyChange(LEVEL_PROPERTY, oldValue, newValue); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8ab0ebced6045585fe427d0aa4302d96454e7266/Finder.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/finder/Finder.java |
|
found = false; | void setDescriptionSelected(boolean b) { if (b == model.isDescriptionSelected()) return; Boolean oldValue = model.isDescriptionSelected() ? Boolean.TRUE : Boolean.FALSE, newValue = b ? Boolean.TRUE : Boolean.FALSE; model.setDescriptionSelected(b); firePropertyChange(LEVEL_PROPERTY, oldValue, newValue); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8ab0ebced6045585fe427d0aa4302d96454e7266/Finder.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/finder/Finder.java |
|
found = false; | void setNameSelected(boolean b) { if (b == model.isNameSelected()) return; Boolean oldValue = model.isNameSelected() ? Boolean.TRUE : Boolean.FALSE, newValue = b ? Boolean.TRUE : Boolean.FALSE; model.setNameSelected(b); firePropertyChange(LEVEL_PROPERTY, oldValue, newValue); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8ab0ebced6045585fe427d0aa4302d96454e7266/Finder.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/finder/Finder.java |
|
rmapper = new ReverseModelMapper(); | OmeroServiceImpl(OMEROGateway gateway, Registry registry) { if (registry == null) throw new IllegalArgumentException("No registry."); if (gateway == null) throw new IllegalArgumentException("No gateway."); context = registry; this.gateway = gateway; rmapper = new ReverseModelMapper(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f345c83a3d27921d1ebc5f67fd2e08baf108a708/OmeroServiceImpl.java/buggy/SRC/org/openmicroscopy/shoola/env/data/OmeroServiceImpl.java |
|
return annotatedObject; | return updateDataObject(annotatedObject); | public DataObject removeAnnotationFrom(DataObject annotatedObject, AnnotationData data) throws DSOutOfServiceException, DSAccessException { if (data == null) throw new IllegalArgumentException("No annotation to delete."); if (annotatedObject == null) throw new IllegalArgumentException("No annotated DataObject."); if (!(annotatedObject instanceof ImageData) && !(annotatedObject instanceof DatasetData)) throw new IllegalArgumentException("This method only supports " + "ImageData and DatasetData objects."); Map options = (new PojoOptions()).map(); gateway.deleteObject(data.asIObject(), options); return annotatedObject; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f345c83a3d27921d1ebc5f67fd2e08baf108a708/OmeroServiceImpl.java/buggy/SRC/org/openmicroscopy/shoola/env/data/OmeroServiceImpl.java |
ModelMapper.unloadCollections(ob);; | public DataObject updateDataObject(DataObject object) throws DSOutOfServiceException, DSAccessException { if (object == null) throw new DSAccessException("No object to update."); IObject ob = object.asIObject(); //ModelMapper.unloadCollections(ob);; IObject updated = gateway.updateObject(ob, (new PojoOptions()).map()); return PojoMapper.asDataObject(updated); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f345c83a3d27921d1ebc5f67fd2e08baf108a708/OmeroServiceImpl.java/buggy/SRC/org/openmicroscopy/shoola/env/data/OmeroServiceImpl.java |
|
else if (!selected && boldWhenActive) { textLabel.setFont(defaultFont); } else if(selected){ | else if(boldWhenActive && !selected){ | public void setSelected(boolean selected) { super.setSelected(selected); this.selected = selected; if (boldWhenActive && selected) { textLabel.setFont(textLabel.getFont().deriveFont(Font.BOLD)); } else if (!selected && boldWhenActive) { textLabel.setFont(defaultFont); } else if(selected){ textLabel.setFont(defaultFont); } invalidate(); repaint(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/SparkTab.java/buggy/src/java/org/jivesoftware/spark/component/tabbedPane/SparkTab.java |
model.setFoundNodeIndex(index); | public void findPrevious() { List l = model.getFoundNodes(); if (l == null || l.size() == 0) return; int index = model.getFoundNodeIndex(); if (index > 0) index--; //not last element else if (index == 0) index = l.size()-1; TreeImageDisplay node = (TreeImageDisplay) l.get(index); view.selectFoundNode(node); Object ho = node.getUserObject(); if (ho instanceof DataObject) { EventBus bus = TreeViewerAgent.getRegistry().getEventBus(); bus.post(new ShowProperties((DataObject) ho, ShowProperties.EDIT)); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/72732546c2044fd8f88a71861c07f33c184e04a3/BrowserComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java |
|
private static TinyDialog getWindowFor(ImageNode node) | private static TinyDialog getWindowFor(ImageNode node, HiViewer model) | private static TinyDialog getWindowFor(ImageNode node) { ImageData ho = (ImageData) node.getHierarchyObject(); final Integer id = new Integer(ho.getId()); TinyDialog w = (TinyDialog) windows.get(id); if (w == null) { Thumbnail prv = node.getThumbnail(); BufferedImage full = prv.getFullScaleThumb(); if (full != null) { //NOTE: Right now we pre-fetch all images so full != null //unless they click on node at init time, when the thumbs //are being loaded. w = new ThumbWin((JFrame) node.getTopLevelAncestor(), full, ho); //TODO: We assume getFullScaleThumb returns a *pre-fetched* image. //If this is not the case and we load async, then we need a //callback handler. w.addPropertyChangeListener(TinyDialog.CLOSED_PROPERTY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent pce) { windows.remove(id); } }); windows.put(id, w); w.setTitle(node.getTitle()); } } return w; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinManager.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinManager.java |
w = new ThumbWin((JFrame) node.getTopLevelAncestor(), full, ho); | w = new ThumbWin((JFrame) node.getTopLevelAncestor(), full, ho, model, node); | private static TinyDialog getWindowFor(ImageNode node) { ImageData ho = (ImageData) node.getHierarchyObject(); final Integer id = new Integer(ho.getId()); TinyDialog w = (TinyDialog) windows.get(id); if (w == null) { Thumbnail prv = node.getThumbnail(); BufferedImage full = prv.getFullScaleThumb(); if (full != null) { //NOTE: Right now we pre-fetch all images so full != null //unless they click on node at init time, when the thumbs //are being loaded. w = new ThumbWin((JFrame) node.getTopLevelAncestor(), full, ho); //TODO: We assume getFullScaleThumb returns a *pre-fetched* image. //If this is not the case and we load async, then we need a //callback handler. w.addPropertyChangeListener(TinyDialog.CLOSED_PROPERTY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent pce) { windows.remove(id); } }); windows.put(id, w); w.setTitle(node.getTitle()); } } return w; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinManager.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinManager.java |
uiDelegate.attachMouseListener(this); | ThumbWin(JFrame parent, BufferedImage fullScaleThumb, DataObject image) { super(parent, fullScaleThumb); if (image == null) throw new NullPointerException("No image."); dataObject = image; addMouseListener(this); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/11fc11c4e769e382f5279d4e21088d468940d1b6/ThumbWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWin.java |
|
Image text = (Image)t.getTransferData(DataFlavor.imageFlavor); return text; | return (Image)t.getTransferData(DataFlavor.imageFlavor); | public static Image getClipboard() { Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null); try { if (t != null && t.isDataFlavorSupported(DataFlavor.imageFlavor)) { Image text = (Image)t.getTransferData(DataFlavor.imageFlavor); return text; } } catch (UnsupportedFlavorException e) { } catch (IOException e) { } return null; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/d1edd697d5a1740fb86f485abe0e61d017d6dfb2/SparkTransferManager.java/buggy/src/java/org/jivesoftware/spark/filetransfer/SparkTransferManager.java |
File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp"); | File tmpDirectory = new File(Spark.getUserHome(), "Spark/tempImages"); | public void sendImage(final Image image, final ChatRoom room) { File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp"); tmpDirectory.mkdirs(); String imageName = "image_" + StringUtils.randomString(2) + ".png"; final File imageFile = new File(tmpDirectory, imageName); // Write image to system. SwingWorker worker = new SwingWorker() { public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; } public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); } }; worker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/d1edd697d5a1740fb86f485abe0e61d017d6dfb2/SparkTransferManager.java/buggy/src/java/org/jivesoftware/spark/filetransfer/SparkTransferManager.java |
return "ok"; | return true; | public void sendImage(final Image image, final ChatRoom room) { File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp"); tmpDirectory.mkdirs(); String imageName = "image_" + StringUtils.randomString(2) + ".png"; final File imageFile = new File(tmpDirectory, imageName); // Write image to system. SwingWorker worker = new SwingWorker() { public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; } public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); } }; worker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/d1edd697d5a1740fb86f485abe0e61d017d6dfb2/SparkTransferManager.java/buggy/src/java/org/jivesoftware/spark/filetransfer/SparkTransferManager.java |
room.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); | public void sendImage(final Image image, final ChatRoom room) { File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp"); tmpDirectory.mkdirs(); String imageName = "image_" + StringUtils.randomString(2) + ".png"; final File imageFile = new File(tmpDirectory, imageName); // Write image to system. SwingWorker worker = new SwingWorker() { public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; } public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); } }; worker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/d1edd697d5a1740fb86f485abe0e61d017d6dfb2/SparkTransferManager.java/buggy/src/java/org/jivesoftware/spark/filetransfer/SparkTransferManager.java |
|
return "ok"; | return true; | public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/d1edd697d5a1740fb86f485abe0e61d017d6dfb2/SparkTransferManager.java/buggy/src/java/org/jivesoftware/spark/filetransfer/SparkTransferManager.java |
room.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); | public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/d1edd697d5a1740fb86f485abe0e61d017d6dfb2/SparkTransferManager.java/buggy/src/java/org/jivesoftware/spark/filetransfer/SparkTransferManager.java |
|
declineLabel.setFont(new Font("Dialog", Font.BOLD, 10)); acceptLabel.setFont(new Font("Dialog", Font.BOLD, 10)); | declineLabel.setFont(new Font("Dialog", Font.BOLD, 11)); acceptLabel.setFont(new Font("Dialog", Font.BOLD, 11)); | public ReceiveMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); add(acceptLabel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(declineLabel, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); ResourceUtils.resButton(acceptLabel, Res.getString("accept")); ResourceUtils.resButton(declineLabel, Res.getString("reject")); // Decorate Cancel Button decorateCancelButton(); acceptLabel.setForeground(new Color(73, 113, 196)); declineLabel.setForeground(new Color(73, 113, 196)); declineLabel.setFont(new Font("Dialog", Font.BOLD, 10)); acceptLabel.setFont(new Font("Dialog", Font.BOLD, 10)); acceptLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); declineLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); acceptLabel.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { acceptLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { acceptLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); declineLabel.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { declineLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { declineLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e3a7a307a8f9a8e562406bb4e0820d56a5810759/ReceiveMessage.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/filetransfer/transfer/ui/ReceiveMessage.java |
e1.printStackTrace(); | Log.error(e1); | public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); cancelButton.setText(Res.getString("cancel")); retryButton.setText(Res.getString("retry")); add(cancelButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(retryButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); retryButton.setVisible(false); retryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { File file = new File(transfer.getFilePath()); transfer = transferManager.createOutgoingFileTransfer(fullJID); transfer.sendFile(file, "Sending"); } catch (XMPPException e1) { e1.printStackTrace(); } sendFile(transfer, transferManager, fullJID, nickname); } }); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); retryButton.setForeground(new Color(73, 113, 196)); retryButton.setFont(new Font("Dialog", Font.BOLD, 10)); retryButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e3a7a307a8f9a8e562406bb4e0820d56a5810759/SendMessage.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/filetransfer/transfer/ui/SendMessage.java |
cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); | cancelButton.setFont(new Font("Dialog", Font.BOLD, 11)); | public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); cancelButton.setText(Res.getString("cancel")); retryButton.setText(Res.getString("retry")); add(cancelButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(retryButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); retryButton.setVisible(false); retryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { File file = new File(transfer.getFilePath()); transfer = transferManager.createOutgoingFileTransfer(fullJID); transfer.sendFile(file, "Sending"); } catch (XMPPException e1) { e1.printStackTrace(); } sendFile(transfer, transferManager, fullJID, nickname); } }); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); retryButton.setForeground(new Color(73, 113, 196)); retryButton.setFont(new Font("Dialog", Font.BOLD, 10)); retryButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e3a7a307a8f9a8e562406bb4e0820d56a5810759/SendMessage.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/filetransfer/transfer/ui/SendMessage.java |
retryButton.setFont(new Font("Dialog", Font.BOLD, 10)); | retryButton.setFont(new Font("Dialog", Font.BOLD, 11)); | public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); cancelButton.setText(Res.getString("cancel")); retryButton.setText(Res.getString("retry")); add(cancelButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(retryButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); retryButton.setVisible(false); retryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { File file = new File(transfer.getFilePath()); transfer = transferManager.createOutgoingFileTransfer(fullJID); transfer.sendFile(file, "Sending"); } catch (XMPPException e1) { e1.printStackTrace(); } sendFile(transfer, transferManager, fullJID, nickname); } }); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); retryButton.setForeground(new Color(73, 113, 196)); retryButton.setFont(new Font("Dialog", Font.BOLD, 10)); retryButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e3a7a307a8f9a8e562406bb4e0820d56a5810759/SendMessage.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/filetransfer/transfer/ui/SendMessage.java |
arguments = "()"; | return "()"; | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
else | Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) | Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) | Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) | if (Hidden.class.equals(annotation.annotationType())) | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } | prnt[i] = "********"; | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
arguments = Arrays.asList(mi.getArguments()).toString(); | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
|
arguments = Arrays.asList(prnt).toString(); | private String getArgumentsString(MethodInvocation mi) { String arguments; Object[] args = mi.getArguments(); if (args == null || args.length < 1) { arguments = "()"; } else { Object[] allAnnotations = AnnotationUtils.findParameterAnnotations( mi.getThis().getClass(), mi.getMethod()); for (int j = 0; j < allAnnotations.length; j++) { Annotation[][] anns = (Annotation[][]) allAnnotations[j]; if (anns == null) continue; for (int i = 0; i < args.length; i++) { Annotation[] annotations = anns[i]; for (Annotation annotation : annotations) { if (Hidden.class.equals(annotation.annotationType())) { args[i] = "********"; } } } } arguments = Arrays.asList(mi.getArguments()).toString(); } return arguments; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92103cc07376943096a78b345b6950c5e0ae756d/ServiceHandler.java/clean/components/server/src/ome/services/util/ServiceHandler.java |
|
BottomBar(StatsResultsPaneMng mng, Registry reg) | BottomBar(StatsResultsPaneMng mng, Registry reg, int length) | BottomBar(StatsResultsPaneMng mng, Registry reg) { initComponents(IconManager.getInstance(reg)); new BottomBarMng(this, mng); buildGUI(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/BottomBar.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/BottomBar.java |
initComponents(IconManager.getInstance(reg)); | initComponents(IconManager.getInstance(reg), length); | BottomBar(StatsResultsPaneMng mng, Registry reg) { initComponents(IconManager.getInstance(reg)); new BottomBarMng(this, mng); buildGUI(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/BottomBar.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/BottomBar.java |
void initComponents(IconManager im) | void initComponents(IconManager im, int length) | void initComponents(IconManager im) { save = new JButton(im.getIcon(IconManager.SAVE)); save.setToolTipText( UIUtilities.formatToolTipText("Save the result as a " + "Text file.")); graphic = new JButton(im.getIcon(IconManager.GRAPHIC)); graphic.setToolTipText( UIUtilities.formatToolTipText("Present results in a " + "graphical form.")); back = new JButton(im.getIcon(IconManager.BACK)); back.setToolTipText( UIUtilities.formatToolTipText("Back to the table.")); back.setEnabled(false); forward = new JButton(im.getIcon(IconManager.FORWARD)); forward.setToolTipText( UIUtilities.formatToolTipText("Back to the graphic.")); forward.setEnabled(false); ratio = new JButton(im.getIcon(IconManager.RATIO)); ratio.setToolTipText( UIUtilities.formatToolTipText("Calculate the ratio " + "of the results of 2 different ROIs.")); background = new JButton(im.getIcon(IconManager.BACKGROUND)); background.setToolTipText( UIUtilities.formatToolTipText("Subtract background.")); initial = new JButton(im.getIcon(IconManager.INITIAL)); initial.setToolTipText( UIUtilities.formatToolTipText("Display the original results.")); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/BottomBar.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/BottomBar.java |
if (length <= 1) { ratio.setEnabled(false); background.setEnabled(false); initial.setEnabled(false); } | void initComponents(IconManager im) { save = new JButton(im.getIcon(IconManager.SAVE)); save.setToolTipText( UIUtilities.formatToolTipText("Save the result as a " + "Text file.")); graphic = new JButton(im.getIcon(IconManager.GRAPHIC)); graphic.setToolTipText( UIUtilities.formatToolTipText("Present results in a " + "graphical form.")); back = new JButton(im.getIcon(IconManager.BACK)); back.setToolTipText( UIUtilities.formatToolTipText("Back to the table.")); back.setEnabled(false); forward = new JButton(im.getIcon(IconManager.FORWARD)); forward.setToolTipText( UIUtilities.formatToolTipText("Back to the graphic.")); forward.setEnabled(false); ratio = new JButton(im.getIcon(IconManager.RATIO)); ratio.setToolTipText( UIUtilities.formatToolTipText("Calculate the ratio " + "of the results of 2 different ROIs.")); background = new JButton(im.getIcon(IconManager.BACKGROUND)); background.setToolTipText( UIUtilities.formatToolTipText("Subtract background.")); initial = new JButton(im.getIcon(IconManager.INITIAL)); initial.setToolTipText( UIUtilities.formatToolTipText("Display the original results.")); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/BottomBar.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/BottomBar.java |
|
RubyObject result = getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (block == null)) { throw new RuntimeException("yield called out of block"); | if (!isBlockGiven()) { throw new RaiseException(this, "LocalJumpError", "yield called out of block"); | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (block == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); RubyScope oldScope = getScope(); setScope(tmpBlock.scope); block.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); while (true) { try { if (node == null) { result = getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } result = ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { result = node.eval(this, self); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); setScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/Ruby.java/buggy/org/jruby/Ruby.java |
block.pop(); | block = block.prev; | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (block == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); RubyScope oldScope = getScope(); setScope(tmpBlock.scope); block.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); while (true) { try { if (node == null) { result = getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } result = ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { result = node.eval(this, self); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); setScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/Ruby.java/buggy/org/jruby/Ruby.java |
while (true) { try { if (node == null) { result = getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); | try { while (true) { try { if (node == null) { return getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } return ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { return node.eval(this, self); | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (block == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); RubyScope oldScope = getScope(); setScope(tmpBlock.scope); block.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); while (true) { try { if (node == null) { result = getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } result = ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { result = node.eval(this, self); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); setScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/Ruby.java/buggy/org/jruby/Ruby.java |
result = ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { result = node.eval(this, self); | } catch (RedoException rExcptn) { | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (block == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); RubyScope oldScope = getScope(); setScope(tmpBlock.scope); block.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); while (true) { try { if (node == null) { result = getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } result = ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { result = node.eval(this, self); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); setScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/Ruby.java/buggy/org/jruby/Ruby.java |
break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (block == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); RubyScope oldScope = getScope(); setScope(tmpBlock.scope); block.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); while (true) { try { if (node == null) { result = getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } result = ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { result = node.eval(this, self); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); setScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/Ruby.java/buggy/org/jruby/Ruby.java |
|
iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); setScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (block == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); RubyScope oldScope = getScope(); setScope(tmpBlock.scope); block.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); while (true) { try { if (node == null) { result = getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } result = ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { result = node.eval(this, self); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); setScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/Ruby.java/buggy/org/jruby/Ruby.java |
|
container.add(scrollPane); | container.add(setScrollPaneSize()); | private void buildGUI(int l) { JPanel panel = new JPanel(); panel.add(scrollPane); Container container = getContentPane(); ReferenceFramePanel rfp = new ReferenceFramePanel("t", "z", "0"); rfp.setBackground(Color.white); TitlePanel tp = new TitlePanel("ROI selection Assistant", MSG, rfp); container.setLayout(new BoxLayout(container, BoxLayout.Y_AXIS)); container.add(tp); container.add(Box.createRigidArea(VBOX)); container.add(scrollPane); container.add(Box.createRigidArea(VBOX)); container.add(buildMain(l)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/AssistantDialog.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/AssistantDialog.java |
moveResizeBox = new JCheckBox("Apply op to the stack"); | moveResizeBox = new JCheckBox("Apply move/resize to the stack"); | private void initComponents(IconManager im, int numRows, int numColumns, ScreenROI roi) { moveResizeBox = new JCheckBox("Apply op to the stack"); moveResizeBox.setToolTipText( UIUtilities.formatToolTipText("Apply the Move/Resize action " + "to all 2D-selections drawn on planes " + "within the stack")); allTimepoints = new JRadioButton("Fill from start to end"); finalTimepoints = new JRadioButton("Copy start to end timepoints"); allTimepoints.setSelected(true); ButtonGroup group = new ButtonGroup(); group.add(allTimepoints); group.add(finalTimepoints); copyStack = new JButton(im.getIcon(IconManager.COPY_STACK)); copyStack.setToolTipText( UIUtilities.formatToolTipText("Copy the selected stack " + "across time.")); //TextField startT = new JTextField(""+0, (""+numColumns).length()); endT = new JTextField(""+(numColumns-1), (""+numColumns).length()); initTxtWidth(startT); //Initialize the table table = new ColoredCellTable(numRows, numColumns, roi.getLogicalROI()); JList rowHeader = new JList(new HeaderListModel(numRows)); if (numRows > MAX) rowHeader.setFixedCellWidth(WIDTH_MAX); else rowHeader.setFixedCellWidth(WIDTH_MIN); rowHeader.setFixedCellHeight(table.getRowHeight()); rowHeader.setCellRenderer(new RowHeaderRenderer(table)); scrollPane = new JScrollPane(table); scrollPane.setRowHeaderView(rowHeader); scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/AssistantDialog.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/AssistantDialog.java |
setScrollPaneSize(); | private void initComponents(IconManager im, int numRows, int numColumns, ScreenROI roi) { moveResizeBox = new JCheckBox("Apply op to the stack"); moveResizeBox.setToolTipText( UIUtilities.formatToolTipText("Apply the Move/Resize action " + "to all 2D-selections drawn on planes " + "within the stack")); allTimepoints = new JRadioButton("Fill from start to end"); finalTimepoints = new JRadioButton("Copy start to end timepoints"); allTimepoints.setSelected(true); ButtonGroup group = new ButtonGroup(); group.add(allTimepoints); group.add(finalTimepoints); copyStack = new JButton(im.getIcon(IconManager.COPY_STACK)); copyStack.setToolTipText( UIUtilities.formatToolTipText("Copy the selected stack " + "across time.")); //TextField startT = new JTextField(""+0, (""+numColumns).length()); endT = new JTextField(""+(numColumns-1), (""+numColumns).length()); initTxtWidth(startT); //Initialize the table table = new ColoredCellTable(numRows, numColumns, roi.getLogicalROI()); JList rowHeader = new JList(new HeaderListModel(numRows)); if (numRows > MAX) rowHeader.setFixedCellWidth(WIDTH_MAX); else rowHeader.setFixedCellWidth(WIDTH_MIN); rowHeader.setFixedCellHeight(table.getRowHeight()); rowHeader.setCellRenderer(new RowHeaderRenderer(table)); scrollPane = new JScrollPane(table); scrollPane.setRowHeaderView(rowHeader); scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/AssistantDialog.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/AssistantDialog.java |
|
manager = new ControlsManager(this, control); | manager.attachListeners(); | public Controls(ROIAgtCtrl control, Registry registry) { this.control = control; pressedBorder = BorderFactory.createLoweredBevelBorder(); initButtons(IconManager.getInstance(registry)); initBoxes(); manager = new ControlsManager(this, control); buildGUI(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/Controls.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/pane/Controls.java |
bar.add(moveROI); bar.add(Box.createRigidArea(HBOX)); bar.add(sizeROI); bar.add(Box.createRigidArea(HBOX)); bar.add(erase); bar.add(Box.createRigidArea(HBOX)); bar.add(eraseAll); bar.add(Box.createRigidArea(HBOX)); bar.add(undoErase); | bar.add(eraseMenu); | private JToolBar buildButtonsBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); bar.add(rectangle); bar.add(Box.createRigidArea(HBOX)); bar.add(ellipse); bar.add(Box.createRigidArea(HBOX)); bar.add(moveROI); bar.add(Box.createRigidArea(HBOX)); bar.add(sizeROI); bar.add(Box.createRigidArea(HBOX)); bar.add(erase); bar.add(Box.createRigidArea(HBOX)); bar.add(eraseAll); bar.add(Box.createRigidArea(HBOX)); bar.add(undoErase); bar.add(Box.createRigidArea(HBOX)); bar.add(analyse); return bar; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/Controls.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/pane/Controls.java |
public JPanel buildControlsPanel() { JPanel p = new JPanel(), bp = new JPanel(); GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); p.setLayout(gridbag); JLabel l = new JLabel(" Selection Color"); bp = UIUtilities.buildComponentPanel(colors); c.gridx = 0; c.gridy = 0; c.anchor = GridBagConstraints.WEST; gridbag.setConstraints(l, c); p.add(l); c.gridx = 1; gridbag.setConstraints(bp, c); p.add(bp); c.gridx = 0; c.gridy = 1; l = new JLabel(" Channel"); bp = UIUtilities.buildComponentPanel(channels); gridbag.setConstraints(l, c); p.add(l); c.gridx = 1; gridbag.setConstraints(bp, c); p.add(bp); //c.gridx = 0; //c.gridy = 2; //l = new JLabel(" Draw"); //bp = UIUtilities.buildComponentPanel(drawOnOff); //gridbag.setConstraints(l, c); //p.add(l); //c.gridx = 1; //gridbag.setConstraints(bp, c); //p.add(bp); c.gridx = 0; c.gridy = 2; l = new JLabel(" Label"); bp = UIUtilities.buildComponentPanel(textOnOff); gridbag.setConstraints(l, c); p.add(l); c.gridx = 1; gridbag.setConstraints(bp, c); p.add(bp); c.gridx = 0; c.gridy = 3; l = new JLabel(" Annotate"); bp = UIUtilities.buildComponentPanel(annotationOnOff); gridbag.setConstraints(l, c); p.add(l); c.gridx = 1; gridbag.setConstraints(bp, c); p.add(bp); return p; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/Controls.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/pane/Controls.java |
||
UIUtilities.formatToolTipText("Pick a color for this ROI.")); drawOnOff = new JCheckBox(); drawOnOff.setToolTipText( UIUtilities.formatToolTipText("Display the selections.")); drawOnOff.setSelected(true); | UIUtilities.formatToolTipText("Pick a color for the shape.")); | private void initBoxes() { channels = new JComboBox(control.getChannels()); channels.setToolTipText( UIUtilities.formatToolTipText("Select a wavelength.")); colors = new JComboBox(selection); colors.setToolTipText( UIUtilities.formatToolTipText("Pick a color for this ROI.")); drawOnOff = new JCheckBox(); drawOnOff.setToolTipText( UIUtilities.formatToolTipText("Display the selections.")); drawOnOff.setSelected(true); textOnOff = new JCheckBox(); textOnOff.setToolTipText( UIUtilities.formatToolTipText("Display the ROI #.")); textOnOff.setSelected(false); annotationOnOff = new JCheckBox(); annotationOnOff.setToolTipText( UIUtilities.formatToolTipText("Display the annotated ROI.")); annotationOnOff.setSelected(false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/Controls.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/pane/Controls.java |
erase = new JButton(im.getIcon(IconManager.ERASE)); erase.setToolTipText( UIUtilities.formatToolTipText("Erase the current shape.")); setButtonBorder(erase, false); eraseAll = new JButton(im.getIcon(IconManager.ERASE_ALL)); eraseAll.setToolTipText( UIUtilities.formatToolTipText("Erase all shapes.")); setButtonBorder(eraseAll, false); | private void initButtons(IconManager im) { rectangle = new JButton(im.getIcon(IconManager.RECTANGLE)); rectangle.setToolTipText( UIUtilities.formatToolTipText("Draw a rectangle.")); setButtonBorder(rectangle, true); ellipse = new JButton(im.getIcon(IconManager.ELLIPSE)); ellipse.setToolTipText( UIUtilities.formatToolTipText("Draw an ellipse.")); setButtonBorder(ellipse, false); erase = new JButton(im.getIcon(IconManager.ERASE)); erase.setToolTipText( UIUtilities.formatToolTipText("Erase the current shape.")); setButtonBorder(erase, false); eraseAll = new JButton(im.getIcon(IconManager.ERASE_ALL)); eraseAll.setToolTipText( UIUtilities.formatToolTipText("Erase all shapes.")); setButtonBorder(eraseAll, false); analyse = new JButton(im.getIcon(IconManager.ANALYSE)); analyse.setToolTipText( UIUtilities.formatToolTipText("Analyse data.")); setButtonBorder(analyse, false); moveROI = new JButton(im.getIcon(IconManager.MOVE_ROI)); moveROI.setToolTipText( UIUtilities.formatToolTipText("Move the selected selection.")); setButtonBorder(moveROI, false); sizeROI = new JButton(im.getIcon(IconManager.SIZE_ROI)); sizeROI.setToolTipText( UIUtilities.formatToolTipText("Resize the selected " + "selection.")); setButtonBorder(sizeROI, false); undoErase = new JButton(im.getIcon(IconManager.UNDO_ERASE)); undoErase.setToolTipText( UIUtilities.formatToolTipText("Restore the last erased " + "selection.")); setButtonBorder(undoErase, false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/Controls.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/pane/Controls.java |
|
moveROI = new JButton(im.getIcon(IconManager.MOVE_ROI)); moveROI.setToolTipText( UIUtilities.formatToolTipText("Move the selected selection.")); setButtonBorder(moveROI, false); sizeROI = new JButton(im.getIcon(IconManager.SIZE_ROI)); sizeROI.setToolTipText( UIUtilities.formatToolTipText("Resize the selected " + "selection.")); setButtonBorder(sizeROI, false); undoErase = new JButton(im.getIcon(IconManager.UNDO_ERASE)); undoErase.setToolTipText( UIUtilities.formatToolTipText("Restore the last erased " + "selection.")); setButtonBorder(undoErase, false); | private void initButtons(IconManager im) { rectangle = new JButton(im.getIcon(IconManager.RECTANGLE)); rectangle.setToolTipText( UIUtilities.formatToolTipText("Draw a rectangle.")); setButtonBorder(rectangle, true); ellipse = new JButton(im.getIcon(IconManager.ELLIPSE)); ellipse.setToolTipText( UIUtilities.formatToolTipText("Draw an ellipse.")); setButtonBorder(ellipse, false); erase = new JButton(im.getIcon(IconManager.ERASE)); erase.setToolTipText( UIUtilities.formatToolTipText("Erase the current shape.")); setButtonBorder(erase, false); eraseAll = new JButton(im.getIcon(IconManager.ERASE_ALL)); eraseAll.setToolTipText( UIUtilities.formatToolTipText("Erase all shapes.")); setButtonBorder(eraseAll, false); analyse = new JButton(im.getIcon(IconManager.ANALYSE)); analyse.setToolTipText( UIUtilities.formatToolTipText("Analyse data.")); setButtonBorder(analyse, false); moveROI = new JButton(im.getIcon(IconManager.MOVE_ROI)); moveROI.setToolTipText( UIUtilities.formatToolTipText("Move the selected selection.")); setButtonBorder(moveROI, false); sizeROI = new JButton(im.getIcon(IconManager.SIZE_ROI)); sizeROI.setToolTipText( UIUtilities.formatToolTipText("Resize the selected " + "selection.")); setButtonBorder(sizeROI, false); undoErase = new JButton(im.getIcon(IconManager.UNDO_ERASE)); undoErase.setToolTipText( UIUtilities.formatToolTipText("Restore the last erased " + "selection.")); setButtonBorder(undoErase, false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/Controls.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/pane/Controls.java |
|
attachListeners(); | ControlsManager(Controls view, ROIAgtCtrl control) { this.view = view; this.control = control; attachListeners(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/ControlsManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/ControlsManager.java |
|
private void attachListeners() | void attachListeners() | private void attachListeners() { JButton rectangle = view.getRectangle(), ellipse = view.getEllipse(), erase = view.getErase(), analyze = view.getAnalyse(), moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(), eraseAll = view.getEraseAll(), undoErase = view.getUndoErase(); rectangle.setActionCommand(""+RECTANGLE); rectangle.addActionListener(this); ellipse.setActionCommand(""+ELLIPSE); ellipse.addActionListener(this); erase.setActionCommand(""+ERASE); erase.addActionListener(this); eraseAll.setActionCommand(""+ERASE_ALL); eraseAll.addActionListener(this); moveROI.setActionCommand(""+MOVE_ROI); moveROI.addActionListener(this); sizeROI.setActionCommand(""+SIZE_ROI); sizeROI.addActionListener(this); analyze.setActionCommand(""+ANALYSE); analyze.addActionListener(this); undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this); //ComboBox JComboBox colorsBox = view.getColors(), channelsBox = view.getChannels(); colorsBox.addActionListener(this); colorsBox.setActionCommand(""+COLOR); channelsBox.addActionListener(this); channelsBox.setActionCommand(""+CHANNEL); //Box JCheckBox drawOnOff = view.getDrawOnOff(), textOnOff = view.getTextOnOff(), annotationOnOff = view.getAnnotationOnOff(); drawOnOff.addActionListener(this); drawOnOff.setActionCommand(""+DRAW_ON_OFF); textOnOff.addActionListener(this); textOnOff.setActionCommand(""+TEXT_ON_OFF); annotationOnOff.addActionListener(this); annotationOnOff.setActionCommand(""+ANNOTATION_ON_OFF); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/ControlsManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/ControlsManager.java |
erase = view.getErase(), analyze = view.getAnalyse(), moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(), eraseAll = view.getEraseAll(), undoErase = view.getUndoErase(); | analyze = view.getAnalyse(); | private void attachListeners() { JButton rectangle = view.getRectangle(), ellipse = view.getEllipse(), erase = view.getErase(), analyze = view.getAnalyse(), moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(), eraseAll = view.getEraseAll(), undoErase = view.getUndoErase(); rectangle.setActionCommand(""+RECTANGLE); rectangle.addActionListener(this); ellipse.setActionCommand(""+ELLIPSE); ellipse.addActionListener(this); erase.setActionCommand(""+ERASE); erase.addActionListener(this); eraseAll.setActionCommand(""+ERASE_ALL); eraseAll.addActionListener(this); moveROI.setActionCommand(""+MOVE_ROI); moveROI.addActionListener(this); sizeROI.setActionCommand(""+SIZE_ROI); sizeROI.addActionListener(this); analyze.setActionCommand(""+ANALYSE); analyze.addActionListener(this); undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this); //ComboBox JComboBox colorsBox = view.getColors(), channelsBox = view.getChannels(); colorsBox.addActionListener(this); colorsBox.setActionCommand(""+COLOR); channelsBox.addActionListener(this); channelsBox.setActionCommand(""+CHANNEL); //Box JCheckBox drawOnOff = view.getDrawOnOff(), textOnOff = view.getTextOnOff(), annotationOnOff = view.getAnnotationOnOff(); drawOnOff.addActionListener(this); drawOnOff.setActionCommand(""+DRAW_ON_OFF); textOnOff.addActionListener(this); textOnOff.setActionCommand(""+TEXT_ON_OFF); annotationOnOff.addActionListener(this); annotationOnOff.setActionCommand(""+ANNOTATION_ON_OFF); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/ControlsManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/ControlsManager.java |
erase.setActionCommand(""+ERASE); erase.addActionListener(this); eraseAll.setActionCommand(""+ERASE_ALL); eraseAll.addActionListener(this); moveROI.setActionCommand(""+MOVE_ROI); moveROI.addActionListener(this); sizeROI.setActionCommand(""+SIZE_ROI); sizeROI.addActionListener(this); | private void attachListeners() { JButton rectangle = view.getRectangle(), ellipse = view.getEllipse(), erase = view.getErase(), analyze = view.getAnalyse(), moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(), eraseAll = view.getEraseAll(), undoErase = view.getUndoErase(); rectangle.setActionCommand(""+RECTANGLE); rectangle.addActionListener(this); ellipse.setActionCommand(""+ELLIPSE); ellipse.addActionListener(this); erase.setActionCommand(""+ERASE); erase.addActionListener(this); eraseAll.setActionCommand(""+ERASE_ALL); eraseAll.addActionListener(this); moveROI.setActionCommand(""+MOVE_ROI); moveROI.addActionListener(this); sizeROI.setActionCommand(""+SIZE_ROI); sizeROI.addActionListener(this); analyze.setActionCommand(""+ANALYSE); analyze.addActionListener(this); undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this); //ComboBox JComboBox colorsBox = view.getColors(), channelsBox = view.getChannels(); colorsBox.addActionListener(this); colorsBox.setActionCommand(""+COLOR); channelsBox.addActionListener(this); channelsBox.setActionCommand(""+CHANNEL); //Box JCheckBox drawOnOff = view.getDrawOnOff(), textOnOff = view.getTextOnOff(), annotationOnOff = view.getAnnotationOnOff(); drawOnOff.addActionListener(this); drawOnOff.setActionCommand(""+DRAW_ON_OFF); textOnOff.addActionListener(this); textOnOff.setActionCommand(""+TEXT_ON_OFF); annotationOnOff.addActionListener(this); annotationOnOff.setActionCommand(""+ANNOTATION_ON_OFF); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/ControlsManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/ControlsManager.java |
|
undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this); | private void attachListeners() { JButton rectangle = view.getRectangle(), ellipse = view.getEllipse(), erase = view.getErase(), analyze = view.getAnalyse(), moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(), eraseAll = view.getEraseAll(), undoErase = view.getUndoErase(); rectangle.setActionCommand(""+RECTANGLE); rectangle.addActionListener(this); ellipse.setActionCommand(""+ELLIPSE); ellipse.addActionListener(this); erase.setActionCommand(""+ERASE); erase.addActionListener(this); eraseAll.setActionCommand(""+ERASE_ALL); eraseAll.addActionListener(this); moveROI.setActionCommand(""+MOVE_ROI); moveROI.addActionListener(this); sizeROI.setActionCommand(""+SIZE_ROI); sizeROI.addActionListener(this); analyze.setActionCommand(""+ANALYSE); analyze.addActionListener(this); undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this); //ComboBox JComboBox colorsBox = view.getColors(), channelsBox = view.getChannels(); colorsBox.addActionListener(this); colorsBox.setActionCommand(""+COLOR); channelsBox.addActionListener(this); channelsBox.setActionCommand(""+CHANNEL); //Box JCheckBox drawOnOff = view.getDrawOnOff(), textOnOff = view.getTextOnOff(), annotationOnOff = view.getAnnotationOnOff(); drawOnOff.addActionListener(this); drawOnOff.setActionCommand(""+DRAW_ON_OFF); textOnOff.addActionListener(this); textOnOff.setActionCommand(""+TEXT_ON_OFF); annotationOnOff.addActionListener(this); annotationOnOff.setActionCommand(""+ANNOTATION_ON_OFF); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/ControlsManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/ControlsManager.java |
|
JCheckBox drawOnOff = view.getDrawOnOff(), textOnOff = view.getTextOnOff(), | JCheckBox textOnOff = view.getTextOnOff(), | private void attachListeners() { JButton rectangle = view.getRectangle(), ellipse = view.getEllipse(), erase = view.getErase(), analyze = view.getAnalyse(), moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(), eraseAll = view.getEraseAll(), undoErase = view.getUndoErase(); rectangle.setActionCommand(""+RECTANGLE); rectangle.addActionListener(this); ellipse.setActionCommand(""+ELLIPSE); ellipse.addActionListener(this); erase.setActionCommand(""+ERASE); erase.addActionListener(this); eraseAll.setActionCommand(""+ERASE_ALL); eraseAll.addActionListener(this); moveROI.setActionCommand(""+MOVE_ROI); moveROI.addActionListener(this); sizeROI.setActionCommand(""+SIZE_ROI); sizeROI.addActionListener(this); analyze.setActionCommand(""+ANALYSE); analyze.addActionListener(this); undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this); //ComboBox JComboBox colorsBox = view.getColors(), channelsBox = view.getChannels(); colorsBox.addActionListener(this); colorsBox.setActionCommand(""+COLOR); channelsBox.addActionListener(this); channelsBox.setActionCommand(""+CHANNEL); //Box JCheckBox drawOnOff = view.getDrawOnOff(), textOnOff = view.getTextOnOff(), annotationOnOff = view.getAnnotationOnOff(); drawOnOff.addActionListener(this); drawOnOff.setActionCommand(""+DRAW_ON_OFF); textOnOff.addActionListener(this); textOnOff.setActionCommand(""+TEXT_ON_OFF); annotationOnOff.addActionListener(this); annotationOnOff.setActionCommand(""+ANNOTATION_ON_OFF); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/ControlsManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/ControlsManager.java |
drawOnOff.addActionListener(this); drawOnOff.setActionCommand(""+DRAW_ON_OFF); | private void attachListeners() { JButton rectangle = view.getRectangle(), ellipse = view.getEllipse(), erase = view.getErase(), analyze = view.getAnalyse(), moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(), eraseAll = view.getEraseAll(), undoErase = view.getUndoErase(); rectangle.setActionCommand(""+RECTANGLE); rectangle.addActionListener(this); ellipse.setActionCommand(""+ELLIPSE); ellipse.addActionListener(this); erase.setActionCommand(""+ERASE); erase.addActionListener(this); eraseAll.setActionCommand(""+ERASE_ALL); eraseAll.addActionListener(this); moveROI.setActionCommand(""+MOVE_ROI); moveROI.addActionListener(this); sizeROI.setActionCommand(""+SIZE_ROI); sizeROI.addActionListener(this); analyze.setActionCommand(""+ANALYSE); analyze.addActionListener(this); undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this); //ComboBox JComboBox colorsBox = view.getColors(), channelsBox = view.getChannels(); colorsBox.addActionListener(this); colorsBox.setActionCommand(""+COLOR); channelsBox.addActionListener(this); channelsBox.setActionCommand(""+CHANNEL); //Box JCheckBox drawOnOff = view.getDrawOnOff(), textOnOff = view.getTextOnOff(), annotationOnOff = view.getAnnotationOnOff(); drawOnOff.addActionListener(this); drawOnOff.setActionCommand(""+DRAW_ON_OFF); textOnOff.addActionListener(this); textOnOff.setActionCommand(""+TEXT_ON_OFF); annotationOnOff.addActionListener(this); annotationOnOff.setActionCommand(""+ANNOTATION_ON_OFF); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a24f0694b3b2688b3654418621643358ae3daa4/ControlsManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/pane/ControlsManager.java |
|
else gradPanel.setEnabled(true); | else { gradPanel.setEnabled(true); modeBar.setEnabled(true); } | private void buildUI() { setLayout(new BorderLayout()); JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); treePanel.addListener(new HeatMapTreeListener() { public void nodeSelected(SemanticTypeTree.TreeNode node) { if(!(node instanceof SemanticTypeTree.ElementNode)) { gradPanel.setEnabled(false); } else gradPanel.setEnabled(true); } }); JScrollPane scrollPane = new JScrollPane(treePanel); scrollPane.setPreferredSize(new Dimension(250,200)); scrollPane.setSize(new Dimension(250,200)); mainPanel.add(scrollPane,BorderLayout.CENTER); JPanel controlPanel = new JPanel(); gradPanel.setPreferredSize(new Dimension(250,90)); gradPanel.setSize(new Dimension(250,90)); gradPanel.setEnabled(false); controlPanel.setLayout(new BorderLayout()); controlPanel.add(gradPanel,BorderLayout.CENTER); JPanel barPanel = new JPanel(); barPanel.setLayout(new BorderLayout()); barPanel.add(graphPanel,BorderLayout.NORTH); barPanel.add(modeBar,BorderLayout.CENTER); JPanel scalePanel = new JPanel(); scalePanel.add(scaleBar,BorderLayout.CENTER); controlPanel.add(barPanel,BorderLayout.NORTH); controlPanel.add(scalePanel,BorderLayout.SOUTH); mainPanel.add(controlPanel,BorderLayout.SOUTH); add(mainPanel,BorderLayout.CENTER); add(statusPanel,BorderLayout.SOUTH); statusPanel.showMessage("Dataset attributes loaded."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bb13c9484826e4d7b149c8ce9e1aa9a3fc55a6d2/HeatMapUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapUI.java |
scaleBar.setEnabled(false); | private void buildUI() { setLayout(new BorderLayout()); JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); treePanel.addListener(new HeatMapTreeListener() { public void nodeSelected(SemanticTypeTree.TreeNode node) { if(!(node instanceof SemanticTypeTree.ElementNode)) { gradPanel.setEnabled(false); } else gradPanel.setEnabled(true); } }); JScrollPane scrollPane = new JScrollPane(treePanel); scrollPane.setPreferredSize(new Dimension(250,200)); scrollPane.setSize(new Dimension(250,200)); mainPanel.add(scrollPane,BorderLayout.CENTER); JPanel controlPanel = new JPanel(); gradPanel.setPreferredSize(new Dimension(250,90)); gradPanel.setSize(new Dimension(250,90)); gradPanel.setEnabled(false); controlPanel.setLayout(new BorderLayout()); controlPanel.add(gradPanel,BorderLayout.CENTER); JPanel barPanel = new JPanel(); barPanel.setLayout(new BorderLayout()); barPanel.add(graphPanel,BorderLayout.NORTH); barPanel.add(modeBar,BorderLayout.CENTER); JPanel scalePanel = new JPanel(); scalePanel.add(scaleBar,BorderLayout.CENTER); controlPanel.add(barPanel,BorderLayout.NORTH); controlPanel.add(scalePanel,BorderLayout.SOUTH); mainPanel.add(controlPanel,BorderLayout.SOUTH); add(mainPanel,BorderLayout.CENTER); add(statusPanel,BorderLayout.SOUTH); statusPanel.showMessage("Dataset attributes loaded."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bb13c9484826e4d7b149c8ce9e1aa9a3fc55a6d2/HeatMapUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapUI.java |
|
else gradPanel.setEnabled(true); | else { gradPanel.setEnabled(true); modeBar.setEnabled(true); } | public void nodeSelected(SemanticTypeTree.TreeNode node) { if(!(node instanceof SemanticTypeTree.ElementNode)) { gradPanel.setEnabled(false); } else gradPanel.setEnabled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bb13c9484826e4d7b149c8ce9e1aa9a3fc55a6d2/HeatMapUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapUI.java |
RbNumeric.createNumericClass(this); | numericClass = RbNumeric.createNumericClass(this); integerClass = RbInteger.createIntegerClass(this); | private void initializeCoreClasses() { RubyClass metaClass; objectClass = defineBootClass("Object", null); moduleClass = defineBootClass("Module", objectClass); classClass = defineBootClass("Class", moduleClass); metaClass = classClass.newSingletonClass(); objectClass.setRubyClass(metaClass); metaClass.attachSingletonClass(objectClass); metaClass = metaClass.newSingletonClass(); moduleClass.setRubyClass(metaClass); metaClass.attachSingletonClass(moduleClass); metaClass = metaClass.newSingletonClass(); classClass.setRubyClass(metaClass); metaClass.attachSingletonClass(classClass); RubyModule kernelModule = RBKernel.createKernelModule(this); objectClass.includeModule(kernelModule); objectClass.definePrivateMethod("initialize", DefaultCallbackMethods.getMethodNil()); classClass.definePrivateMethod("inherited", DefaultCallbackMethods.getMethodNil()); /* * * Ruby's Class Hierarchy Chart * * +------------------+ * | | * Object---->(Object) | * ^ ^ ^ ^ | * | | | | | * | | +-----+ +---------+ | * | | | | | * | +-----------+ | | * | | | | | * +------+ | Module--->(Module) | * | | ^ ^ | * OtherClass-->(OtherClass) | | | * | | | * Class---->(Class) | * ^ | * | | * +----------------+ * * + All metaclasses are instances of the class `Class'. */ RbObject.initObjectClass(objectClass); RbClass.initClassClass(classClass); nilClass = RbNilClass.createNilClass(this); falseClass = RbFalseClass.createFalseClass(this); trueClass = RbTrueClass.createTrueClass(this); RbComparable.createComparable(this); RbNumeric.createNumericClass(this); fixnumClass = RbFixnum.createFixnum(this); floatClass = RbFloat.createFloat(this); stringClass = RbString.createStringClass(this); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f1e2c45b99e6f9a2be3f15f5fd7ad91c7e086a2c/Ruby.java/buggy/org/jruby/Ruby.java |
ImageIcon addUserIcon = new ImageIcon("graphx/addUser_kusers_nuvola48_mod3.png"); ImageIcon removeUserIcon = new ImageIcon("graphx/removeUser_kusers_nuvola48_mod3.png"); ImageIcon addGroupIcon = new ImageIcon("graphx/1rightarrow_nuvola32.png"); ImageIcon removeGroupIcon = new ImageIcon("graphx/1leftarrow_nuvola32.png"); ImageIcon defaultGroupIcon = new ImageIcon("graphx/kgpg_identity_nuvola32.png"); | ImageIcon addUserIcon = new ImageIcon("resources/graphx/addUser_kusers_nuvola48_mod3.png"); ImageIcon removeUserIcon = new ImageIcon("resources/graphx/removeUser_kusers_nuvola48_mod3.png"); ImageIcon addGroupIcon = new ImageIcon("resources/graphx/1rightarrow_nuvola32.png"); ImageIcon removeGroupIcon = new ImageIcon("resources/graphx/1leftarrow_nuvola32.png"); ImageIcon defaultGroupIcon = new ImageIcon("resources/graphx/kgpg_identity_nuvola32.png"); | void createActionButtons() { ImageIcon addUserIcon = new ImageIcon("graphx/addUser_kusers_nuvola48_mod3.png"); ImageIcon removeUserIcon = new ImageIcon("graphx/removeUser_kusers_nuvola48_mod3.png"); ImageIcon addGroupIcon = new ImageIcon("graphx/1rightarrow_nuvola32.png"); ImageIcon removeGroupIcon = new ImageIcon("graphx/1leftarrow_nuvola32.png"); ImageIcon defaultGroupIcon = new ImageIcon("graphx/kgpg_identity_nuvola32.png"); saveBtn = new JButton("Save"); resetPasswordBtn = new JButton("Reset Password"); setSystemBtn = new JButton("Set System User"); addUserBtn = new JButton(addUserIcon); removeUserBtn = new JButton(removeUserIcon); addToGroupBtn = new JButton(addGroupIcon); removeFromGroupBtn = new JButton(removeGroupIcon); setDefaultBtn = new JButton(defaultGroupIcon); setDefaultBtn.setToolTipText("Set Default Group"); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c24ebf508ce40c35b2c509bdba29698588ce1204/UsersTab.java/clean/components/tools/admin/src/adminTool/usersPanel/UsersTab.java |
if("**".equals(pattern)) { matchingFiles.add(parent); } | private static Collection getMatchingFiles(final NormalizedFile parent, final String pattern, final boolean isDirectory) { String expandedPattern = glob2Regexp(pattern); if (expandedPattern == null) expandedPattern = pattern; final Pattern p = Pattern.compile(expandedPattern); FileFilter filter = new FileFilter() { public boolean accept(File pathname) { return (pathname.isDirectory() || !isDirectory) && p.matcher(pathname.getName()).matches(); } }; NormalizedFile[] matchArray = (NormalizedFile[])parent.listFiles(filter); Collection matchingFiles = new ArrayList(); if (matchArray != null) { for (int i = 0; i < matchArray.length; i++) { matchingFiles.add(matchArray[i]); if (pattern.equals("**")) { // recurse into dirs if (matchArray[i].isDirectory()) { matchingFiles.addAll(getMatchingFiles(matchArray[i], pattern, isDirectory)); } } } } return matchingFiles; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af1258a07bbbc0c9b6889f622bf9fee6fcc23cf3/Glob.java/buggy/src/org/jruby/util/Glob.java |
|
ArrayList allMatchedNames = new ArrayList(); | Collection allMatchedNames = new TreeSet(); | public String[] getNames() { try { getFiles(); } catch (PatternSyntaxException e) { System.out.println("BAD PATTERN: " + e.getPattern()); // This can happen if someone does Dir.glob("{") or similiar. return new String[] {}; } ArrayList allMatchedNames = new ArrayList(); for (Iterator iter = patterns.iterator(); iter.hasNext();) { GlobPattern pattern = (GlobPattern) iter.next(); allMatchedNames.addAll(pattern.getMatchedFiles()); } return (String[]) allMatchedNames.toArray(new String[allMatchedNames.size()]); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af1258a07bbbc0c9b6889f622bf9fee6fcc23cf3/Glob.java/buggy/src/org/jruby/util/Glob.java |
long id1 = target.createId(o1); long id2 = target.createId(o2); | long id1 = target.idOf(o1); long id2 = target.idOf(o2); | public void testIdentities() { RubyString o1 = runtime.newString("hey"); RubyString o2 = runtime.newString("ho"); long id1 = target.createId(o1); long id2 = target.createId(o2); assertEquals("id of normal objects must be even", 0, id1 % 2); assertEquals("id of normal objects must be even", 0, id2 % 2); assertTrue("normal ids must be bigger than reserved values", id1 > 4); assertTrue("normal ids must be bigger than reserved values", id2 > 4); assertSame(o1, target.id2ref(id1)); assertSame(o2, target.id2ref(id2)); assertNull(target.id2ref(4711)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/250878be8c9efe07e17604ffe3f6f53c3d98a3e1/TestObjectSpace.java/clean/test/org/jruby/test/TestObjectSpace.java |
assertEquals(null, strings.next()); | assertNull(strings.next()); | public void testObjectSpace() { IRubyObject o1 = runtime.newFixnum(10); IRubyObject o2 = runtime.newFixnum(20); IRubyObject o3 = runtime.newFixnum(30); IRubyObject o4 = runtime.newString("hello"); target.add(o1); target.add(o2); target.add(o3); target.add(o4); List storedFixnums = new ArrayList(3); storedFixnums.add(o1); storedFixnums.add(o2); storedFixnums.add(o3); Iterator strings = target.iterator(runtime.getString()); assertSame(o4, strings.next()); assertEquals(null, strings.next()); Iterator numerics = target.iterator(runtime.getClass("Numeric")); for (int i = 0; i < 3; i++) { Object item = numerics.next(); assertTrue(storedFixnums.contains(item)); } assertEquals(null, numerics.next()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/250878be8c9efe07e17604ffe3f6f53c3d98a3e1/TestObjectSpace.java/clean/test/org/jruby/test/TestObjectSpace.java |
assertEquals(null, numerics.next()); | assertNull(numerics.next()); | public void testObjectSpace() { IRubyObject o1 = runtime.newFixnum(10); IRubyObject o2 = runtime.newFixnum(20); IRubyObject o3 = runtime.newFixnum(30); IRubyObject o4 = runtime.newString("hello"); target.add(o1); target.add(o2); target.add(o3); target.add(o4); List storedFixnums = new ArrayList(3); storedFixnums.add(o1); storedFixnums.add(o2); storedFixnums.add(o3); Iterator strings = target.iterator(runtime.getString()); assertSame(o4, strings.next()); assertEquals(null, strings.next()); Iterator numerics = target.iterator(runtime.getClass("Numeric")); for (int i = 0; i < 3; i++) { Object item = numerics.next(); assertTrue(storedFixnums.contains(item)); } assertEquals(null, numerics.next()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/250878be8c9efe07e17604ffe3f6f53c3d98a3e1/TestObjectSpace.java/clean/test/org/jruby/test/TestObjectSpace.java |
} | } public void setPosition(ISourcePosition position) { | public void setPosition(String file, int line) { setPosition(new DefaultLexerPosition(file, line, 0)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/071973606d94103b2d5cb6c793aa1e8809fc7b2a/Ruby.java/buggy/org/jruby/Ruby.java |
utf8stream = new ByteArrayInputStream(article.getBytes("UTF-8")); | public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; }// if (getBody().trim().equals("")) {// addErrorKey(KEY_ERROR_BODY_EMPTY);// storeOk = false;// } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// } if(storeOk){ try { IWUserContext iwuc = IWContext.getInstance(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); WebdavRootResource rootResource = session.getWebdavRootResource(); //Setting the path for creating new file/creating localized version/updating existing file String filePath=getResourcePath(); String articleFolderPath=getArticlePath(); if(articleFolderPath!=null) { filePath=articleFolderPath+"/"+getArticleName(); }else { filePath=getArticleResourcePath(); articleFolderPath = getArticlePath(); } boolean hadToCreate = session.createAllFoldersInPath(articleFolderPath); if(hadToCreate){ String fixedFolderURL = session.getURI(articleFolderPath); rootResource.proppatchMethod(fixedFolderURL,PROPERTY_CONTENT_TYPE,"LocalizedFile",true); } else{ rootResource.proppatchMethod(articleFolderPath,PROPERTY_CONTENT_TYPE,"LocalizedFile",true); } String article = getAsXML(); ByteArrayInputStream utf8stream = new ByteArrayInputStream(article.getBytes("UTF-8")); // System.out.println(article); //Conflict fix: uri for creating but path for updating //Note! This is a patch to what seems to be a bug in WebDav //Apparently in verion below works in some cases and the other in other cases. //Seems to be connected to creating files in folders created in same tomcat session or similar //not quite clear... if(rootResource.putMethod(filePath,utf8stream)){ rootResource.proppatchMethod(filePath,PROPERTY_CONTENT_TYPE,ARTICLE_FILENAME_SCOPE,true); } else{ String fixedURL = session.getURI(filePath); rootResource.putMethod(fixedURL,utf8stream); rootResource.proppatchMethod(fixedURL,PROPERTY_CONTENT_TYPE,ARTICLE_FILENAME_SCOPE,true); } rootResource.close(); try { load(filePath); } catch (Exception e) { e.printStackTrace(); } } catch (IOException e1) { storeOk = false; e1.printStackTrace(); } catch (XMLException e) { storeOk = false; e.printStackTrace(); } } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/08534faa3f8f56f424f690a7cc0d1c29ad264cf6/ArticleItemBean.java/clean/src/java/com/idega/block/article/bean/ArticleItemBean.java |
|
x1 = leftBorder+(int) Math.abs(hBinAxis*(point.x1-minX)); y1 = TOP+height-Math.abs((vBinAxis*(int)(point.x2-minY))); | x1 = leftBorder+(int) Math.abs(hBin*(point.x1-minX)); y1 = TOP+height-(int) Math.abs(vBin*(point.x2-minY)); | private void drawCurves(Graphics2D g2D, int hFont) { Iterator j = ((values).keySet()).iterator(); Iterator k; Integer key; PlanePoint point; ArrayList list; int x0 = -1, x1 = -1, y0 = -1, y1 = -1; int c = 0; while (j.hasNext()) { key = (Integer) j.next(); g2D.setColor((Color) valuesRef.get(key)); drawLegend(g2D, key.intValue(), c, hFont/4); list = (ArrayList) values.get(key); k = list.iterator(); while (k.hasNext()) { point = (PlanePoint) k.next(); x1 = leftBorder+(int) Math.abs(hBinAxis*(point.x1-minX)); //y1 = TOP+height-(int) (vBinAxis*(int)(point.x2-minY)); y1 = TOP+height-Math.abs((vBinAxis*(int)(point.x2-minY))); if (x0 != -1 && y0 != -1) g2D.drawLine(x0, y0, x1, y1); x0 = x1; y0 = y1; } x0 = -1; y0 = -1; c++; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/GraphicCanvas.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/graphic/GraphicCanvas.java |
return _criteria != null ? _criteria.list() : | return unique ? _criteria.uniqueResult() : | public Object doInHibernate(Session session) throws HibernateException, SQLException { try { enableFilters(session); buildQuery(session); if ( _query == null && _criteria == null ) { throw new IllegalStateException( "buildQuery did not properly define a Query or " + "Criteria\n by calling setQuery() or setCriteria()." ); } boolean unique = params.getFilter().isUnique(); if ( _query != null ) { _query.setFirstResult( params.getFilter().firstResult() ); _query.setMaxResults( params.getFilter().maxResults() ); return unique ? _query.uniqueResult() : _query.list(); } else { _criteria.setFirstResult( params.getFilter().firstResult() ); _criteria.setMaxResults( params.getFilter().maxResults() ); return _criteria != null ? _criteria.list() : _criteria.list(); } } finally { disableFilters(session); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0039ef3c66932163f0ec9bfa2b7f37eaa70abe47/Query.java/clean/components/server/src/ome/services/query/Query.java |
if (descriptor.getWriteMethod() != null) { String name = descriptor.getName(); if (name.equals(localName)) { return descriptor; } | String name = descriptor.getName(); if (name.equals(localName)) { return descriptor; | protected PropertyDescriptor getPropertyDescriptor(String className, String localName) { BeanInfo beanInfo = getBeanInfo(className); if (beanInfo != null) { PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors(); for (int i = 0; i < descriptors.length; i++) { PropertyDescriptor descriptor = descriptors[i]; if (descriptor.getWriteMethod() != null) { String name = descriptor.getName(); if (name.equals(localName)) { return descriptor; } } } } return null; } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/b05052e52d5df78c860e248c9008c7e71be70d95/XBeanXmlBeanDefinitionParser.java/clean/spring/src/java/org/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java |
return JavaUtil.convertRubyToJava(this, result.toRubyObject(), returnClass); | return JavaUtil.convertRubyToJava(this, result, returnClass); | public Object evalScript(String script, Class returnClass) { IRubyObject result = evalScript(script); return JavaUtil.convertRubyToJava(this, result.toRubyObject(), returnClass); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/Ruby.java/buggy/org/jruby/Ruby.java |
rubyTopSelf = new RubyObject(this, classes.getObjectClass()); | rubyTopSelf = getFactory().newObject(classes.getObjectClass()); | private void init() { getIterStack().push(Iter.ITER_NOT); getFrameStack().push(); topFrame = getCurrentFrame(); getScope().push(); topScope = currentScope(); setCurrentMethodScope(Constants.SCOPE_PRIVATE); try { classes = new RubyClasses(this); classes.initCoreClasses(); RubyGlobal.createGlobals(this); exceptions = new RubyExceptions(this); exceptions.initDefaultExceptionClasses(); rubyTopSelf = new RubyObject(this, classes.getObjectClass()); classStack.push(getClasses().getObjectClass()); getCurrentFrame().setSelf(rubyTopSelf); topNamespace = new Namespace(getClasses().getObjectClass()); namespace = topNamespace; getCurrentFrame().setNamespace(namespace); } catch (Exception excptn) { excptn.printStackTrace(); } getScope().pop(); getScope().push(topScope); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/Ruby.java/buggy/org/jruby/Ruby.java |
public static RubyBoolean between_p(Ruby ruby, RubyObject recv, RubyObject arg1, RubyObject arg2) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", arg1); if (fn.getValue() < 0) { | public static RubyBoolean between_p(Ruby ruby, RubyObject recv, RubyObject first, RubyObject second) { if (RubyNumeric.fix2int(recv.funcall("<=>", first)) < 0) { | public static RubyBoolean between_p(Ruby ruby, RubyObject recv, RubyObject arg1, RubyObject arg2) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", arg1); if (fn.getValue() < 0) { return ruby.getFalse(); } fn = (RubyFixnum) recv.funcall("<=>", arg2); if (fn.getValue() > 0) { return ruby.getFalse(); } return ruby.getTrue(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyComparable.java/clean/org/jruby/RubyComparable.java |
fn = (RubyFixnum) recv.funcall("<=>", arg2); if (fn.getValue() > 0) { return ruby.getFalse(); } return ruby.getTrue(); | public static RubyBoolean between_p(Ruby ruby, RubyObject recv, RubyObject arg1, RubyObject arg2) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", arg1); if (fn.getValue() < 0) { return ruby.getFalse(); } fn = (RubyFixnum) recv.funcall("<=>", arg2); if (fn.getValue() > 0) { return ruby.getFalse(); } return ruby.getTrue(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyComparable.java/clean/org/jruby/RubyComparable.java |
|
if (recv == other) { return ruby.getTrue(); } else { try { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() == 0); } catch (NameError rnExcptn) { return ruby.getFalse(); | try { if (recv == other) { return ruby.getTrue(); } else { return (RubyNumeric.fix2int(recv.funcall("<=>", other)) == 0) ? ruby.getTrue() : ruby.getFalse(); | public static RubyBoolean equal(Ruby ruby, RubyObject recv, RubyObject other) { if (recv == other) { return ruby.getTrue(); } else { try { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() == 0); } catch (NameError rnExcptn) { return ruby.getFalse(); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyComparable.java/clean/org/jruby/RubyComparable.java |
} catch (NameError rnExcptn) { return ruby.getFalse(); | public static RubyBoolean equal(Ruby ruby, RubyObject recv, RubyObject other) { if (recv == other) { return ruby.getTrue(); } else { try { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() == 0); } catch (NameError rnExcptn) { return ruby.getFalse(); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyComparable.java/clean/org/jruby/RubyComparable.java |
|
public ChannelComponent(Integer attributeId, Integer index, String colorDomain, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.ImagePixel imagePixel, org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.attributeId = attributeId; this.index = index; this.colorDomain = colorDomain; this.image = image; this.imagePixel = imagePixel; this.moduleExecution = moduleExecution; | public ChannelComponent() { | public ChannelComponent(Integer attributeId, Integer index, String colorDomain, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.ImagePixel imagePixel, org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.attributeId = attributeId; this.index = index; this.colorDomain = colorDomain; this.image = image; this.imagePixel = imagePixel; this.moduleExecution = moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/clean/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java |
public org.openmicroscopy.omero.model.Image getImage() { | public Image getImage() { | public org.openmicroscopy.omero.model.Image getImage() { return this.image; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/clean/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java |
public org.openmicroscopy.omero.model.ImagePixel getImagePixel() { | public ImagePixel getImagePixel() { | public org.openmicroscopy.omero.model.ImagePixel getImagePixel() { return this.imagePixel; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/clean/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java |
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { | public ModuleExecution getModuleExecution() { | public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { return this.moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/clean/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java |
public void setImage(org.openmicroscopy.omero.model.Image image) { | public void setImage(Image image) { | public void setImage(org.openmicroscopy.omero.model.Image image) { this.image = image; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/clean/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java |
public void setImagePixel(org.openmicroscopy.omero.model.ImagePixel imagePixel) { | public void setImagePixel(ImagePixel imagePixel) { | public void setImagePixel(org.openmicroscopy.omero.model.ImagePixel imagePixel) { this.imagePixel = imagePixel; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/clean/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java |
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { | public void setModuleExecution(ModuleExecution moduleExecution) { | public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/clean/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java |
setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); | setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); | private void buildUI() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); setBorder(BorderFactory.createEtchedBorder()); JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(statusButton); p.add(status); add(UIUtilities.buildComponentPanel(p)); JPanel progress = new JPanel(); progress.setLayout(new BoxLayout(progress, BoxLayout.X_AXIS)); progress.add(progressBar); IconManager icons = IconManager.getInstance(); progressLabel = new JLabel(icons.getIcon(IconManager.PROGRESS)); progress.add(progressLabel); add(UIUtilities.buildComponentPanelRight(progress)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d165d84615e7f90ee0847be9809fedfd2c53fadc/StatusBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/StatusBar.java |
JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(statusButton); p.add(status); add(UIUtilities.buildComponentPanel(p)); | add(status); | private void buildUI() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); setBorder(BorderFactory.createEtchedBorder()); JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(statusButton); p.add(status); add(UIUtilities.buildComponentPanel(p)); JPanel progress = new JPanel(); progress.setLayout(new BoxLayout(progress, BoxLayout.X_AXIS)); progress.add(progressBar); IconManager icons = IconManager.getInstance(); progressLabel = new JLabel(icons.getIcon(IconManager.PROGRESS)); progress.add(progressLabel); add(UIUtilities.buildComponentPanelRight(progress)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d165d84615e7f90ee0847be9809fedfd2c53fadc/StatusBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/StatusBar.java |
progressLabel = new JLabel(icons.getIcon(IconManager.PROGRESS)); progress.add(progressLabel); | progress.add(new JLabel(icons.getIcon(IconManager.PROGRESS))); | private void buildUI() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); setBorder(BorderFactory.createEtchedBorder()); JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(statusButton); p.add(status); add(UIUtilities.buildComponentPanel(p)); JPanel progress = new JPanel(); progress.setLayout(new BoxLayout(progress, BoxLayout.X_AXIS)); progress.add(progressBar); IconManager icons = IconManager.getInstance(); progressLabel = new JLabel(icons.getIcon(IconManager.PROGRESS)); progress.add(progressLabel); add(UIUtilities.buildComponentPanelRight(progress)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d165d84615e7f90ee0847be9809fedfd2c53fadc/StatusBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/StatusBar.java |
status = new JLabel(); statusButton = new JButton(icons.getIcon(IconManager.INFO)); statusButton.setBorder(null); statusButton.setBorderPainted(false); statusButton.setFocusPainted(false); statusButton.setOpaque(false); | status = new JLabel(icons.getIcon(IconManager.INFO)); | private void initComponents() { IconManager icons = IconManager.getInstance(); progressBar = new JProgressBar(); progressBar.setIndeterminate(true); progressBar.setVisible(false); status = new JLabel(); statusButton = new JButton(icons.getIcon(IconManager.INFO)); statusButton.setBorder(null); statusButton.setBorderPainted(false); statusButton.setFocusPainted(false); statusButton.setOpaque(false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d165d84615e7f90ee0847be9809fedfd2c53fadc/StatusBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/StatusBar.java |
RubyClass newClass = new RubyClass(runtime, runtime.getClass("Class"), this, parentCRef, name); | RubyClass classClass = runtime.getClass("Class"); if (this == classClass) { throw runtime.newTypeError("can't make subclass of Class"); } else if (this instanceof MetaClass) { throw runtime.newTypeError("can't make subclass of virtual class"); } RubyClass newClass = new RubyClass(runtime, classClass, this, parentCRef, name); | public RubyClass newSubClass(String name, SinglyLinkedList parentCRef) { RubyClass newClass = new RubyClass(runtime, runtime.getClass("Class"), this, parentCRef, name); newClass.makeMetaClass(getMetaClass(), newClass.getCRef()); newClass.inheritedBy(this); ((RubyModule)parentCRef.getValue()).setConstant(name, newClass); return newClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8bc77fd935108392c0bf8a671462f28f423e48c1/RubyClass.java/buggy/src/org/jruby/RubyClass.java |
System.setProperty("user.dir", getDir(recv.getRuntime(), path.toString()).toString()); | File dir = getDir(recv.getRuntime(), path.toString()); String realPath = null; try { realPath = dir.getCanonicalPath(); } catch (IOException e) { realPath = dir.getAbsolutePath(); } System.setProperty("user.dir", realPath); | public static IRubyObject chdir(IRubyObject recv, RubyString path) { System.setProperty("user.dir", getDir(recv.getRuntime(), path.toString()).toString()); return RubyFixnum.newFixnum(recv.getRuntime(), 0); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
return this; | isOpen = false; return getRuntime().getNil(); | public IRubyObject close() { // I don't think we need to close since we don't actually have // an open stream... return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
List fileList = getContents(new File(path.toString())); | File directory = new File(path.toString()); if (directory.isDirectory() == false) { throw ErrnoError.getErrnoError(recv.getRuntime(), "ENOENT", "No such directory"); } List fileList = getContents(directory); | public static RubyArray entries(IRubyObject recv, RubyString path) { if (".".equals(path.toString().trim())) { path = new RubyString(recv.getRuntime(), System.getProperty("user.dir")); } List fileList = getContents(new File(path.toString())); fileList.add(0,"."); fileList.add(1,".."); Object[] files = fileList.toArray(); return RubyArray.newArray(recv.getRuntime(), JavaUtil.convertJavaArrayToRuby(recv.getRuntime(), files)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
public static IRubyObject foreach(IRubyObject recv, RubyString path) { path.checkSafeString(); RubyDir dir = (RubyDir) newInstance(recv.getRuntime().getClass("Dir"), new IRubyObject[] { path }); dir.each(); return recv.getRuntime().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
||
String[] contents = directory.list(); | protected static List getContents(File directory) { List result = new ArrayList(); String[] contents = directory.list(); for (int i=0; i<contents.length; i++) { result.add(contents[i]); } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
|
throw new IOError(ruby, path + " is not a directory"); | throw ErrnoError.getErrnoError(ruby, "ENOENT", path + " is not a directory"); | protected static File getDir(Ruby ruby, String path) { File result = new File(path); if (!result.isDirectory()) { throw new IOError(ruby, path + " is not a directory"); } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
path = null; | public IRubyObject initialize(RubyString path) { path.checkSafeString(); dir = new File(path.getValue()); if (!dir.isDirectory()) { path = null; dir = null; throw new IOError(getRuntime(), path.getValue() + " is not a directory"); } List snapshotList = new ArrayList(); snapshotList.add("."); snapshotList.add(".."); snapshotList.addAll(getContents(dir)); snapshot = (String[]) snapshotList.toArray(new String[snapshotList.size()]); pos = 0; return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
|
throw new IOError(getRuntime(), path.getValue() + " is not a directory"); | throw ErrnoError.getErrnoError(getRuntime(), "ENOENT", path.getValue() + " is not a directory"); | public IRubyObject initialize(RubyString path) { path.checkSafeString(); dir = new File(path.getValue()); if (!dir.isDirectory()) { path = null; dir = null; throw new IOError(getRuntime(), path.getValue() + " is not a directory"); } List snapshotList = new ArrayList(); snapshotList.add("."); snapshotList.add(".."); snapshotList.addAll(getContents(dir)); snapshot = (String[]) snapshotList.toArray(new String[snapshotList.size()]); pos = 0; return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
return RubyBoolean.newBoolean(recv.getRuntime(), newDir.mkdir()); | return newDir.mkdir() ? RubyFixnum.zero(recv.getRuntime()) : RubyFixnum.one(recv.getRuntime()); | public static IRubyObject mkdir(IRubyObject recv, IRubyObject[] args) { if (args.length < 1) { throw new ArgumentError(recv.getRuntime(), args.length, 1); } if (args.length > 2) { throw new ArgumentError(recv.getRuntime(), args.length, 2); } args[0].checkSafeString(); String path = args[0].toString(); File newDir = new File(path); if (newDir.exists()) { throw new IOError(recv.getRuntime(), path + " already exists"); } return RubyBoolean.newBoolean(recv.getRuntime(), newDir.mkdir()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
throw new NotImplementedError(recv.getRuntime()); | RubyDir directory = (RubyDir) newInstance(recv.getRuntime().getClasses().getDirClass(), new IRubyObject[] { path }); if (recv.getRuntime().isBlockGiven()) { try { recv.getRuntime().yield(directory); } finally { directory.close(); } return recv.getRuntime().getNil(); } return directory; | public static IRubyObject open(IRubyObject recv, RubyString path) { throw new NotImplementedError(recv.getRuntime()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
if (isOpen == false) { throw new IOError(getRuntime(), "Directory already closed"); } | public RubyString read() { if (pos >= snapshot.length) { return RubyString.nilString(runtime); } RubyString result = new RubyString(getRuntime(), snapshot[pos]); pos++; return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
|
new File(path.toString()).delete(); | File directory = new File(path.toString()); if (directory.delete() == false) { throw new SystemCallError(recv.getRuntime(), "No such directory"); } | public static IRubyObject rmdir(IRubyObject recv, RubyString path) { new File(path.toString()).delete(); return RubyFixnum.newFixnum(recv.getRuntime(), 0); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/RubyDir.java/buggy/src/org/jruby/RubyDir.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.