rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
SwingUtilities.invokeLater(new Runnable() { public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasNext()) { String jid = (String)jids.next(); RosterEntry rosterEntry = roster.getEntry(jid); if (rosterEntry != null) { boolean isUnfiled = true; for (RosterGroup group : rosterEntry.getGroups()) { isUnfiled = false; if (getContactGroup(group.getName()) == null) { ContactGroup contactGroup = addContactGroup(group.getName()); contactGroup.setVisible(false); contactGroup = getContactGroup(group.getName()); String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } ContactItem contactItem = new ContactItem(name, rosterEntry.getUser()); contactGroup.addContactItem(contactItem); Presence presence = roster.getPresence(jid); contactItem.setPresence(presence); if (presence != null) { contactGroup.setVisible(true); } } else { ContactGroup contactGroup = getContactGroup(group.getName()); ContactItem item = contactGroup.getContactItemByJID(jid); if (item == null) { String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } item = new ContactItem(name, rosterEntry.getUser()); Presence presence = roster.getPresence(jid); item.setPresence(presence); if (presence != null) { contactGroup.addContactItem(item); contactGroup.fireContactGroupUpdated(); } } else { Presence presence = roster.getPresence(jid); item.setPresence(presence); updateUserPresence(presence); contactGroup.fireContactGroupUpdated(); } } } Set groupSet = new HashSet(); jids = addresses.iterator(); while (jids.hasNext()) { jid = (String)jids.next(); rosterEntry = roster.getEntry(jid); for (RosterGroup g : rosterEntry.getGroups()) { groupSet.add(g.getName()); } for (ContactGroup group : new ArrayList<ContactGroup>(getContactGroups())) { if (group.getContactItemByJID(jid) != null && group != unfiledGroup && group != offlineGroup) { if (!groupSet.contains(group.getGroupName())) { removeContactGroup(group); } } } } if (!isUnfiled) { return; } ContactItem unfiledItem = unfiledGroup.getContactItemByJID(jid); if (unfiledItem != null) { } else { ContactItem offlineItem = offlineGroup.getContactItemByJID(jid); if (offlineItem != null) { if ((rosterEntry.getType() == RosterPacket.ItemType.NONE || rosterEntry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { offlineGroup.removeContactItem(offlineItem); unfiledGroup.addContactItem(offlineItem); unfiledGroup.fireContactGroupUpdated(); unfiledGroup.setVisible(true); } } } } } } });
handleEntriesUpdated(addresses);
public void entriesUpdated(final Collection addresses) { SwingUtilities.invokeLater(new Runnable() { public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasNext()) { String jid = (String)jids.next(); RosterEntry rosterEntry = roster.getEntry(jid); if (rosterEntry != null) { // Check for new Roster Groups and add them if they do not exist. boolean isUnfiled = true; for (RosterGroup group : rosterEntry.getGroups()) { isUnfiled = false; // Handle if this is a new Entry in a new Group. if (getContactGroup(group.getName()) == null) { // Create group. ContactGroup contactGroup = addContactGroup(group.getName()); contactGroup.setVisible(false); contactGroup = getContactGroup(group.getName()); String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } ContactItem contactItem = new ContactItem(name, rosterEntry.getUser()); contactGroup.addContactItem(contactItem); Presence presence = roster.getPresence(jid); contactItem.setPresence(presence); if (presence != null) { contactGroup.setVisible(true); } } else { ContactGroup contactGroup = getContactGroup(group.getName()); ContactItem item = contactGroup.getContactItemByJID(jid); // Check to see if this entry is new to a pre-existing group. if (item == null) { String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } item = new ContactItem(name, rosterEntry.getUser()); Presence presence = roster.getPresence(jid); item.setPresence(presence); if (presence != null) { contactGroup.addContactItem(item); contactGroup.fireContactGroupUpdated(); } } // If not, just update their presence. else { Presence presence = roster.getPresence(jid); item.setPresence(presence); updateUserPresence(presence); contactGroup.fireContactGroupUpdated(); } } } // Now check to see if groups have been modified or removed. This is used // to check if Contact Groups have been renamed or removed. Set groupSet = new HashSet(); jids = addresses.iterator(); while (jids.hasNext()) { jid = (String)jids.next(); rosterEntry = roster.getEntry(jid); for (RosterGroup g : rosterEntry.getGroups()) { groupSet.add(g.getName()); } for (ContactGroup group : new ArrayList<ContactGroup>(getContactGroups())) { if (group.getContactItemByJID(jid) != null && group != unfiledGroup && group != offlineGroup) { if (!groupSet.contains(group.getGroupName())) { removeContactGroup(group); } } } } if (!isUnfiled) { return; } ContactItem unfiledItem = unfiledGroup.getContactItemByJID(jid); if (unfiledItem != null) { } else { ContactItem offlineItem = offlineGroup.getContactItemByJID(jid); if (offlineItem != null) { if ((rosterEntry.getType() == RosterPacket.ItemType.NONE || rosterEntry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { // Remove from offlineItem and add to unfiledItem. offlineGroup.removeContactItem(offlineItem); unfiledGroup.addContactItem(offlineItem); unfiledGroup.fireContactGroupUpdated(); unfiledGroup.setVisible(true); } } } } } } }); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
Roster roster = SparkManager.getConnection().getRoster();
public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasNext()) { String jid = (String)jids.next(); RosterEntry rosterEntry = roster.getEntry(jid); if (rosterEntry != null) { // Check for new Roster Groups and add them if they do not exist. boolean isUnfiled = true; for (RosterGroup group : rosterEntry.getGroups()) { isUnfiled = false; // Handle if this is a new Entry in a new Group. if (getContactGroup(group.getName()) == null) { // Create group. ContactGroup contactGroup = addContactGroup(group.getName()); contactGroup.setVisible(false); contactGroup = getContactGroup(group.getName()); String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } ContactItem contactItem = new ContactItem(name, rosterEntry.getUser()); contactGroup.addContactItem(contactItem); Presence presence = roster.getPresence(jid); contactItem.setPresence(presence); if (presence != null) { contactGroup.setVisible(true); } } else { ContactGroup contactGroup = getContactGroup(group.getName()); ContactItem item = contactGroup.getContactItemByJID(jid); // Check to see if this entry is new to a pre-existing group. if (item == null) { String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } item = new ContactItem(name, rosterEntry.getUser()); Presence presence = roster.getPresence(jid); item.setPresence(presence); if (presence != null) { contactGroup.addContactItem(item); contactGroup.fireContactGroupUpdated(); } } // If not, just update their presence. else { Presence presence = roster.getPresence(jid); item.setPresence(presence); updateUserPresence(presence); contactGroup.fireContactGroupUpdated(); } } } // Now check to see if groups have been modified or removed. This is used // to check if Contact Groups have been renamed or removed. Set groupSet = new HashSet(); jids = addresses.iterator(); while (jids.hasNext()) { jid = (String)jids.next(); rosterEntry = roster.getEntry(jid); for (RosterGroup g : rosterEntry.getGroups()) { groupSet.add(g.getName()); } for (ContactGroup group : new ArrayList<ContactGroup>(getContactGroups())) { if (group.getContactItemByJID(jid) != null && group != unfiledGroup && group != offlineGroup) { if (!groupSet.contains(group.getGroupName())) { removeContactGroup(group); } } } } if (!isUnfiled) { return; } ContactItem unfiledItem = unfiledGroup.getContactItemByJID(jid); if (unfiledItem != null) { } else { ContactItem offlineItem = offlineGroup.getContactItemByJID(jid); if (offlineItem != null) { if ((rosterEntry.getType() == RosterPacket.ItemType.NONE || rosterEntry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { // Remove from offlineItem and add to unfiledItem. offlineGroup.removeContactItem(offlineItem); unfiledGroup.addContactItem(offlineItem); unfiledGroup.fireContactGroupUpdated(); unfiledGroup.setVisible(true); } } } } } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
RosterEntry rosterEntry = roster.getEntry(jid); if (rosterEntry != null) { boolean isUnfiled = true; for (RosterGroup group : rosterEntry.getGroups()) { isUnfiled = false; if (getContactGroup(group.getName()) == null) { ContactGroup contactGroup = addContactGroup(group.getName()); contactGroup.setVisible(false); contactGroup = getContactGroup(group.getName()); String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } ContactItem contactItem = new ContactItem(name, rosterEntry.getUser()); contactGroup.addContactItem(contactItem); Presence presence = roster.getPresence(jid); contactItem.setPresence(presence); if (presence != null) { contactGroup.setVisible(true); } } else { ContactGroup contactGroup = getContactGroup(group.getName()); ContactItem item = contactGroup.getContactItemByJID(jid); if (item == null) { String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } item = new ContactItem(name, rosterEntry.getUser()); Presence presence = roster.getPresence(jid); item.setPresence(presence); if (presence != null) { contactGroup.addContactItem(item); contactGroup.fireContactGroupUpdated(); } } else { Presence presence = roster.getPresence(jid); item.setPresence(presence); updateUserPresence(presence); contactGroup.fireContactGroupUpdated(); } } } Set groupSet = new HashSet(); jids = addresses.iterator(); while (jids.hasNext()) { jid = (String)jids.next(); rosterEntry = roster.getEntry(jid); for (RosterGroup g : rosterEntry.getGroups()) { groupSet.add(g.getName()); } for (ContactGroup group : new ArrayList<ContactGroup>(getContactGroups())) { if (group.getContactItemByJID(jid) != null && group != unfiledGroup && group != offlineGroup) { if (!groupSet.contains(group.getGroupName())) { removeContactGroup(group); } } } } if (!isUnfiled) { return; } ContactItem unfiledItem = unfiledGroup.getContactItemByJID(jid); if (unfiledItem != null) { } else { ContactItem offlineItem = offlineGroup.getContactItemByJID(jid); if (offlineItem != null) { if ((rosterEntry.getType() == RosterPacket.ItemType.NONE || rosterEntry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { offlineGroup.removeContactItem(offlineItem); unfiledGroup.addContactItem(offlineItem); unfiledGroup.fireContactGroupUpdated(); unfiledGroup.setVisible(true); } } } }
removeContactItem(jid);
public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasNext()) { String jid = (String)jids.next(); RosterEntry rosterEntry = roster.getEntry(jid); if (rosterEntry != null) { // Check for new Roster Groups and add them if they do not exist. boolean isUnfiled = true; for (RosterGroup group : rosterEntry.getGroups()) { isUnfiled = false; // Handle if this is a new Entry in a new Group. if (getContactGroup(group.getName()) == null) { // Create group. ContactGroup contactGroup = addContactGroup(group.getName()); contactGroup.setVisible(false); contactGroup = getContactGroup(group.getName()); String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } ContactItem contactItem = new ContactItem(name, rosterEntry.getUser()); contactGroup.addContactItem(contactItem); Presence presence = roster.getPresence(jid); contactItem.setPresence(presence); if (presence != null) { contactGroup.setVisible(true); } } else { ContactGroup contactGroup = getContactGroup(group.getName()); ContactItem item = contactGroup.getContactItemByJID(jid); // Check to see if this entry is new to a pre-existing group. if (item == null) { String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } item = new ContactItem(name, rosterEntry.getUser()); Presence presence = roster.getPresence(jid); item.setPresence(presence); if (presence != null) { contactGroup.addContactItem(item); contactGroup.fireContactGroupUpdated(); } } // If not, just update their presence. else { Presence presence = roster.getPresence(jid); item.setPresence(presence); updateUserPresence(presence); contactGroup.fireContactGroupUpdated(); } } } // Now check to see if groups have been modified or removed. This is used // to check if Contact Groups have been renamed or removed. Set groupSet = new HashSet(); jids = addresses.iterator(); while (jids.hasNext()) { jid = (String)jids.next(); rosterEntry = roster.getEntry(jid); for (RosterGroup g : rosterEntry.getGroups()) { groupSet.add(g.getName()); } for (ContactGroup group : new ArrayList<ContactGroup>(getContactGroups())) { if (group.getContactItemByJID(jid) != null && group != unfiledGroup && group != offlineGroup) { if (!groupSet.contains(group.getGroupName())) { removeContactGroup(group); } } } } if (!isUnfiled) { return; } ContactItem unfiledItem = unfiledGroup.getContactItemByJID(jid); if (unfiledItem != null) { } else { ContactItem offlineItem = offlineGroup.getContactItemByJID(jid); if (offlineItem != null) { if ((rosterEntry.getType() == RosterPacket.ItemType.NONE || rosterEntry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { // Remove from offlineItem and add to unfiledItem. offlineGroup.removeContactItem(offlineItem); unfiledGroup.addContactItem(offlineItem); unfiledGroup.fireContactGroupUpdated(); unfiledGroup.setVisible(true); } } } } } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
final JFrame dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkManager.getMainWindow().getIconImage()); JPanel layoutPanel = new JPanel();
final JPanel layoutPanel = new JPanel(); layoutPanel.setBackground(Color.white);
private void subscriptionRequest(final String jid) { final Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = jid + " would like to see your online presence and add you to their roster. Do you accept?"; final JFrame dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkManager.getMainWindow().getIconImage()); JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new GridBagLayout()); WrappedLabel messageLabel = new WrappedLabel(); messageLabel.setText(message); layoutPanel.add(messageLabel, new GridBagConstraints(0, 0, 5, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); JButton acceptButton = new JButton("Accept"); JButton viewInfoButton = new JButton("Profile"); JButton denyButton = new JButton("Deny"); layoutPanel.add(acceptButton, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(viewInfoButton, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(denyButton, new GridBagConstraints(4, 1, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dialog.dispose(); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), "Would you like to add the user to your roster?", "Add To Roster", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(jid); rosterDialog.showRosterDialog(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, getGUI()); } }); // show dialog dialog.getContentPane().add(layoutPanel); dialog.pack(); dialog.setSize(450, 125); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); SparkManager.getChatManager().getChatContainer().blinkFrameIfNecessary(dialog); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
JButton acceptButton = new JButton("Accept"); JButton viewInfoButton = new JButton("Profile"); JButton denyButton = new JButton("Deny");
RolloverButton acceptButton = new RolloverButton("Accept"); RolloverButton viewInfoButton = new RolloverButton("Profile"); RolloverButton denyButton = new RolloverButton("Deny");
private void subscriptionRequest(final String jid) { final Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = jid + " would like to see your online presence and add you to their roster. Do you accept?"; final JFrame dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkManager.getMainWindow().getIconImage()); JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new GridBagLayout()); WrappedLabel messageLabel = new WrappedLabel(); messageLabel.setText(message); layoutPanel.add(messageLabel, new GridBagConstraints(0, 0, 5, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); JButton acceptButton = new JButton("Accept"); JButton viewInfoButton = new JButton("Profile"); JButton denyButton = new JButton("Deny"); layoutPanel.add(acceptButton, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(viewInfoButton, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(denyButton, new GridBagConstraints(4, 1, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dialog.dispose(); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), "Would you like to add the user to your roster?", "Add To Roster", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(jid); rosterDialog.showRosterDialog(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, getGUI()); } }); // show dialog dialog.getContentPane().add(layoutPanel); dialog.pack(); dialog.setSize(450, 125); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); SparkManager.getChatManager().getChatContainer().blinkFrameIfNecessary(dialog); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
dialog.dispose();
SparkManager.getWorkspace().removeAlert(layoutPanel);
private void subscriptionRequest(final String jid) { final Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = jid + " would like to see your online presence and add you to their roster. Do you accept?"; final JFrame dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkManager.getMainWindow().getIconImage()); JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new GridBagLayout()); WrappedLabel messageLabel = new WrappedLabel(); messageLabel.setText(message); layoutPanel.add(messageLabel, new GridBagConstraints(0, 0, 5, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); JButton acceptButton = new JButton("Accept"); JButton viewInfoButton = new JButton("Profile"); JButton denyButton = new JButton("Deny"); layoutPanel.add(acceptButton, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(viewInfoButton, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(denyButton, new GridBagConstraints(4, 1, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dialog.dispose(); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), "Would you like to add the user to your roster?", "Add To Roster", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(jid); rosterDialog.showRosterDialog(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, getGUI()); } }); // show dialog dialog.getContentPane().add(layoutPanel); dialog.pack(); dialog.setSize(450, 125); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); SparkManager.getChatManager().getChatContainer().blinkFrameIfNecessary(dialog); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
dialog.dispose();
private void subscriptionRequest(final String jid) { final Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = jid + " would like to see your online presence and add you to their roster. Do you accept?"; final JFrame dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkManager.getMainWindow().getIconImage()); JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new GridBagLayout()); WrappedLabel messageLabel = new WrappedLabel(); messageLabel.setText(message); layoutPanel.add(messageLabel, new GridBagConstraints(0, 0, 5, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); JButton acceptButton = new JButton("Accept"); JButton viewInfoButton = new JButton("Profile"); JButton denyButton = new JButton("Deny"); layoutPanel.add(acceptButton, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(viewInfoButton, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(denyButton, new GridBagConstraints(4, 1, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dialog.dispose(); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), "Would you like to add the user to your roster?", "Add To Roster", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(jid); rosterDialog.showRosterDialog(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, getGUI()); } }); // show dialog dialog.getContentPane().add(layoutPanel); dialog.pack(); dialog.setSize(450, 125); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); SparkManager.getChatManager().getChatContainer().blinkFrameIfNecessary(dialog); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
dialog.getContentPane().add(layoutPanel); dialog.pack(); dialog.setSize(450, 125); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); SparkManager.getChatManager().getChatContainer().blinkFrameIfNecessary(dialog);
SparkManager.getWorkspace().addAlert(layoutPanel); SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow());
private void subscriptionRequest(final String jid) { final Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = jid + " would like to see your online presence and add you to their roster. Do you accept?"; final JFrame dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkManager.getMainWindow().getIconImage()); JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new GridBagLayout()); WrappedLabel messageLabel = new WrappedLabel(); messageLabel.setText(message); layoutPanel.add(messageLabel, new GridBagConstraints(0, 0, 5, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); JButton acceptButton = new JButton("Accept"); JButton viewInfoButton = new JButton("Profile"); JButton denyButton = new JButton("Deny"); layoutPanel.add(acceptButton, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(viewInfoButton, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); layoutPanel.add(denyButton, new GridBagConstraints(4, 1, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dialog.dispose(); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), "Would you like to add the user to your roster?", "Add To Roster", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(jid); rosterDialog.showRosterDialog(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, getGUI()); } }); // show dialog dialog.getContentPane().add(layoutPanel); dialog.pack(); dialog.setSize(450, 125); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); SparkManager.getChatManager().getChatContainer().blinkFrameIfNecessary(dialog); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
dialog.dispose();
SparkManager.getWorkspace().removeAlert(layoutPanel);
public void actionPerformed(ActionEvent e) { dialog.dispose(); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), "Would you like to add the user to your roster?", "Add To Roster", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(jid); rosterDialog.showRosterDialog(); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
public void actionPerformed(ActionEvent e) { dialog.dispose(); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), "Would you like to add the user to your roster?", "Add To Roster", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(jid); rosterDialog.showRosterDialog(); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
dialog.dispose();
public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java
return (T) serviceFactory.getQueryService().get(
return (T) localQuery.get(
private <T extends IObject> T lookup( T argument ) { if ( argument == null ) return null; if ( argument.getId() == null ) return argument; return (T) serviceFactory.getQueryService().get( argument.getClass(), argument.getId()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bfcb48d728436e30c2268bb790693dc55abf5340/RenderingBean.java/buggy/components/ejb/src/ome/ro/ejb/RenderingBean.java
LocalUpdate localUpdate = (LocalUpdate) serviceFactory .getContext().getBean(LocalUpdate.class.getName());
public void saveCurrentSettings() { delegate.saveCurrentSettings(); LocalUpdate localUpdate = (LocalUpdate) serviceFactory .getContext().getBean(LocalUpdate.class.getName()); localUpdate.flush(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bfcb48d728436e30c2268bb790693dc55abf5340/RenderingBean.java/buggy/components/ejb/src/ome/ro/ejb/RenderingBean.java
return newFixnum(hashCode());
return newFixnum((int) value ^ (int) (value >> 32));
public RubyFixnum hash() { return newFixnum(hashCode()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4b12521bf34cff2c9841b1dacb1a929f6def5327/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java
public RubyObject m_initialize(RubyFixnum size, RubyObject value) {
public RubyObject m_initialize(RubyObject[] args) { if (args.length < 2) { return this; } RubyFixnum size = (RubyFixnum)args[0];
public RubyObject m_initialize(RubyFixnum size, RubyObject value) { modify(); long len = size.getValue(); if (len < 0) { throw new RubyArgumentException("negative array size"); } if (len > Integer.MAX_VALUE) { throw new RubyArgumentException("array size too big"); } Collections.fill(array, value); for (int i = array.size(); i < len; i++) { array.add(value); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
Collections.fill(array, value);
Collections.fill(array, args[1]);
public RubyObject m_initialize(RubyFixnum size, RubyObject value) { modify(); long len = size.getValue(); if (len < 0) { throw new RubyArgumentException("negative array size"); } if (len > Integer.MAX_VALUE) { throw new RubyArgumentException("array size too big"); } Collections.fill(array, value); for (int i = array.size(); i < len; i++) { array.add(value); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
array.add(value);
array.add(args[1]);
public RubyObject m_initialize(RubyFixnum size, RubyObject value) { modify(); long len = size.getValue(); if (len < 0) { throw new RubyArgumentException("negative array size"); } if (len > Integer.MAX_VALUE) { throw new RubyArgumentException("array size too big"); } Collections.fill(array, value); for (int i = array.size(); i < len; i++) { array.add(value); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
modify();
public RubyArray m_push(RubyObject[] items) { if (items.length == 0) { throw new RubyArgumentException("wrong # of arguments(at least 1)"); } for (int i = 0; i < items.length; i++) { array.add(items[i]); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
/* if (args[0] instanceof RubyBignum) {
if (args[0] instanceof RubyBignum) {
public RubyObject m_slice(RubyObject[] args) { if (args.length == 2) { long beg = ((RubyFixnum)args[0]).getValue(); long len = ((RubyFixnum)args[1]).getValue(); if (beg < 0) { beg += array.size(); } return subseq(beg, len); } if (args.length == 1) { if (args[0] instanceof RubyFixnum) { return entry(((RubyFixnum)args[0]).getValue()); }/* if (args[0] instanceof RubyBignum) { throw new RubyIndexException("index too big"); } if (args[0] instanceof RubyRange) { }*/ } return getRuby().getNil(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
}*/
long[] begLength = ((RubyRange)args[0]).getBeginLength(length()); if (begLength == null) { return getRuby().getNil(); } else { return subseq(begLength[0], begLength[1]); } }
public RubyObject m_slice(RubyObject[] args) { if (args.length == 2) { long beg = ((RubyFixnum)args[0]).getValue(); long len = ((RubyFixnum)args[1]).getValue(); if (beg < 0) { beg += array.size(); } return subseq(beg, len); } if (args.length == 1) { if (args[0] instanceof RubyFixnum) { return entry(((RubyFixnum)args[0]).getValue()); }/* if (args[0] instanceof RubyBignum) { throw new RubyIndexException("index too big"); } if (args[0] instanceof RubyRange) { }*/ } return getRuby().getNil(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
} if (idx > array.size()) {
} else if (idx > array.size()) {
public void store(long idx, RubyObject value) { modify(); if (idx < 0) { idx += array.size(); if (idx < 0) { throw new RubyIndexException("index " + (idx - array.size()) + " out of array"); } } if (idx > array.size()) { array.ensureCapacity((int)idx + 1); for (int i = array.size(); i < idx; i++) { array.add(getRuby().getNil()); } } if (idx == array.size()) { array.add(value); } array.set((int)idx, value); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
array.set((int)idx, value);
public void store(long idx, RubyObject value) { modify(); if (idx < 0) { idx += array.size(); if (idx < 0) { throw new RubyIndexException("index " + (idx - array.size()) + " out of array"); } } if (idx > array.size()) { array.ensureCapacity((int)idx + 1); for (int i = array.size(); i < idx; i++) { array.add(getRuby().getNil()); } } if (idx == array.size()) { array.add(value); } array.set((int)idx, value); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyArray.java/clean/org/jruby/RubyArray.java
private void initComponents() { titleLabel = new JLabel(getMessage(null)); titleLabelDefaultfont = titleLabel.getFont(); //TitleBar finishButton = new JButton("Save"); finishButton.setEnabled(false); finishButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { model.finish(); } }); nameArea = new JTextField(); setTextAreaDefault(nameArea); descriptionArea = new MultilineLabel(); setTextAreaDefault(descriptionArea); nameAreaListener = new DocumentListener() { /** * Updates the editor's controls when some text is inserted. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleNameAreaInsert(); } /** * Displays an error message when the data object has no name. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleNameAreaRemove(de.getDocument().getLength()); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }; nameArea.getDocument().addDocumentListener(nameAreaListener); descriptionAreaListener = new DocumentListener() { /** Handles text insertion. */ public void insertUpdate(DocumentEvent de) { handleDescriptionAreaInsert(); } /** Handles text insertion. */ public void removeUpdate(DocumentEvent de) { handleDescriptionAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }; descriptionArea.getDocument().addDocumentListener( descriptionAreaListener); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/39bb6f0c93c9752d3daacd9753b8402e6d393a78/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
/* * Initialize a simple Frame. */
public BSFExample(BSFManager manager) { this.manager = manager; initUI(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a427f315ae3c71573e36810225bf3a9c51df15d5/BSFExample.java/clean/src/org/jruby/javasupport/bsf/BSFExample.java
/* * Evaluates a Ruby expression and display the result. */
private void initUI() { final JFrame frame = new JFrame("A sample BSF application"); final JMenuBar menubar = new JMenuBar(); final JTextArea input = new JTextArea("$frame.setTitle(\"A new title\")"); final JButton execute = new JButton("Execute"); final JButton eval = new JButton("Eval"); try { manager.declareBean("frame", frame, JFrame.class); manager.declareBean("menubar", menubar, JMenuBar.class); manager.declareBean("input", input, JTextArea.class); manager.declareBean("execute", execute, JButton.class); manager.declareBean("eval", eval, JButton.class); } catch (BSFException excptn) { excptn.printStackTrace(); JOptionPane.showMessageDialog(null, excptn.getMessage()); } frame.getContentPane().setLayout(new BorderLayout(12, 12)); frame.getContentPane().add(input, BorderLayout.CENTER); JPanel buttonPane = new JPanel(new FlowLayout(12)); frame.getContentPane().add(buttonPane, BorderLayout.SOUTH); buttonPane.add(execute, BorderLayout.EAST); buttonPane.add(eval, BorderLayout.EAST); try { manager.exec("ruby", "initUI", 1, 1, "$frame.setJMenuBar($menubar)"); } catch (BSFException excptn) { excptn.printStackTrace(); JOptionPane.showMessageDialog(null, excptn.getMessage()); } execute.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { manager.exec("ruby", "initUI", 1, 1, input.getText()); } catch (BSFException excptn) { excptn.printStackTrace(); JOptionPane.showMessageDialog(frame, excptn.getMessage()); } } }); eval.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { String expression = JOptionPane.showInputDialog(frame, "Please enter a Ruby expression:"); input.setText(String.valueOf(manager.eval("ruby", "initUI", 1, 1, expression))); } catch (BSFException excptn) { excptn.printStackTrace(); JOptionPane.showMessageDialog(frame, excptn.getMessage()); } } }); frame.pack(); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a427f315ae3c71573e36810225bf3a9c51df15d5/BSFExample.java/clean/src/org/jruby/javasupport/bsf/BSFExample.java
/* * Execute Ruby statements. */
public void actionPerformed(ActionEvent e) { try { manager.exec("ruby", "initUI", 1, 1, input.getText()); } catch (BSFException excptn) { excptn.printStackTrace(); JOptionPane.showMessageDialog(frame, excptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a427f315ae3c71573e36810225bf3a9c51df15d5/BSFExample.java/clean/src/org/jruby/javasupport/bsf/BSFExample.java
/* * Evaluates a Ruby expression and display the result. */
public void actionPerformed(ActionEvent e) { try { String expression = JOptionPane.showInputDialog(frame, "Please enter a Ruby expression:"); input.setText(String.valueOf(manager.eval("ruby", "initUI", 1, 1, expression))); } catch (BSFException excptn) { excptn.printStackTrace(); JOptionPane.showMessageDialog(frame, excptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a427f315ae3c71573e36810225bf3a9c51df15d5/BSFExample.java/clean/src/org/jruby/javasupport/bsf/BSFExample.java
/* * Now we create a new BSFManager. */
public static void main(String[] args) { BSFManager.registerScriptingEngine("ruby", "org.jruby.javasupport.bsf.JRubyEngine", new String[] { "rb" }); new BSFExample(new BSFManager()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a427f315ae3c71573e36810225bf3a9c51df15d5/BSFExample.java/clean/src/org/jruby/javasupport/bsf/BSFExample.java
while (initArgObj instanceof Macro)
while (initArgObj instanceof Macro && initArgObj != UNDEF)
public void write(FastWriter out, Context context) throws PropertyException, IOException { Map globalBeans = BeanConf.globalBeans; Map appBeans = beanConf.appBeans; boolean isNew = false; try { while (initArgObj instanceof Macro) initArgObj = ((Macro) initArgObj).evaluate(context); // store init args in array if (initArgObj == null || initArgObj.getClass().isArray()){ initArgs = (Object[])initArgObj; } else { initArgs = new Object[1]; initArgs[0] = initArgObj; } Object o = null; Class c = null; switch (scope){ case BEAN_SCOPE_GLOBAL: synchronized (globalBeans){ o = globalBeans.get(targetName); if (o == null){ if (isStaticClass){ c = context.getBroker().classForName(_className); o = new org.webmacro.engine.StaticClassWrapper(c); } else { //c = Class.forName(_className); //o = c.newInstance(); o = instantiate(_className, initArgs); } isNew = true; globalBeans.put(targetName,o); } } break; case BEAN_SCOPE_APPLICATION: synchronized (appBeans){ o = appBeans.get(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; appBeans.put(targetName, o); } } break; case BEAN_SCOPE_SESSION: javax.servlet.http.HttpSession session = (javax.servlet.http.HttpSession)context.getProperty("Session"); //if (context instanceof WebContext){ if (session != null){ synchronized(session){ o = session.getAttribute(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; session.setAttribute(targetName, o); } } } else { PropertyException e = new PropertyException( "#bean usage error: session scope is only valid with servlets!"); _broker.getEvaluationExceptionHandler().evaluate( target, context, e); } break; default: // make "page" the default scope //case BEAN_SCOPE_PAGE: // NOTE: page beans always overwrite anything in the context // with the same name o = instantiate(_className, initArgs); isNew = true; if (o != null){ Class[] paramTypes = { Context.class }; try { java.lang.reflect.Method m = o.getClass().getMethod("init", paramTypes); if (m != null){ Object[] args = { context }; m.invoke(o, args); } } catch (Exception e){ // ignore } } break; } _log.debug("BeanDirective: Class " + _className + " loaded."); target.setValue(context, o); } catch (PropertyException e) { this._broker.getEvaluationExceptionHandler().evaluate(target, context, e); } catch (Exception e) { String errorText = "BeanDirective: Unable to load bean " + target + " of type " + _className; _log.error(errorText, e); writeWarning(errorText, context, out); } if (isNew && onNewBlock != null) onNewBlock.write(out, context); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/d2c96af04bbf66c9b278908c025dc47e762e80cd/BeanDirective.java/buggy/webmacro/src/org/webmacro/directive/BeanDirective.java
if (i == 2) { modes |= BINARY; }
public static int convertModesStringToModesInt(IRuby runtime, String modesString) { int modes = 0; if (modesString.length() == 0) { throw runtime.newArgumentError("illegal access mode"); } switch (modesString.charAt(0)) { case 'r' : modes |= RDONLY; break; case 'a' : modes |= APPEND; modes |= WRONLY; break; case 'w' : modes |= WRONLY; modes |= TRUNC; break; default : throw runtime.newArgumentError("illegal access mode " + modes); } if (modesString.length() > 1) { int i = modesString.charAt(1) == 'b' ? 2 : 1; if (modesString.length() > i) { if (modesString.charAt(i) == '+') { if ((modes & APPEND) != 0) { modes = RDWR | APPEND; } else if ((modes & WRONLY) != 0){ modes = RDWR | TRUNC; } else { modes = RDWR; } } else { throw runtime.newArgumentError("illegal access mode " + modes); } } } return modes; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4b12521bf34cff2c9841b1dacb1a929f6def5327/IOModes.java/buggy/src/org/jruby/util/IOModes.java
return (modes & RDWR) != 0 || modes == RDONLY;
return (modes & RDWR) != 0 || modes == RDONLY || modes == BINARY;
public boolean isReadable() { return (modes & RDWR) != 0 || modes == RDONLY; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4b12521bf34cff2c9841b1dacb1a929f6def5327/IOModes.java/buggy/src/org/jruby/util/IOModes.java
public Dispatcher(DisplayedDocument dd) { controllers = new LinkedList<Controller>(); controllers.add(new MainController(dd)); controllers.add(new MainMenuController(dd)); controllers.add(new TreeContextMenuController(dd)); controllers.add(new TreeController(dd));
public Dispatcher() { controllers = new HashMap<String, Controller>();
public Dispatcher(DisplayedDocument dd) { controllers = new LinkedList<Controller>(); controllers.add(new MainController(dd)); controllers.add(new MainMenuController(dd)); controllers.add(new TreeContextMenuController(dd)); controllers.add(new TreeController(dd)); }
57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/57d4036eb7167d2d27117abe1f0280376377dbaa/Dispatcher.java/buggy/trunk/src/de/berlios/koalanotes/controllers/Dispatcher.java
Controller controller = null; Method method = null; Iterator<Controller> iter = controllers.iterator(); while (iter.hasNext() && (method == null)) { controller = iter.next(); method = controller.getMethod(methodDescriptor);
Controller controller = controllers.get(Controller.getControllerSignature(methodDescriptor)); if (controller == null) { throw new KoalaException("Koala Notes could not find controller '" + Controller.getControllerSignature(methodDescriptor) + "'.");
public void invokeControllerMethod(String methodDescriptor, Event e) { // Get the controller and method. Controller controller = null; Method method = null; Iterator<Controller> iter = controllers.iterator(); while (iter.hasNext() && (method == null)) { controller = iter.next(); method = controller.getMethod(methodDescriptor); } if (method == null) { throw new KoalaException("Koala Notes could not find method '" + methodDescriptor + "'."); } // Invoke the method. try { method.invoke(controller, new Object[] {e}); } catch (IllegalAccessException iaex) { throw new KoalaException("Koala Notes could not access method '" + methodDescriptor + "'.", iaex); } catch (InvocationTargetException itex) { if (itex.getCause() instanceof RuntimeException) { throw (RuntimeException) itex.getCause(); } else throw new KoalaException(itex.getCause()); } }
57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/57d4036eb7167d2d27117abe1f0280376377dbaa/Dispatcher.java/buggy/trunk/src/de/berlios/koalanotes/controllers/Dispatcher.java
Method method = controller.getMethod(methodDescriptor);
public void invokeControllerMethod(String methodDescriptor, Event e) { // Get the controller and method. Controller controller = null; Method method = null; Iterator<Controller> iter = controllers.iterator(); while (iter.hasNext() && (method == null)) { controller = iter.next(); method = controller.getMethod(methodDescriptor); } if (method == null) { throw new KoalaException("Koala Notes could not find method '" + methodDescriptor + "'."); } // Invoke the method. try { method.invoke(controller, new Object[] {e}); } catch (IllegalAccessException iaex) { throw new KoalaException("Koala Notes could not access method '" + methodDescriptor + "'.", iaex); } catch (InvocationTargetException itex) { if (itex.getCause() instanceof RuntimeException) { throw (RuntimeException) itex.getCause(); } else throw new KoalaException(itex.getCause()); } }
57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/57d4036eb7167d2d27117abe1f0280376377dbaa/Dispatcher.java/buggy/trunk/src/de/berlios/koalanotes/controllers/Dispatcher.java
final protected void doPost (HttpServletRequest req, HttpServletResponse resp)
protected void doPost (HttpServletRequest req, HttpServletResponse resp)
final protected void doPost (HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doRequest (req,resp); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
try {
try {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
try {
try {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding);
fw = FastWriter.getInstance (_broker, encoding);
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
} finally {
fw.writeTo (c.getResponse().getOutputStream ()); } finally {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
} finally {
} finally {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
} catch (IOException e) {
} catch (IOException e) {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
} catch (Exception e) {
} catch (Exception e) {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
try {
try {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
catch (Exception ignore) { } } finally {
} finally {
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) {
if (fw != null) { fw.flush (); fw.close (); fw = null;
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
} catch (Exception e3) { }
final protected void execute (Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming (); try { if (timing) c.startTiming ("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse (); Locale locale = (Locale) tmpl.getParam ( WMConstants.TEMPLATE_LOCALE); if (_log.loggingDebug ()) _log.debug ("TemplateLocale="+locale); if (locale != null) { setLocale (resp, locale); } String encoding = (String) tmpl.getParam ( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding (); } if (_log.loggingDebug ()) _log.debug ("Using output encoding "+encoding); fw = FastWriter.getInstance (_broker, resp.getOutputStream (), encoding); tmpl.write (fw, c); } finally { if (timing) c.stopTiming (); } if (timing) c.startTiming ("FastWriter.close()"); try { fw.close (); fw = null; } finally { if (timing) c.stopTiming (); } } catch (IOException e) { // ignore disconnect } catch (Exception e) { String error = "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": " + e + "\n") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")); _log.warning (error,e); try { Template errorTemplate = error (c, "WebMacro encountered an error while executing a template:\n" + ((tmpl != null) ? (tmpl + ": ") : ("The template failed to load; double check the " + "TemplatePath in your webmacro.properties file.")) + "\n<pre>" + e + "</pre>\n"); fw.reset (fw.getOutputStream ()); errorTemplate.write (fw, c); } catch (Exception ignore) { } } finally { try { if (fw != null) { fw.flush (); fw.close (); fw = null; } } catch (Exception e3) { // ignore disconnect } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/aea98d1359054fc29449ec2c9e4a77029d963375/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
public RubySymbol(Ruby ruby, String symbol) {
private RubySymbol(Ruby ruby, String symbol) {
public RubySymbol(Ruby ruby, String symbol) { super(ruby, ruby.getClasses().getSymbolClass()); this.symbol = symbol; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a387d516d26e5f7ff453c52c2282ee687da0a99b/RubySymbol.java/buggy/org/jruby/RubySymbol.java
synchronized(this.getClass()) { lastId++; this.id = lastId; }
public RubySymbol(Ruby ruby, String symbol) { super(ruby, ruby.getClasses().getSymbolClass()); this.symbol = symbol; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a387d516d26e5f7ff453c52c2282ee687da0a99b/RubySymbol.java/buggy/org/jruby/RubySymbol.java
symbolClass.defineMethod("id", CallbackFactory.getMethod(RubySymbol.class, "id")); symbolClass.defineMethod("to_i", CallbackFactory.getMethod(RubySymbol.class, "to_i")); symbolClass.defineMethod("to_int", CallbackFactory.getMethod(RubySymbol.class, "to_i")); symbolClass.defineMethod("id2name", CallbackFactory.getMethod(RubySymbol.class, "to_s")); symbolClass.defineMethod("to_s", CallbackFactory.getMethod(RubySymbol.class, "to_s")); symbolClass.defineMethod("==", CallbackFactory.getMethod(RubySymbol.class, "equal", RubyObject.class)); symbolClass.defineMethod("hash", CallbackFactory.getMethod(RubySymbol.class, "hash")); symbolClass.defineMethod("inspect", CallbackFactory.getMethod(RubySymbol.class, "inspect")); symbolClass.defineMethod("dup", CallbackFactory.getMethod(RubySymbol.class, "rbClone")); symbolClass.defineMethod("clone", CallbackFactory.getMethod(RubySymbol.class, "rbClone"));
symbolClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); symbolClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); symbolClass.defineMethod("inspect", IndexedCallback.create(M_INSPECT, 0)); symbolClass.defineMethod("dup", IndexedCallback.create(M_CLONE, 0)); symbolClass.defineMethod("clone", IndexedCallback.create(M_CLONE, 0));
public static RubyClass createSymbolClass(Ruby ruby) { RubyClass symbolClass = ruby.defineClass("Symbol", ruby.getClasses().getObjectClass()); symbolClass.getRubyClass().undefMethod("new"); symbolClass.defineMethod("id", CallbackFactory.getMethod(RubySymbol.class, "id")); symbolClass.defineMethod("to_i", CallbackFactory.getMethod(RubySymbol.class, "to_i")); symbolClass.defineMethod("to_int", CallbackFactory.getMethod(RubySymbol.class, "to_i")); symbolClass.defineMethod("id2name", CallbackFactory.getMethod(RubySymbol.class, "to_s")); symbolClass.defineMethod("to_s", CallbackFactory.getMethod(RubySymbol.class, "to_s")); symbolClass.defineMethod("==", CallbackFactory.getMethod(RubySymbol.class, "equal", RubyObject.class)); symbolClass.defineMethod("hash", CallbackFactory.getMethod(RubySymbol.class, "hash")); symbolClass.defineMethod("inspect", CallbackFactory.getMethod(RubySymbol.class, "inspect")); symbolClass.defineMethod("dup", CallbackFactory.getMethod(RubySymbol.class, "rbClone")); symbolClass.defineMethod("clone", CallbackFactory.getMethod(RubySymbol.class, "rbClone")); symbolClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); symbolClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); return symbolClass; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a387d516d26e5f7ff453c52c2282ee687da0a99b/RubySymbol.java/buggy/org/jruby/RubySymbol.java
return id();
return RubyFixnum.newFixnum(ruby, id);
public RubyFixnum to_i() { return id(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a387d516d26e5f7ff453c52c2282ee687da0a99b/RubySymbol.java/buggy/org/jruby/RubySymbol.java
public DisplayRoi(Integer attributeId, Integer y1, Integer z1, Integer t0, Integer z0, Integer y0, Integer t1, Integer x0, Integer x1, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, org.openmicroscopy.omero.model.DisplayOption displayOption) { this.attributeId = attributeId; this.y1 = y1; this.z1 = z1; this.t0 = t0; this.z0 = z0; this.y0 = y0; this.t1 = t1; this.x0 = x0; this.x1 = x1; this.image = image; this.moduleExecution = moduleExecution; this.displayOption = displayOption;
public DisplayRoi() {
public DisplayRoi(Integer attributeId, Integer y1, Integer z1, Integer t0, Integer z0, Integer y0, Integer t1, Integer x0, Integer x1, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, org.openmicroscopy.omero.model.DisplayOption displayOption) { this.attributeId = attributeId; this.y1 = y1; this.z1 = z1; this.t0 = t0; this.z0 = z0; this.y0 = y0; this.t1 = t1; this.x0 = x0; this.x1 = x1; this.image = image; this.moduleExecution = moduleExecution; this.displayOption = displayOption; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/DisplayRoi.java/buggy/components/common/src/org/openmicroscopy/omero/model/DisplayRoi.java
if (lc != null && lc.size() != retVal.getDefaultPixels().getSizeC())
if (lc != null && lc.size() == retVal.getDefaultPixels().getSizeC())
public ImageData retrieveImage(int id, ImageData retVal) throws DSOutOfServiceException, DSAccessException { //Make a new retVal if none was provided. if (retVal == null) retVal = new ImageData(); //Define the criteria by which the object graph is pulled out. Criteria c = ImageMapper.buildImageCriteria(id); //Load the graph defined by criteria. Image image = (Image) gateway.retrieveData(Image.class, c); //Put the server data into the corresponding client object. if (image == null) return retVal; ImageMapper.fillImage(image, retVal); //retrieve the realSize of a pixels. c = PixelsMapper.buildPixelsDimensionCriteria(id); Dimensions pixelDim = (Dimensions) gateway.retrieveSTSData("Dimensions", c); if (pixelDim != null) PixelsMapper.fillPixelsDimensions(pixelDim, retVal.getDefaultPixels()); c = PixelsMapper.buildLogicalChannelCriteria( STSMapper.IMAGE_GRANULARITY, id); List lc = (List) gateway.retrieveListSTSData("LogicalChannel", c); //need to fix problem if no logical channel(shouldn't happen) if (lc != null && lc.size() != retVal.getDefaultPixels().getSizeC()) retVal.setChannels(ImageMapper.fillImageChannels(lc)); else retVal.setChannels(ImageMapper.fillDefaultImageChannels( retVal.getDefaultPixels().getSizeC())); //Can be an empty data object. return retVal; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a44d8080256cccc4fed6a1e9925c5e4177ac6b89/DMSAdapter.java/clean/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java
public HttpMethodBase marshal()
public HttpMethod marshal()
public HttpMethodBase marshal() { PostMethod request = (PostMethod) super.marshal(); request.addParameter(THE_Z_FIELD, Integer.toString(theZ)); return request; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c0ee67611abddaf7c5a898ad8033ca4845e9d8fe/GetPlaneRequest.java/clean/SRC/org/openmicroscopy/shoola/omeis/proxy/GetPlaneRequest.java
{ JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(annotatorUI); p.add(new JSeparator()); p.add(buildToolBar()); return p; }
{ JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(annotatorUI); p.add(new JSeparator()); p.add(buildToolBar()); return p; }
private JPanel buildBody() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(annotatorUI); p.add(new JSeparator()); p.add(buildToolBar()); return p; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/AnnotatorView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/annotator/view/AnnotatorView.java
{ IconManager icons = IconManager.getInstance(); TitlePanel tp = new TitlePanel(TITLE, NOTE,
{ IconManager icons = IconManager.getInstance(); TitlePanel tp = new TitlePanel(TITLE, NOTE,
private void buildGUI() { IconManager icons = IconManager.getInstance(); TitlePanel tp = new TitlePanel(TITLE, NOTE, icons.getIcon(IconManager.ANNOTATION_48)); Container c = getContentPane(); c.setLayout(new BorderLayout(0, 0)); c.add(tp, BorderLayout.NORTH); c.add(buildBody(), BorderLayout.CENTER); c.add(statusBar, BorderLayout.SOUTH); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/AnnotatorView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/annotator/view/AnnotatorView.java
Container c = getContentPane(); c.setLayout(new BorderLayout(0, 0)); c.add(tp, BorderLayout.NORTH); c.add(buildBody(), BorderLayout.CENTER); c.add(statusBar, BorderLayout.SOUTH); }
Container c = getContentPane(); c.setLayout(new BorderLayout(0, 0)); c.add(tp, BorderLayout.NORTH); c.add(buildBody(), BorderLayout.CENTER); c.add(statusBar, BorderLayout.SOUTH); }
private void buildGUI() { IconManager icons = IconManager.getInstance(); TitlePanel tp = new TitlePanel(TITLE, NOTE, icons.getIcon(IconManager.ANNOTATION_48)); Container c = getContentPane(); c.setLayout(new BorderLayout(0, 0)); c.add(tp, BorderLayout.NORTH); c.add(buildBody(), BorderLayout.CENTER); c.add(statusBar, BorderLayout.SOUTH); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/AnnotatorView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/annotator/view/AnnotatorView.java
{ JPanel bar = new JPanel(); bar.setBorder(null); JButton b = new JButton(controller.getAction(AnnotatorControl.FINISH)); bar.add(b); bar.add(Box.createRigidArea(H_SPACER_SIZE)); b = new JButton(controller.getAction(AnnotatorControl.CANCEL)); bar.add(b); return UIUtilities.buildComponentPanelRight(bar); }
{ JPanel bar = new JPanel(); bar.setBorder(null); JButton b = new JButton(controller.getAction(AnnotatorControl.FINISH)); bar.add(b); bar.add(Box.createRigidArea(H_SPACER_SIZE)); b = new JButton(controller.getAction(AnnotatorControl.CANCEL)); bar.add(b); return UIUtilities.buildComponentPanelRight(bar); }
private JPanel buildToolBar() { JPanel bar = new JPanel(); bar.setBorder(null); JButton b = new JButton(controller.getAction(AnnotatorControl.FINISH)); bar.add(b); bar.add(Box.createRigidArea(H_SPACER_SIZE)); b = new JButton(controller.getAction(AnnotatorControl.CANCEL)); bar.add(b); return UIUtilities.buildComponentPanelRight(bar); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/AnnotatorView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/annotator/view/AnnotatorView.java
{ setModal(true); setTitle(TITLE); }
{ setModal(true); setTitle(TITLE); }
private void setProperties() { setModal(true); setTitle(TITLE); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/AnnotatorView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/annotator/view/AnnotatorView.java
if (iteratorMethod != null) { recv = recv.callMethod(iteratorMethod); }
public IRubyObject execute(IRubyObject recv, IRubyObject[] args) { while (recv.callMethod(hasNextMethod).isTrue()) { if (nextMethod == null) { recv.getRuntime().yield(recv); } else { recv.getRuntime().yield(recv.callMethod(nextMethod)); } } return recv.getRuntime().getNil(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1ceedf02ac15d7325cfcf505ca74f35c5bc4a258/JavaEachMethod.java/clean/org/jruby/javasupport/JavaEachMethod.java
runtime.getClass("JavaUtilities").callMethod(
runtime.getClasses().getObjectClass().getConstant("JavaUtilities").callMethod(
public IRubyObject getValue() { IRubyObject result = JavaUtil.convertJavaToRuby(runtime, bean.bean, bean.type); if (result instanceof JavaObject) { runtime.getLoadService().require("java"); result = runtime.getClass("JavaUtilities").callMethod( "wrap", new IRubyObject[] { result, RubyString.newString(runtime, bean.type.getName())}); } return result; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fffe7aa25510c5fa1f975232bea0ef0fd24762d7/JRubyEngine.java/buggy/src/org/jruby/javasupport/bsf/JRubyEngine.java
runtime.getClass("JavaUtilities").callMethod(
runtime.getClasses().getObjectClass().getConstant("JavaUtilities").callMethod(
private IRubyObject convertToRuby(Object value) { IRubyObject result = JavaUtil.convertJavaToRuby(runtime, value); if (result instanceof JavaObject) { runtime.getLoadService().require("java"); result = runtime.getClass("JavaUtilities").callMethod( "wrap", new IRubyObject[] { result, RubyString.newString(runtime, value.getClass().getName())}); } return result; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fffe7aa25510c5fa1f975232bea0ef0fd24762d7/JRubyEngine.java/buggy/src/org/jruby/javasupport/bsf/JRubyEngine.java
int size = declaredBeans.size(); for (int i = 0; i < size; i++) {
for (int i = 0, size = declaredBeans.size(); i < size; i++) {
public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException { super.initialize(mgr, lang, declaredBeans); runtime = Ruby.getDefaultInstance(); int size = declaredBeans.size(); for (int i = 0; i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean) declaredBeans.elementAt(i); runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean)); } // ruby.defineGlobalFunction("declareBean", method); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fffe7aa25510c5fa1f975232bea0ef0fd24762d7/JRubyEngine.java/buggy/src/org/jruby/javasupport/bsf/JRubyEngine.java
public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException { super.initialize(mgr, lang, declaredBeans); runtime = Ruby.getDefaultInstance(); int size = declaredBeans.size(); for (int i = 0; i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean) declaredBeans.elementAt(i); runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean)); } // ruby.defineGlobalFunction("declareBean", method); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fffe7aa25510c5fa1f975232bea0ef0fd24762d7/JRubyEngine.java/buggy/src/org/jruby/javasupport/bsf/JRubyEngine.java
Thread.sleep(10000);
public void initialize() { SwingWorker thread = new SwingWorker() { public Object construct() { try { Thread.sleep(10000); populateTransports(SparkManager.getConnection()); for (final Transport transport : TransportManager.getTransports()) { addTransport(transport); } } catch (Exception e) { Log.error(e); return false; } return true; } public void finished() { Boolean transportExists = (Boolean)get(); if (!transportExists) { return; } // Register presences. registerPresences(); } }; thread.start(); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/293ca0665a0d37883c1db435594539c7b5a0e56e/GatewayPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/gateways/GatewayPlugin.java
Thread.sleep(10000);
public Object construct() { try { Thread.sleep(10000); populateTransports(SparkManager.getConnection()); for (final Transport transport : TransportManager.getTransports()) { addTransport(transport); } } catch (Exception e) { Log.error(e); return false; } return true; }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/293ca0665a0d37883c1db435594539c7b5a0e56e/GatewayPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/gateways/GatewayPlugin.java
for(ContactGroup contactGroup : contactList.getContactGroups()){ for(ContactItem contactItem : contactGroup.getContactItems()){
for (ContactGroup contactGroup : contactList.getContactGroups()) { for (ContactItem contactItem : contactGroup.getContactItems()) {
private void registerPresences() { SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; Transport transport = TransportManager.getTransport(packet.getFrom()); if (transport != null) { boolean registered = presence != null && presence.getMode() != null; if (presence.getType() == Presence.Type.unavailable) { registered = false; } RolloverButton button = uiMap.get(transport); if (!registered) { button.setIcon(transport.getInactiveIcon()); } else { button.setIcon(transport.getIcon()); } } } }, new PacketTypeFilter(Presence.class)); ChatManager chatManager = SparkManager.getChatManager(); chatManager.addContactItemHandler(this); // Iterate through Contacts and check for final ContactList contactList = SparkManager.getWorkspace().getContactList(); for(ContactGroup contactGroup : contactList.getContactGroups()){ for(ContactItem contactItem : contactGroup.getContactItems()){ Presence presence = contactItem.getPresence(); boolean handle = handlePresence(contactItem, presence); if(handle){ contactGroup.fireContactGroupUpdated(); } } } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/293ca0665a0d37883c1db435594539c7b5a0e56e/GatewayPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/gateways/GatewayPlugin.java
boolean handle = handlePresence(contactItem, presence); if(handle){ contactGroup.fireContactGroupUpdated();
if (presence != null) { String domain = StringUtils.parseServer(presence.getFrom()); Transport transport = TransportManager.getTransport(domain); if (transport != null) { handlePresence(contactItem, presence); contactGroup.fireContactGroupUpdated(); }
private void registerPresences() { SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; Transport transport = TransportManager.getTransport(packet.getFrom()); if (transport != null) { boolean registered = presence != null && presence.getMode() != null; if (presence.getType() == Presence.Type.unavailable) { registered = false; } RolloverButton button = uiMap.get(transport); if (!registered) { button.setIcon(transport.getInactiveIcon()); } else { button.setIcon(transport.getIcon()); } } } }, new PacketTypeFilter(Presence.class)); ChatManager chatManager = SparkManager.getChatManager(); chatManager.addContactItemHandler(this); // Iterate through Contacts and check for final ContactList contactList = SparkManager.getWorkspace().getContactList(); for(ContactGroup contactGroup : contactList.getContactGroups()){ for(ContactItem contactItem : contactGroup.getContactItems()){ Presence presence = contactItem.getPresence(); boolean handle = handlePresence(contactItem, presence); if(handle){ contactGroup.fireContactGroupUpdated(); } } } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/293ca0665a0d37883c1db435594539c7b5a0e56e/GatewayPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/gateways/GatewayPlugin.java
private void registerPresences() { SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; Transport transport = TransportManager.getTransport(packet.getFrom()); if (transport != null) { boolean registered = presence != null && presence.getMode() != null; if (presence.getType() == Presence.Type.unavailable) { registered = false; } RolloverButton button = uiMap.get(transport); if (!registered) { button.setIcon(transport.getInactiveIcon()); } else { button.setIcon(transport.getIcon()); } } } }, new PacketTypeFilter(Presence.class)); ChatManager chatManager = SparkManager.getChatManager(); chatManager.addContactItemHandler(this); // Iterate through Contacts and check for final ContactList contactList = SparkManager.getWorkspace().getContactList(); for(ContactGroup contactGroup : contactList.getContactGroups()){ for(ContactItem contactItem : contactGroup.getContactItems()){ Presence presence = contactItem.getPresence(); boolean handle = handlePresence(contactItem, presence); if(handle){ contactGroup.fireContactGroupUpdated(); } } } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/293ca0665a0d37883c1db435594539c7b5a0e56e/GatewayPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/gateways/GatewayPlugin.java
@NotNull ExperimenterGroup[] groups );
@NotNull ExperimenterGroup...groups );
void addGroups( @NotNull Experimenter user, @NotNull ExperimenterGroup[] groups );
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d4a4fd19dcb38c276cd70b93f33ec7f9c4156452/IAdmin.java/clean/components/common/src/ome/api/IAdmin.java
@NotNull ExperimenterGroup[] groups );
@NotNull ExperimenterGroup...groups );
void removeGroups( @NotNull Experimenter user, @NotNull ExperimenterGroup[] groups );
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d4a4fd19dcb38c276cd70b93f33ec7f9c4156452/IAdmin.java/clean/components/common/src/ome/api/IAdmin.java
setConstant("FNM_NOESCAPE", runtime.newFixnum(1)); setConstant("FNM_CASEFOLD", runtime.newFixnum(8)); setConstant("FNM_DOTMATCH", runtime.newFixnum(4)); setConstant("FNM_PATHNAME", runtime.newFixnum(2));
setConstant("FNM_NOESCAPE", runtime.newFixnum(FNM_NOESCAPE)); setConstant("FNM_CASEFOLD", runtime.newFixnum(FNM_CASEFOLD)); setConstant("FNM_DOTMATCH", runtime.newFixnum(FNM_DOTMATCH)); setConstant("FNM_PATHNAME", runtime.newFixnum(FNM_PATHNAME));
protected void initializeClass() { IRuby runtime = getRuntime(); RubyString separator = runtime.newString("/"); separator.freeze(); defineConstant("SEPARATOR", separator); defineConstant("Separator", separator); RubyString altSeparator = runtime.newString(File.separatorChar == '/' ? "\\" : "/"); altSeparator.freeze(); defineConstant("ALT_SEPARATOR", altSeparator); RubyString pathSeparator = runtime.newString(File.pathSeparator); pathSeparator.freeze(); defineConstant("PATH_SEPARATOR", pathSeparator); // TODO: These were missing, so we're not handling them elsewhere? setConstant("BINARY", runtime.newFixnum(32768)); setConstant("FNM_NOESCAPE", runtime.newFixnum(1)); setConstant("FNM_CASEFOLD", runtime.newFixnum(8)); setConstant("FNM_DOTMATCH", runtime.newFixnum(4)); setConstant("FNM_PATHNAME", runtime.newFixnum(2)); // Create constants for open flags setConstant("RDONLY", runtime.newFixnum(IOModes.RDONLY)); setConstant("WRONLY", runtime.newFixnum(IOModes.WRONLY)); setConstant("RDWR", runtime.newFixnum(IOModes.RDWR)); setConstant("CREAT", runtime.newFixnum(IOModes.CREAT)); setConstant("EXCL", runtime.newFixnum(IOModes.EXCL)); setConstant("NOCTTY", runtime.newFixnum(IOModes.NOCTTY)); setConstant("TRUNC", runtime.newFixnum(IOModes.TRUNC)); setConstant("APPEND", runtime.newFixnum(IOModes.APPEND)); setConstant("NONBLOCK", runtime.newFixnum(IOModes.NONBLOCK)); // Create constants for flock setConstant("LOCK_SH", runtime.newFixnum(RubyFile.LOCK_SH)); setConstant("LOCK_EX", runtime.newFixnum(RubyFile.LOCK_EX)); setConstant("LOCK_NB", runtime.newFixnum(RubyFile.LOCK_NB)); setConstant("LOCK_UN", runtime.newFixnum(RubyFile.LOCK_UN)); // Create Constants class RubyModule constants = defineModuleUnder("Constants"); // TODO: These were missing, so we're not handling them elsewhere? constants.setConstant("BINARY", runtime.newFixnum(32768)); constants.setConstant("FNM_NOESCAPE", runtime.newFixnum(1)); constants.setConstant("FNM_CASEFOLD", runtime.newFixnum(8)); constants.setConstant("FNM_DOTMATCH", runtime.newFixnum(4)); constants.setConstant("FNM_PATHNAME", runtime.newFixnum(2)); // Create constants for open flags constants.setConstant("RDONLY", runtime.newFixnum(IOModes.RDONLY)); constants.setConstant("WRONLY", runtime.newFixnum(IOModes.WRONLY)); constants.setConstant("RDWR", runtime.newFixnum(IOModes.RDWR)); constants.setConstant("CREAT", runtime.newFixnum(IOModes.CREAT)); constants.setConstant("EXCL", runtime.newFixnum(IOModes.EXCL)); constants.setConstant("NOCTTY", runtime.newFixnum(IOModes.NOCTTY)); constants.setConstant("TRUNC", runtime.newFixnum(IOModes.TRUNC)); constants.setConstant("APPEND", runtime.newFixnum(IOModes.APPEND)); constants.setConstant("NONBLOCK", runtime.newFixnum(IOModes.NONBLOCK)); // Create constants for flock constants.setConstant("LOCK_SH", runtime.newFixnum(RubyFile.LOCK_SH)); constants.setConstant("LOCK_EX", runtime.newFixnum(RubyFile.LOCK_EX)); constants.setConstant("LOCK_NB", runtime.newFixnum(RubyFile.LOCK_NB)); constants.setConstant("LOCK_UN", runtime.newFixnum(RubyFile.LOCK_UN)); // TODO Singleton methods: atime, blockdev?, chardev?, chown, ctime, directory? // TODO Singleton methods: executable?, executable_real?, extname, fnmatch, fnmatch? // TODO Singleton methods: ftype, grpowned?, lchmod, lchown, link, mtime, owned? // TODO Singleton methods: pipe?, readlink, setgid?, setuid?, socket?, // TODO Singleton methods: stat, sticky?, symlink, symlink?, umask, utime extendObject(runtime.getModule("FileTest")); defineSingletonMethod("basename", Arity.optional()); defineSingletonMethod("chmod", Arity.twoArguments()); defineSingletonMethod("delete", Arity.optional(), "unlink"); defineSingletonMethod("dirname", Arity.singleArgument()); defineSingletonMethod("expand_path", Arity.optional()); defineSingletonMethod("join", Arity.optional()); defineSingletonMethod("lstat", Arity.singleArgument()); defineSingletonMethod("mtime", Arity.singleArgument()); defineSingletonMethod("open", Arity.optional()); defineSingletonMethod("rename", Arity.twoArguments()); defineSingletonMethod("size?", Arity.singleArgument(), "size_p"); defineSingletonMethod("split", Arity.singleArgument()); defineSingletonMethod("stat", Arity.singleArgument(), "lstat"); defineSingletonMethod("symlink?", Arity.singleArgument(), "symlink_p"); defineSingletonMethod("truncate", Arity.twoArguments()); defineSingletonMethod("utime", Arity.optional()); defineSingletonMethod("unlink", Arity.optional()); // TODO: Define instance methods: atime, chmod, chown, ctime, lchmod, lchown, lstat, mtime //defineMethod("flock", Arity.singleArgument()); defineMethod("initialize", Arity.optional()); defineMethod("path", Arity.noArguments()); defineMethod("stat", Arity.noArguments()); defineMethod("truncate", Arity.singleArgument()); defineMethod("flock", Arity.singleArgument()); RubyFileStat.createFileStatClass(runtime); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7c9ec57d0ce44adc41c27cdfce89439cec7da0ed/FileMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/FileMetaClass.java
protected void initializeClass() { IRuby runtime = getRuntime(); RubyString separator = runtime.newString("/"); separator.freeze(); defineConstant("SEPARATOR", separator); defineConstant("Separator", separator); RubyString altSeparator = runtime.newString(File.separatorChar == '/' ? "\\" : "/"); altSeparator.freeze(); defineConstant("ALT_SEPARATOR", altSeparator); RubyString pathSeparator = runtime.newString(File.pathSeparator); pathSeparator.freeze(); defineConstant("PATH_SEPARATOR", pathSeparator); // TODO: These were missing, so we're not handling them elsewhere? setConstant("BINARY", runtime.newFixnum(32768)); setConstant("FNM_NOESCAPE", runtime.newFixnum(1)); setConstant("FNM_CASEFOLD", runtime.newFixnum(8)); setConstant("FNM_DOTMATCH", runtime.newFixnum(4)); setConstant("FNM_PATHNAME", runtime.newFixnum(2)); // Create constants for open flags setConstant("RDONLY", runtime.newFixnum(IOModes.RDONLY)); setConstant("WRONLY", runtime.newFixnum(IOModes.WRONLY)); setConstant("RDWR", runtime.newFixnum(IOModes.RDWR)); setConstant("CREAT", runtime.newFixnum(IOModes.CREAT)); setConstant("EXCL", runtime.newFixnum(IOModes.EXCL)); setConstant("NOCTTY", runtime.newFixnum(IOModes.NOCTTY)); setConstant("TRUNC", runtime.newFixnum(IOModes.TRUNC)); setConstant("APPEND", runtime.newFixnum(IOModes.APPEND)); setConstant("NONBLOCK", runtime.newFixnum(IOModes.NONBLOCK)); // Create constants for flock setConstant("LOCK_SH", runtime.newFixnum(RubyFile.LOCK_SH)); setConstant("LOCK_EX", runtime.newFixnum(RubyFile.LOCK_EX)); setConstant("LOCK_NB", runtime.newFixnum(RubyFile.LOCK_NB)); setConstant("LOCK_UN", runtime.newFixnum(RubyFile.LOCK_UN)); // Create Constants class RubyModule constants = defineModuleUnder("Constants"); // TODO: These were missing, so we're not handling them elsewhere? constants.setConstant("BINARY", runtime.newFixnum(32768)); constants.setConstant("FNM_NOESCAPE", runtime.newFixnum(1)); constants.setConstant("FNM_CASEFOLD", runtime.newFixnum(8)); constants.setConstant("FNM_DOTMATCH", runtime.newFixnum(4)); constants.setConstant("FNM_PATHNAME", runtime.newFixnum(2)); // Create constants for open flags constants.setConstant("RDONLY", runtime.newFixnum(IOModes.RDONLY)); constants.setConstant("WRONLY", runtime.newFixnum(IOModes.WRONLY)); constants.setConstant("RDWR", runtime.newFixnum(IOModes.RDWR)); constants.setConstant("CREAT", runtime.newFixnum(IOModes.CREAT)); constants.setConstant("EXCL", runtime.newFixnum(IOModes.EXCL)); constants.setConstant("NOCTTY", runtime.newFixnum(IOModes.NOCTTY)); constants.setConstant("TRUNC", runtime.newFixnum(IOModes.TRUNC)); constants.setConstant("APPEND", runtime.newFixnum(IOModes.APPEND)); constants.setConstant("NONBLOCK", runtime.newFixnum(IOModes.NONBLOCK)); // Create constants for flock constants.setConstant("LOCK_SH", runtime.newFixnum(RubyFile.LOCK_SH)); constants.setConstant("LOCK_EX", runtime.newFixnum(RubyFile.LOCK_EX)); constants.setConstant("LOCK_NB", runtime.newFixnum(RubyFile.LOCK_NB)); constants.setConstant("LOCK_UN", runtime.newFixnum(RubyFile.LOCK_UN)); // TODO Singleton methods: atime, blockdev?, chardev?, chown, ctime, directory? // TODO Singleton methods: executable?, executable_real?, extname, fnmatch, fnmatch? // TODO Singleton methods: ftype, grpowned?, lchmod, lchown, link, mtime, owned? // TODO Singleton methods: pipe?, readlink, setgid?, setuid?, socket?, // TODO Singleton methods: stat, sticky?, symlink, symlink?, umask, utime extendObject(runtime.getModule("FileTest")); defineSingletonMethod("basename", Arity.optional()); defineSingletonMethod("chmod", Arity.twoArguments()); defineSingletonMethod("delete", Arity.optional(), "unlink"); defineSingletonMethod("dirname", Arity.singleArgument()); defineSingletonMethod("expand_path", Arity.optional()); defineSingletonMethod("join", Arity.optional()); defineSingletonMethod("lstat", Arity.singleArgument()); defineSingletonMethod("mtime", Arity.singleArgument()); defineSingletonMethod("open", Arity.optional()); defineSingletonMethod("rename", Arity.twoArguments()); defineSingletonMethod("size?", Arity.singleArgument(), "size_p"); defineSingletonMethod("split", Arity.singleArgument()); defineSingletonMethod("stat", Arity.singleArgument(), "lstat"); defineSingletonMethod("symlink?", Arity.singleArgument(), "symlink_p"); defineSingletonMethod("truncate", Arity.twoArguments()); defineSingletonMethod("utime", Arity.optional()); defineSingletonMethod("unlink", Arity.optional()); // TODO: Define instance methods: atime, chmod, chown, ctime, lchmod, lchown, lstat, mtime //defineMethod("flock", Arity.singleArgument()); defineMethod("initialize", Arity.optional()); defineMethod("path", Arity.noArguments()); defineMethod("stat", Arity.noArguments()); defineMethod("truncate", Arity.singleArgument()); defineMethod("flock", Arity.singleArgument()); RubyFileStat.createFileStatClass(runtime); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7c9ec57d0ce44adc41c27cdfce89439cec7da0ed/FileMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/FileMetaClass.java
defineSingletonMethod("fnmatch", Arity.optional()); defineSingletonMethod("fnmatch?", Arity.optional(), "fnmatch");
protected void initializeClass() { IRuby runtime = getRuntime(); RubyString separator = runtime.newString("/"); separator.freeze(); defineConstant("SEPARATOR", separator); defineConstant("Separator", separator); RubyString altSeparator = runtime.newString(File.separatorChar == '/' ? "\\" : "/"); altSeparator.freeze(); defineConstant("ALT_SEPARATOR", altSeparator); RubyString pathSeparator = runtime.newString(File.pathSeparator); pathSeparator.freeze(); defineConstant("PATH_SEPARATOR", pathSeparator); // TODO: These were missing, so we're not handling them elsewhere? setConstant("BINARY", runtime.newFixnum(32768)); setConstant("FNM_NOESCAPE", runtime.newFixnum(1)); setConstant("FNM_CASEFOLD", runtime.newFixnum(8)); setConstant("FNM_DOTMATCH", runtime.newFixnum(4)); setConstant("FNM_PATHNAME", runtime.newFixnum(2)); // Create constants for open flags setConstant("RDONLY", runtime.newFixnum(IOModes.RDONLY)); setConstant("WRONLY", runtime.newFixnum(IOModes.WRONLY)); setConstant("RDWR", runtime.newFixnum(IOModes.RDWR)); setConstant("CREAT", runtime.newFixnum(IOModes.CREAT)); setConstant("EXCL", runtime.newFixnum(IOModes.EXCL)); setConstant("NOCTTY", runtime.newFixnum(IOModes.NOCTTY)); setConstant("TRUNC", runtime.newFixnum(IOModes.TRUNC)); setConstant("APPEND", runtime.newFixnum(IOModes.APPEND)); setConstant("NONBLOCK", runtime.newFixnum(IOModes.NONBLOCK)); // Create constants for flock setConstant("LOCK_SH", runtime.newFixnum(RubyFile.LOCK_SH)); setConstant("LOCK_EX", runtime.newFixnum(RubyFile.LOCK_EX)); setConstant("LOCK_NB", runtime.newFixnum(RubyFile.LOCK_NB)); setConstant("LOCK_UN", runtime.newFixnum(RubyFile.LOCK_UN)); // Create Constants class RubyModule constants = defineModuleUnder("Constants"); // TODO: These were missing, so we're not handling them elsewhere? constants.setConstant("BINARY", runtime.newFixnum(32768)); constants.setConstant("FNM_NOESCAPE", runtime.newFixnum(1)); constants.setConstant("FNM_CASEFOLD", runtime.newFixnum(8)); constants.setConstant("FNM_DOTMATCH", runtime.newFixnum(4)); constants.setConstant("FNM_PATHNAME", runtime.newFixnum(2)); // Create constants for open flags constants.setConstant("RDONLY", runtime.newFixnum(IOModes.RDONLY)); constants.setConstant("WRONLY", runtime.newFixnum(IOModes.WRONLY)); constants.setConstant("RDWR", runtime.newFixnum(IOModes.RDWR)); constants.setConstant("CREAT", runtime.newFixnum(IOModes.CREAT)); constants.setConstant("EXCL", runtime.newFixnum(IOModes.EXCL)); constants.setConstant("NOCTTY", runtime.newFixnum(IOModes.NOCTTY)); constants.setConstant("TRUNC", runtime.newFixnum(IOModes.TRUNC)); constants.setConstant("APPEND", runtime.newFixnum(IOModes.APPEND)); constants.setConstant("NONBLOCK", runtime.newFixnum(IOModes.NONBLOCK)); // Create constants for flock constants.setConstant("LOCK_SH", runtime.newFixnum(RubyFile.LOCK_SH)); constants.setConstant("LOCK_EX", runtime.newFixnum(RubyFile.LOCK_EX)); constants.setConstant("LOCK_NB", runtime.newFixnum(RubyFile.LOCK_NB)); constants.setConstant("LOCK_UN", runtime.newFixnum(RubyFile.LOCK_UN)); // TODO Singleton methods: atime, blockdev?, chardev?, chown, ctime, directory? // TODO Singleton methods: executable?, executable_real?, extname, fnmatch, fnmatch? // TODO Singleton methods: ftype, grpowned?, lchmod, lchown, link, mtime, owned? // TODO Singleton methods: pipe?, readlink, setgid?, setuid?, socket?, // TODO Singleton methods: stat, sticky?, symlink, symlink?, umask, utime extendObject(runtime.getModule("FileTest")); defineSingletonMethod("basename", Arity.optional()); defineSingletonMethod("chmod", Arity.twoArguments()); defineSingletonMethod("delete", Arity.optional(), "unlink"); defineSingletonMethod("dirname", Arity.singleArgument()); defineSingletonMethod("expand_path", Arity.optional()); defineSingletonMethod("join", Arity.optional()); defineSingletonMethod("lstat", Arity.singleArgument()); defineSingletonMethod("mtime", Arity.singleArgument()); defineSingletonMethod("open", Arity.optional()); defineSingletonMethod("rename", Arity.twoArguments()); defineSingletonMethod("size?", Arity.singleArgument(), "size_p"); defineSingletonMethod("split", Arity.singleArgument()); defineSingletonMethod("stat", Arity.singleArgument(), "lstat"); defineSingletonMethod("symlink?", Arity.singleArgument(), "symlink_p"); defineSingletonMethod("truncate", Arity.twoArguments()); defineSingletonMethod("utime", Arity.optional()); defineSingletonMethod("unlink", Arity.optional()); // TODO: Define instance methods: atime, chmod, chown, ctime, lchmod, lchown, lstat, mtime //defineMethod("flock", Arity.singleArgument()); defineMethod("initialize", Arity.optional()); defineMethod("path", Arity.noArguments()); defineMethod("stat", Arity.noArguments()); defineMethod("truncate", Arity.singleArgument()); defineMethod("flock", Arity.singleArgument()); RubyFileStat.createFileStatClass(runtime); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7c9ec57d0ce44adc41c27cdfce89439cec7da0ed/FileMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/FileMetaClass.java
return getRuntime().newFixnum(JRubyFile.create(getRuntime().getCurrentDirectory(),name.toString()).lastModified());
return getRuntime().newTime(JRubyFile.create(getRuntime().getCurrentDirectory(),name.toString()).lastModified());
public IRubyObject mtime(IRubyObject filename) { RubyString name = RubyString.stringValue(filename); return getRuntime().newFixnum(JRubyFile.create(getRuntime().getCurrentDirectory(),name.toString()).lastModified()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7c9ec57d0ce44adc41c27cdfce89439cec7da0ed/FileMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/FileMetaClass.java
return Collections.EMPTY_LIST;
return EMPTY_LIST;
public List childNodes() { return Collections.EMPTY_LIST; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/ZeroArgNode.java/buggy/src/org/jruby/ast/ZeroArgNode.java
fail(message.getValue());
fail(message.toString());
public void runTest() throws Throwable { StringBuffer script = new StringBuffer(); script.append("require 'test/minirunit'").append('\n'); script.append("$silentTests = true").append('\n'); script.append("test_load('").append(scriptName()).append("')").append('\n'); script.append("test_get_last_failed()").append('\n'); IRubyObject lastFailed = runtime.evalScript(script.toString()); if (! lastFailed.isNil()) { RubyString message = (RubyString) lastFailed.callMethod("to_s"); fail(message.getValue()); } System.out.flush(); // Without a flush Ant will miss some of our output }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/ScriptTestSuite.java/buggy/test/org/jruby/test/ScriptTestSuite.java
javaObjectClass.defineMethod("java_type", CallbackFactory.getMethod(RubyJavaObject.class, "java_type"));
public static RubyClass createJavaObjectClass(Ruby ruby) { RubyClass javaObjectClass = ruby.defineClass("JavaObject", ruby.getClasses().getObjectClass()); javaObjectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyJavaObject.class, "to_s")); javaObjectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyJavaObject.class, "equal")); javaObjectClass.defineMethod("==", CallbackFactory.getMethod(RubyJavaObject.class, "equal")); javaObjectClass.defineMethod("hash", CallbackFactory.getMethod(RubyJavaObject.class, "hash")); javaObjectClass.getInternalClass().undefMethod("new"); return javaObjectClass; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/89272e383891a75366988c82cce7c8626dcf5e2d/RubyJavaObject.java/clean/org/jruby/RubyJavaObject.java
/*rb_define_private_method(rb_cModule, "append_features", rb_mod_append_features, 1); rb_define_private_method(rb_cModule, "extend_object", rb_mod_extend_object, 1); rb_define_private_method(rb_cModule, "include", rb_mod_include, -1); rb_define_private_method(rb_cModule, "public", rb_mod_public, -1); rb_define_private_method(rb_cModule, "protected", rb_mod_protected, -1); rb_define_private_method(rb_cModule, "private", rb_mod_private, -1); rb_define_private_method(rb_cModule, "module_function", rb_mod_modfunc, -1); rb_define_method(rb_cModule, "method_defined?", rb_mod_method_defined, 1); rb_define_method(rb_cModule, "public_class_method", rb_mod_public_method, -1); rb_define_method(rb_cModule, "private_class_method", rb_mod_private_method, -1); rb_define_method(rb_cModule, "module_eval", rb_mod_module_eval, -1); rb_define_method(rb_cModule, "class_eval", rb_mod_module_eval, -1); rb_undef_method(rb_cClass, "module_function"); rb_define_private_method(rb_cModule, "remove_method", rb_mod_remove_method, 1); rb_define_private_method(rb_cModule, "undef_method", rb_mod_undef_method, 1); rb_define_private_method(rb_cModule, "alias_method", rb_mod_alias_method, 2); rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "nesting", rb_mod_nesting, 0); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/
public static void initModuleClass(RubyClass moduleClass) { moduleClass.defineMethod("===", getMethod("op_eqq", RubyObject.class, false)); moduleClass.defineMethod("<=>", getMethod("op_cmp", RubyObject.class, false)); moduleClass.defineMethod("<", getMethod("op_lt", RubyObject.class, false)); moduleClass.defineMethod("<=", getMethod("op_le", RubyObject.class, false)); moduleClass.defineMethod(">", getMethod("op_gt", RubyObject.class, false)); moduleClass.defineMethod(">=", getMethod("op_ge", RubyObject.class, false)); moduleClass.defineMethod("clone", getMethod("m_clone", false)); moduleClass.defineMethod("dup", getMethod("m_dup", false)); moduleClass.defineMethod("to_s", getMethod("m_to_s", false)); moduleClass.defineMethod("included_modules", getMethod("m_included_modules", false)); moduleClass.defineMethod("name", getMethod("m_name", false)); moduleClass.defineMethod("ancestors", getMethod("m_ancestors", false)); moduleClass.definePrivateMethod("attr", getMethod("m_attr", RubySymbol.class, true)); moduleClass.definePrivateMethod("attr_reader", getMethod("m_attr_reader", true)); moduleClass.definePrivateMethod("attr_writer", getMethod("m_attr_writer", true)); moduleClass.definePrivateMethod("attr_accessor", getMethod("m_attr_accessor", true)); moduleClass.defineSingletonMethod("new", getSingletonMethod("m_new", false)); moduleClass.defineMethod("initialize", getMethod("m_initialize", true)); moduleClass.defineMethod("instance_methods", getMethod("m_instance_methods", true)); moduleClass.defineMethod("public_instance_methods", getMethod("m_instance_methods", true)); moduleClass.defineMethod("protected_instance_methods", getMethod("m_protected_instance_methods", true)); moduleClass.defineMethod("private_instance_methods", getMethod("m_private_instance_methods", true)); moduleClass.defineMethod("constants", getMethod("m_constants", false)); moduleClass.defineMethod("const_get", getMethod("m_const_get", RubySymbol.class, false)); moduleClass.defineMethod("const_set", getMethod("m_const_set", RubySymbol.class, RubyObject.class)); moduleClass.defineMethod("const_defined?", getMethod("m_const_defined", RubySymbol.class, false)); moduleClass.definePrivateMethod("method_added", getDummyMethod()); moduleClass.defineMethod("class_variables", getMethod("m_class_variables", false)); moduleClass.definePrivateMethod("remove_class_variable", getMethod("m_remove_class_variable", RubyObject.class, false)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a9420f23379e292698ea011ab08fb480b4decbcc/RbModule.java/clean/org/jruby/core/RbModule.java
DefaultMutableTreeNode root = (DefaultMutableTreeNode) tm.getRoot();
private void buildTreeNode(ImageDisplay node) { DefaultMutableTreeNode dtn; DefaultTreeModel tm = (DefaultTreeModel) getModel(); dtn = (DefaultMutableTreeNode) identityMap.get(node); if (dtn == null) { // create a tree node dtn = new DefaultMutableTreeNode(node); identityMap.put(node, dtn); } ImageDisplay parent = node.getParentDisplay(); DefaultMutableTreeNode root = (DefaultMutableTreeNode) tm.getRoot(); if (parent.getParentDisplay() == null) { //i.e. the parent is root if (!(hasBeenAdded(dtn, root))) tm.insertNodeInto(dtn, root, root.getChildCount()); } else { DefaultMutableTreeNode pdtn = (DefaultMutableTreeNode) identityMap.get(parent); if (pdtn == null) { // create a tree node pdtn = new DefaultMutableTreeNode(parent); identityMap.put(parent, pdtn); } if (!(hasBeenAdded(dtn, pdtn))) tm.insertNodeInto(dtn, pdtn, pdtn.getChildCount()); buildTreeNode(parent); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/FindResultsPane.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/finder/FindResultsPane.java
*/
private void buildTreeNode(ImageDisplay node) { DefaultMutableTreeNode dtn; DefaultTreeModel tm = (DefaultTreeModel) getModel(); dtn = (DefaultMutableTreeNode) identityMap.get(node); if (dtn == null) { // create a tree node dtn = new DefaultMutableTreeNode(node); identityMap.put(node, dtn); } ImageDisplay parent = node.getParentDisplay(); DefaultMutableTreeNode root = (DefaultMutableTreeNode) tm.getRoot(); if (parent.getParentDisplay() == null) { //i.e. the parent is root if (!(hasBeenAdded(dtn, root))) tm.insertNodeInto(dtn, root, root.getChildCount()); } else { DefaultMutableTreeNode pdtn = (DefaultMutableTreeNode) identityMap.get(parent); if (pdtn == null) { // create a tree node pdtn = new DefaultMutableTreeNode(parent); identityMap.put(parent, pdtn); } if (!(hasBeenAdded(dtn, pdtn))) tm.insertNodeInto(dtn, pdtn, pdtn.getChildCount()); buildTreeNode(parent); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/FindResultsPane.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/finder/FindResultsPane.java
return getRuntime().newFixnum(hashCode());
return getRuntime().newFixnum(new Double(value).hashCode());
public RubyFixnum hash() { return getRuntime().newFixnum(hashCode()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4b12521bf34cff2c9841b1dacb1a929f6def5327/RubyFloat.java/buggy/src/org/jruby/RubyFloat.java
flater = new Deflater(level,true);
flater = new Deflater(level,false);
public ZlibDeflate(IRubyObject caller, int level, int win_bits, int memlevel, int strategy) { super(); flater = new Deflater(level,true); flater.setStrategy(strategy); collected = new StringBuffer(); runtime = caller.getRuntime(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c9e16f0d2d769c555189a2e11bfe3a4c8b098650/ZlibDeflate.java/clean/src/org/jruby/util/ZlibDeflate.java
label_7:
label_8:
final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_7: while (true) { if (jj_2_12(2)) { ; } else { break label_7; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[58] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[60] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
break label_7;
break label_8;
final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_7: while (true) { if (jj_2_12(2)) { ; } else { break label_7; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[58] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[60] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[58] = jj_gen;
jj_la1[59] = jj_gen;
final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_7: while (true) { if (jj_2_12(2)) { ; } else { break label_7; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[58] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[60] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[59] = jj_gen;
jj_la1[60] = jj_gen;
final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_7: while (true) { if (jj_2_12(2)) { ; } else { break label_7; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[58] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[60] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[60] = jj_gen;
jj_la1[61] = jj_gen;
final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_7: while (true) { if (jj_2_12(2)) { ; } else { break label_7; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[58] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[60] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
label_8:
label_9:
final public Object AndExpression() throws ParseException { Object e, e2; e = CExpression(); label_8: while (true) { if (jj_2_14(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[64] = jj_gen; ; } jj_consume_token(OP_AND); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[65] = jj_gen; ; } e2 = CExpression(); e = new Expression.AndBuilder(e, e2); } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
break label_8;
break label_9;
final public Object AndExpression() throws ParseException { Object e, e2; e = CExpression(); label_8: while (true) { if (jj_2_14(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[64] = jj_gen; ; } jj_consume_token(OP_AND); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[65] = jj_gen; ; } e2 = CExpression(); e = new Expression.AndBuilder(e, e2); } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[64] = jj_gen;
jj_la1[65] = jj_gen;
final public Object AndExpression() throws ParseException { Object e, e2; e = CExpression(); label_8: while (true) { if (jj_2_14(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[64] = jj_gen; ; } jj_consume_token(OP_AND); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[65] = jj_gen; ; } e2 = CExpression(); e = new Expression.AndBuilder(e, e2); } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[65] = jj_gen;
jj_la1[66] = jj_gen;
final public Object AndExpression() throws ParseException { Object e, e2; e = CExpression(); label_8: while (true) { if (jj_2_14(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[64] = jj_gen; ; } jj_consume_token(OP_AND); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[65] = jj_gen; ; } e2 = CExpression(); e = new Expression.AndBuilder(e, e2); } {if (true) return e;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[37] = jj_gen;
jj_la1[38] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[37] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } list.addElement(e); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[39] = jj_gen; break label_4; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[40] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[42] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[38] = jj_gen;
jj_la1[39] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[37] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } list.addElement(e); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[39] = jj_gen; break label_4; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[40] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[42] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
label_4:
label_5:
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[37] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } list.addElement(e); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[39] = jj_gen; break label_4; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[40] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[42] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[39] = jj_gen; break label_4;
jj_la1[40] = jj_gen; break label_5;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[37] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } list.addElement(e); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[39] = jj_gen; break label_4; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[40] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[42] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[40] = jj_gen;
jj_la1[41] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[37] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } list.addElement(e); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[39] = jj_gen; break label_4; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[40] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[42] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[41] = jj_gen;
jj_la1[42] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[37] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } list.addElement(e); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[39] = jj_gen; break label_4; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[40] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[42] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[42] = jj_gen;
jj_la1[43] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[37] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } list.addElement(e); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[39] = jj_gen; break label_4; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[40] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[42] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
label_12:
label_13:
final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[83] = jj_gen; break label_12; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[84] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[86] = jj_gen; ; } label_13: while (true) { if (jj_2_21(1)) { ; } else { break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[87] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[88] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[89] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[83] = jj_gen; break label_12;
jj_la1[84] = jj_gen; break label_13;
final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[83] = jj_gen; break label_12; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[84] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[86] = jj_gen; ; } label_13: while (true) { if (jj_2_21(1)) { ; } else { break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[87] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[88] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[89] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5a4586d6c4b36b78c3896b3ea43acac5de0be624/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java