rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
invalidate(); repaint(); | rosterGroup.setName(newName); | public void actionPerformed(ActionEvent e) { int ok = JOptionPane.showConfirmDialog(group, Res.getString("message.delete.confirmation", group.getGroupName()), Res.getString("title.confirmation"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.YES_OPTION) { String groupName = group.getGroupName(); Roster roster = SparkManager.getConnection().getRoster(); RosterGroup rosterGroup = roster.getGroup(groupName); if (rosterGroup != null) { for (RosterEntry entry : rosterGroup.getEntries()) { try { rosterGroup.removeEntry(entry); } catch (XMPPException e1) { Log.error("Error removing entry", e1); } } } // Remove from UI removeContactGroup(group); invalidate(); repaint(); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
public void actionPerformed(ActionEvent e) { String newName = JOptionPane.showInputDialog(group, Res.getString("label.rename.to") + ":", Res.getString("title.rename.roster.group"), JOptionPane.QUESTION_MESSAGE); if (!ModelUtil.hasLength(newName)) { return; } String groupName = group.getGroupName(); Roster roster = SparkManager.getConnection().getRoster(); RosterGroup rosterGroup = roster.getGroup(groupName); if (rosterGroup != null) { removeContactGroup(group); rosterGroup.setName(newName); } | public void actionPerformed(ActionEvent actionEvent) { SparkManager.getTransferManager().sendFileTo(item); | public void actionPerformed(ActionEvent e) { String newName = JOptionPane.showInputDialog(group, Res.getString("label.rename.to") + ":", Res.getString("title.rename.roster.group"), JOptionPane.QUESTION_MESSAGE); if (!ModelUtil.hasLength(newName)) { return; } String groupName = group.getGroupName(); Roster roster = SparkManager.getConnection().getRoster(); RosterGroup rosterGroup = roster.getGroup(groupName); if (rosterGroup != null) { removeContactGroup(group); rosterGroup.setName(newName); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
activateChat(item.getContactJID(), item.getNickname()); | chatManager.activateChat(item.getContactJID(), item.getNickname()); | public void contactItemDoubleClicked(ContactItem item) { activeItem = item; ChatManager chatManager = SparkManager.getChatManager(); boolean handled = chatManager.fireContactItemDoubleClicked(item); if (!handled) { activateChat(item.getContactJID(), item.getNickname()); } clearSelectionList(item); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
&& RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { | && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { | private synchronized void handleEntriesUpdated(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 = offlineGroup.getContactItemByJID(jid); if (item == null) { 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(); } else { offlineGroup.addContactItem(item); offlineGroup.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. final Set<String> groupSet = new HashSet<String>(); 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/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
&& RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { | && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { | 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 = offlineGroup.getContactItemByJID(jid); if (item == null) { 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(); } else { offlineGroup.addContactItem(item); offlineGroup.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. final Set<String> groupSet = new HashSet<String>(); 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/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
public void actionPerformed(ActionEvent actionEvent) { SparkManager.getTransferManager().sendFileTo(item); | public void actionPerformed(ActionEvent e) { removeContactFromRoster(item); | public void actionPerformed(ActionEvent actionEvent) { SparkManager.getTransferManager().sendFileTo(item); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
removeContactFromRoster(item); | VCardManager vcardSupport = SparkManager.getVCardManager(); String jid = item.getFullJID(); vcardSupport.viewProfile(jid, SparkManager.getWorkspace()); | public void actionPerformed(ActionEvent e) { removeContactFromRoster(item); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
public void actionPerformed(ActionEvent e) { VCardManager vcardSupport = SparkManager.getVCardManager(); String jid = item.getFullJID(); vcardSupport.viewProfile(jid, SparkManager.getWorkspace()); | public void actionPerformed(ActionEvent actionEvent) { try { LastActivity activity = LastActivity.getLastActivity(SparkManager.getConnection(), item.getFullJID()); long idleTime = (activity.getIdleTime() * 1000); String time = ModelUtil.getTimeFromLong(idleTime); JOptionPane.showMessageDialog(getGUI(), Res.getString("message.idle.for", time), Res.getString("title.last.activity"), JOptionPane.INFORMATION_MESSAGE); } catch (XMPPException e1) { } | public void actionPerformed(ActionEvent e) { VCardManager vcardSupport = SparkManager.getVCardManager(); String jid = item.getFullJID(); vcardSupport.viewProfile(jid, SparkManager.getWorkspace()); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
public void actionPerformed(ActionEvent actionEvent) { try { LastActivity activity = LastActivity.getLastActivity(SparkManager.getConnection(), item.getFullJID()); long idleTime = (activity.getIdleTime() * 1000); String time = ModelUtil.getTimeFromLong(idleTime); JOptionPane.showMessageDialog(getGUI(), Res.getString("message.idle.for", time), Res.getString("title.last.activity"), JOptionPane.INFORMATION_MESSAGE); } catch (XMPPException e1) { } | public void actionPerformed(ActionEvent e) { String jid = item.getFullJID(); Presence response = new Presence(Presence.Type.subscribe); response.setTo(jid); | public void actionPerformed(ActionEvent actionEvent) { try { LastActivity activity = LastActivity.getLastActivity(SparkManager.getConnection(), item.getFullJID()); long idleTime = (activity.getIdleTime() * 1000); String time = ModelUtil.getTimeFromLong(idleTime); JOptionPane.showMessageDialog(getGUI(), Res.getString("message.idle.for", time), Res.getString("title.last.activity"), JOptionPane.INFORMATION_MESSAGE); } catch (XMPPException e1) { } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
SparkManager.getConnection().sendPacket(response); | public void actionPerformed(ActionEvent actionEvent) { try { LastActivity activity = LastActivity.getLastActivity(SparkManager.getConnection(), item.getFullJID()); long idleTime = (activity.getIdleTime() * 1000); String time = ModelUtil.getTimeFromLong(idleTime); JOptionPane.showMessageDialog(getGUI(), Res.getString("message.idle.for", time), Res.getString("title.last.activity"), JOptionPane.INFORMATION_MESSAGE); } catch (XMPPException e1) { } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
|
String jid = item.getFullJID(); Presence response = new Presence(Presence.Type.subscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); | sendMessages(items); | public void actionPerformed(ActionEvent e) { String jid = item.getFullJID(); Presence response = new Presence(Presence.Type.subscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
Presence response = new Presence(Presence.Type.subscribed); | Presence response = new Presence(Presence.Type.unsubscribe); | public void actionPerformed(ActionEvent e) { SparkManager.getWorkspace().removeAlert(layoutPanel); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), Res.getString("message.add.user"), Res.getString("message.add.to.roster"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(UserManager.unescapeJID(jid)); rosterDialog.showRosterDialog(); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
public void actionPerformed(ActionEvent e) { SparkManager.getWorkspace().removeAlert(layoutPanel); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), Res.getString("message.add.user"), Res.getString("message.add.to.roster"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(UserManager.unescapeJID(jid)); rosterDialog.showRosterDialog(); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
||
int ok = JOptionPane.showConfirmDialog(getGUI(), Res.getString("message.add.user"), Res.getString("message.add.to.roster"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(UserManager.unescapeJID(jid)); rosterDialog.showRosterDialog(); } | public void actionPerformed(ActionEvent e) { SparkManager.getWorkspace().removeAlert(layoutPanel); Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); int ok = JOptionPane.showConfirmDialog(getGUI(), Res.getString("message.add.user"), Res.getString("message.add.to.roster"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ok == JOptionPane.OK_OPTION) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(UserManager.unescapeJID(jid)); rosterDialog.showRosterDialog(); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
|
SparkManager.getWorkspace().removeAlert(layoutPanel); Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); | SparkManager.getVCardManager().viewProfile(jid, getGUI()); | public void actionPerformed(ActionEvent e) { SparkManager.getWorkspace().removeAlert(layoutPanel); // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
&& RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus(); | && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus(); | private void updateUserPresence(Presence presence) { if (presence == null) { return; } Roster roster = SparkManager.getConnection().getRoster(); final String bareJID = StringUtils.parseBareAddress(presence.getFrom()); RosterEntry entry = roster.getEntry(bareJID); boolean isPending = entry != null && (entry.getType() == RosterPacket.ItemType.NONE || entry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus(); // If online, check to see if they are in the offline group. // If so, remove from offline group and add to all groups they // belong to. if (presence.getType() == Presence.Type.available && offlineGroup.getContactItemByJID(bareJID) != null) { changeOfflineToOnline(bareJID, entry, presence); } else if (presence.getFrom().indexOf("workgroup.") != -1) { changeOfflineToOnline(bareJID, entry, presence); } // If online, but not in offline group, update presence. else if (presence.getType() == Presence.Type.available) { final Iterator groupIterator = groupList.iterator(); while (groupIterator.hasNext()) { ContactGroup group = (ContactGroup)groupIterator.next(); ContactItem item = group.getContactItemByJID(bareJID); if (item != null) { item.setPresence(presence); group.fireContactGroupUpdated(); } } } // If not available, move to offline group. else if (presence.getType() == Presence.Type.unavailable && !isPending) { presence = roster.getPresence(bareJID); if (presence == null) { moveToOfflineGroup(bareJID); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java |
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. // System.err.println("mouse clicked.."+e); //System.err.println("link state is "+linkState); if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { //System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } //System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { //System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); //System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { //System.err.println("zooming in on node..."); PBounds b = mod.getBufferedBounds(); camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { //System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; if (e.isShiftDown()) { //System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); e.setHandled(true); } else { //System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
||
camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); | PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); | public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. // System.err.println("mouse clicked.."+e); //System.err.println("link state is "+linkState); if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { //System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } //System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { //System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); //System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { //System.err.println("zooming in on node..."); PBounds b = mod.getBufferedBounds(); camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { //System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; if (e.isShiftDown()) { //System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); e.setHandled(true); } else { //System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
if (e.isShiftDown()) { | else if (e.isShiftDown()) { | public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. // System.err.println("mouse clicked.."+e); //System.err.println("link state is "+linkState); if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { //System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } //System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { //System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); //System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { //System.err.println("zooming in on node..."); PBounds b = mod.getBufferedBounds(); camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { //System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; if (e.isShiftDown()) { //System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); e.setHandled(true); } else { //System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
setModulesDisplayMode(); | public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. // System.err.println("mouse clicked.."+e); //System.err.println("link state is "+linkState); if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { //System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } //System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { //System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); //System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { //System.err.println("zooming in on node..."); PBounds b = mod.getBufferedBounds(); camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { //System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; if (e.isShiftDown()) { //System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); e.setHandled(true); } else { //System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
|
setModulesDisplayMode(); | protected void drag(PInputEvent e) { PNode node = e.getPickedNode(); if (node instanceof ModuleView) { if (linkState != LINKING_MODULES) { ModuleView mod = (ModuleView) node; Dimension2D delta = e.getDeltaRelativeTo(node); mod.translate(delta.getWidth(),delta.getHeight()); e.setHandled(true); } } else if (linkState == LINK_CHANGING_POINT) { Dimension2D delta = e.getDeltaRelativeTo(node); if (node instanceof LinkSelectionTarget) { LinkSelectionTarget target = (LinkSelectionTarget) node; target.translate(delta.getWidth(),delta.getHeight()); } e.setHandled(true); } else if (!(node instanceof FormalParameter) && linkState == NOT_LINKING){ super.drag(e); e.setHandled(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
|
setModulesDisplayMode(); | private void evaluatePopup(PInputEvent e) { postPopup=true; PNode n = e.getPickedNode(); PNode p = n.getParent(); //System.err.println("popup. zooming out of "+n); if (n instanceof BufferedObject && (p == canvas.getLayer() || p instanceof ChainView)) { // if I'm on a module that's not in a chain or not. // I should zoom to view of whole canvas PBounds b = canvas.getBufferedBounds(); PCamera camera =canvas.getCamera(); camera.animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); } else { double scaleFactor = 1/Constants.SCALE_FACTOR; zoom(scaleFactor,e); } e.setHandled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
|
} | } | private void finishModuleTargetLink(ModuleLinkTarget n) { //first, if input and output are the same, barf. if (n.getModuleView() == moduleLinkOriginTarget.getModuleView()) { showSelfLinkError(); cancelModuleTargetLink(); return; } else if (n.isInputLinkTarget() && moduleLinkOriginTarget.isInputLinkTarget()) { canvas.setStatusLabel(NO_INPUT_INPUT_LINKS); cancelModuleTargetLink(); return; } else if (n.isOutputLinkTarget() && moduleLinkOriginTarget.isOutputLinkTarget()) { canvas.setStatusLabel(NO_OUTPUT_OUTPUT_LINKS); cancelModuleTargetLink(); return; } // System.err.println("finishing module target link"); // ok. now, create links and make sure we have no cycles. // get inputs & get outputs Collection params1 = moduleLinkOriginTarget.getParameters(); Collection params2 = n.getParameters(); // set other end point of link. moduleLink.setTarget(n); if (finishModuleTargetLink(params1,params2) == false) { cancelModuleTargetLink(); return; } if (foundCycle() == true) { canvas.setStatusLabel(NO_CYCLES); cancelModuleTargetLink(); } else { cleanUpModuleTargetLink(); } moduleLinkOriginTarget = null; linkState = NOT_LINKING; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
private void finishModuleTargetLink(ModuleLinkTarget n) { //first, if input and output are the same, barf. if (n.getModuleView() == moduleLinkOriginTarget.getModuleView()) { showSelfLinkError(); cancelModuleTargetLink(); return; } else if (n.isInputLinkTarget() && moduleLinkOriginTarget.isInputLinkTarget()) { canvas.setStatusLabel(NO_INPUT_INPUT_LINKS); cancelModuleTargetLink(); return; } else if (n.isOutputLinkTarget() && moduleLinkOriginTarget.isOutputLinkTarget()) { canvas.setStatusLabel(NO_OUTPUT_OUTPUT_LINKS); cancelModuleTargetLink(); return; } // System.err.println("finishing module target link"); // ok. now, create links and make sure we have no cycles. // get inputs & get outputs Collection params1 = moduleLinkOriginTarget.getParameters(); Collection params2 = n.getParameters(); // set other end point of link. moduleLink.setTarget(n); if (finishModuleTargetLink(params1,params2) == false) { cancelModuleTargetLink(); return; } if (foundCycle() == true) { canvas.setStatusLabel(NO_CYCLES); cancelModuleTargetLink(); } else { cleanUpModuleTargetLink(); } moduleLinkOriginTarget = null; linkState = NOT_LINKING; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
||
public void mouseEntered(PInputEvent e) { PNode node = e.getPickedNode(); if (node instanceof FormalParameter) { lastParameterEntered = (FormalParameter) node; //System.err.println("mouse entered last entered.."+ if (linkState == NOT_LINKING) { // turn on params for this parameter lastParameterEntered.setParamsHighlighted(true); // set all modules of this same type to be highlighted. ModuleView mod = lastParameterEntered.getModuleView(); mod.setModulesHighlighted(true); } e.setHandled(true); } else if (node instanceof ModuleLinkTarget && linkState == NOT_LINKING) { ((ModuleLinkTarget) node).setParametersHighlighted(true); //ModuleView mod = ((ModuleLinkTarget) node).getModuleView(); //mod.setAllHighlights(true); e.setHandled(true); } else if (node instanceof ModuleView && linkState == NOT_LINKING) { ModuleView mod = (ModuleView) node; // highlight all matching params.. mod.setModulesHighlighted(true); mod.setAllHighlights(true); e.setHandled(true); } else { super.mouseEntered(e); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
||
else if (node instanceof ModuleView && linkState == NOT_LINKING) { ModuleView mod = (ModuleView) node; mod.setModulesHighlighted(true); | else if (node instanceof SingleModuleView && linkState == NOT_LINKING) { SingleModuleView mod = (SingleModuleView) node; | public void mouseEntered(PInputEvent e) { PNode node = e.getPickedNode(); if (node instanceof FormalParameter) { lastParameterEntered = (FormalParameter) node; //System.err.println("mouse entered last entered.."+ if (linkState == NOT_LINKING) { // turn on params for this parameter lastParameterEntered.setParamsHighlighted(true); // set all modules of this same type to be highlighted. ModuleView mod = lastParameterEntered.getModuleView(); mod.setModulesHighlighted(true); } e.setHandled(true); } else if (node instanceof ModuleLinkTarget && linkState == NOT_LINKING) { ((ModuleLinkTarget) node).setParametersHighlighted(true); //ModuleView mod = ((ModuleLinkTarget) node).getModuleView(); //mod.setAllHighlights(true); e.setHandled(true); } else if (node instanceof ModuleView && linkState == NOT_LINKING) { ModuleView mod = (ModuleView) node; // highlight all matching params.. mod.setModulesHighlighted(true); mod.setAllHighlights(true); e.setHandled(true); } else { super.mouseEntered(e); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
public void mouseExited(PInputEvent e) { PNode node = e.getPickedNode(); //System.err.println("exiting..."+node); lastParameterEntered = null; //System.err.println("last parameter entered cleared"); if (node instanceof FormalParameter) { FormalParameter param = (FormalParameter) node; if (linkState == NOT_LINKING) { param.setParamsHighlighted(false); ModuleView mod = param.getModuleView(); mod.setAllHighlights(false); } e.setHandled(true); } else if (node instanceof ModuleLinkTarget && linkState == NOT_LINKING) { //ModuleView mod = ((ModuleLinkTarget) node).getModuleView(); //mod.setAllHighlights(false); ((ModuleLinkTarget) node).setParametersHighlighted(false); e.setHandled(true); } else if (node instanceof ModuleView && linkState == NOT_LINKING) { ModuleView mod = (ModuleView) node; mod.setAllHighlights(false); e.setHandled(true); } else super.mouseExited(e); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
||
else if (node instanceof ModuleView && linkState == NOT_LINKING) { ModuleView mod = (ModuleView) node; | else if (node instanceof SingleModuleView && linkState == NOT_LINKING) { SingleModuleView mod = (SingleModuleView) node; | public void mouseExited(PInputEvent e) { PNode node = e.getPickedNode(); //System.err.println("exiting..."+node); lastParameterEntered = null; //System.err.println("last parameter entered cleared"); if (node instanceof FormalParameter) { FormalParameter param = (FormalParameter) node; if (linkState == NOT_LINKING) { param.setParamsHighlighted(false); ModuleView mod = param.getModuleView(); mod.setAllHighlights(false); } e.setHandled(true); } else if (node instanceof ModuleLinkTarget && linkState == NOT_LINKING) { //ModuleView mod = ((ModuleLinkTarget) node).getModuleView(); //mod.setAllHighlights(false); ((ModuleLinkTarget) node).setParametersHighlighted(false); e.setHandled(true); } else if (node instanceof ModuleView && linkState == NOT_LINKING) { ModuleView mod = (ModuleView) node; mod.setAllHighlights(false); e.setHandled(true); } else super.mouseExited(e); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
private void mousePressedLinkingModuleTargets(PNode node,PInputEvent e) { //System.err.println("mouse pressed linking module targets "+e); PNode n = e.getPickedNode(); //System.err.println("on node..."+n); if (e.getClickCount() ==2) { cancelModuleTargetLink(); //System.err.println("mouse pressed linking params. setting to linking cancellation"); linkState = LINKING_CANCELLATION; postLinkCompletion = true; } else if (!(n instanceof ModuleLinkTarget)) { // we're on canvas. Point2D pos = e.getPosition(); // System.err.println("...adding intermediate point to module links.."); moduleLink.setIntermediatePoint((float) pos.getX(),(float) pos.getY()); } else if (moduleLinkOriginTarget != null) { //System.err.println("... finishing modulelinkorigintarget..."); finishModuleTargetLink((ModuleLinkTarget) n); postLinkCompletion = true; } e.setHandled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
||
private void mousePressedLinkingModuleTargets(PNode node,PInputEvent e) { //System.err.println("mouse pressed linking module targets "+e); PNode n = e.getPickedNode(); //System.err.println("on node..."+n); if (e.getClickCount() ==2) { cancelModuleTargetLink(); //System.err.println("mouse pressed linking params. setting to linking cancellation"); linkState = LINKING_CANCELLATION; postLinkCompletion = true; } else if (!(n instanceof ModuleLinkTarget)) { // we're on canvas. Point2D pos = e.getPosition(); // System.err.println("...adding intermediate point to module links.."); moduleLink.setIntermediatePoint((float) pos.getX(),(float) pos.getY()); } else if (moduleLinkOriginTarget != null) { //System.err.println("... finishing modulelinkorigintarget..."); finishModuleTargetLink((ModuleLinkTarget) n); postLinkCompletion = true; } e.setHandled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
||
private void mousePressedLinkingModuleTargets(PNode node,PInputEvent e) { //System.err.println("mouse pressed linking module targets "+e); PNode n = e.getPickedNode(); //System.err.println("on node..."+n); if (e.getClickCount() ==2) { cancelModuleTargetLink(); //System.err.println("mouse pressed linking params. setting to linking cancellation"); linkState = LINKING_CANCELLATION; postLinkCompletion = true; } else if (!(n instanceof ModuleLinkTarget)) { // we're on canvas. Point2D pos = e.getPosition(); // System.err.println("...adding intermediate point to module links.."); moduleLink.setIntermediatePoint((float) pos.getX(),(float) pos.getY()); } else if (moduleLinkOriginTarget != null) { //System.err.println("... finishing modulelinkorigintarget..."); finishModuleTargetLink((ModuleLinkTarget) n); postLinkCompletion = true; } e.setHandled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
||
setModulesDisplayMode(); | private void zoom(double scale,PInputEvent e) { PCamera camera=canvas.getCamera(); double curScale = camera.getScale(); curScale *= scale; Point2D pos = e.getPosition(); camera.scaleViewAboutPoint(curScale,pos.getX(),pos.getY()); e.setHandled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b41d6861c41e656afc38624cef034561955ba4a6/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java |
|
super(); | super(ClassifierFactory.getOwner()); | ClassifierView() { super(); setProperties(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/ClassifierView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/ClassifierView.java |
Holder h = classNameHolder.get( klass.getName() ); | String[][] checks = lockedByHolder.get( klass.getName() ); | public String[][] getLockChecks( Class<? extends IObject> klass ) { if ( klass == null ) throw new ApiUsageException( "Cannot proceed with null klass." ); Holder h = classNameHolder.get( klass.getName() ); if ( h == null ) throw new ApiUsageException( "Metadata not found for: " +klass.getName()); return h.getLockChecks( ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e30f801c3b2923483e1f69853136328bb21a1d79/ExtendedMetadata.java/buggy/components/server/src/ome/tools/hibernate/ExtendedMetadata.java |
if ( h == null ) | if ( checks == null ) | public String[][] getLockChecks( Class<? extends IObject> klass ) { if ( klass == null ) throw new ApiUsageException( "Cannot proceed with null klass." ); Holder h = classNameHolder.get( klass.getName() ); if ( h == null ) throw new ApiUsageException( "Metadata not found for: " +klass.getName()); return h.getLockChecks( ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e30f801c3b2923483e1f69853136328bb21a1d79/ExtendedMetadata.java/buggy/components/server/src/ome/tools/hibernate/ExtendedMetadata.java |
return h.getLockChecks( ); | return checks; | public String[][] getLockChecks( Class<? extends IObject> klass ) { if ( klass == null ) throw new ApiUsageException( "Cannot proceed with null klass." ); Holder h = classNameHolder.get( klass.getName() ); if ( h == null ) throw new ApiUsageException( "Metadata not found for: " +klass.getName()); return h.getLockChecks( ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e30f801c3b2923483e1f69853136328bb21a1d79/ExtendedMetadata.java/buggy/components/server/src/ome/tools/hibernate/ExtendedMetadata.java |
RubyModule receiver = runtime.getCurrentContext().getLastRubyClass(); | SinglyLinkedList base = runtime.getCurrentContext().peekCRef(); | public RubyArray nesting() { IRuby runtime = getRuntime(); RubyModule object = runtime.getObject(); RubyModule receiver = runtime.getCurrentContext().getLastRubyClass(); RubyArray result = runtime.newArray(); for (RubyModule current = receiver; current != object; current = current.getParent()) { result.append(current); } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/805d73b7462174e9e5c095eed22a09140bb79b5e/ModuleMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/ModuleMetaClass.java |
for (RubyModule current = receiver; current != object; current = current.getParent()) { result.append(current); | for (SinglyLinkedList current = base; current.getValue() != object; current = current.getNext()) { result.append((RubyModule)current.getValue()); | public RubyArray nesting() { IRuby runtime = getRuntime(); RubyModule object = runtime.getObject(); RubyModule receiver = runtime.getCurrentContext().getLastRubyClass(); RubyArray result = runtime.newArray(); for (RubyModule current = receiver; current != object; current = current.getParent()) { result.append(current); } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/805d73b7462174e9e5c095eed22a09140bb79b5e/ModuleMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/ModuleMetaClass.java |
logger.debug("Putting instrumeted entry: " | logger.debug("Putting instrumented entry: " | private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry)) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumeted entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b4bc10401980850d9425a743d8e46642e1457346/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = ruby.getCRef(); // +++ = null; // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { // savedCref = ruby.getCRef(); s.a. ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/59743974f1f8d5a50153b05647dac2d75d510976/ScopeNode.java/buggy/org/jruby/nodes/ScopeNode.java |
||
controller.getAction(AnnotatorControl.FINISH).setEnabled(false); | public void finish() { if (model.getState() != READY) throw new IllegalStateException("This method can only be " + "invoked in the READY state."); AnnotationData d = model.getAnnotationType(); d.setText(view.getAnnotationText()); view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); model.fireAnnotationSaving(d); fireStateChange(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9794ffbd035a4de717ee211573b4844dd0eb3371/AnnotatorComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/util/annotator/view/AnnotatorComponent.java |
|
XYPlane(byte[] data, PlaneDef pDef, int sizeX, int sizeY, int bytesPerPixel, BytesConverter strategy) | XYPlane(PlaneDef pDef, Pixels pixels, MappedByteBuffer data) | XYPlane(byte[] data, PlaneDef pDef, int sizeX, int sizeY, int bytesPerPixel, BytesConverter strategy) { super(data, pDef, sizeX, sizeY, bytesPerPixel, strategy); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/XYPlane.java/clean/components/rendering/src/omeis/providers/re/data/XYPlane.java |
super(data, pDef, sizeX, sizeY, bytesPerPixel, strategy); | super(pDef, pixels, data); | XYPlane(byte[] data, PlaneDef pDef, int sizeX, int sizeY, int bytesPerPixel, BytesConverter strategy) { super(data, pDef, sizeX, sizeY, bytesPerPixel, strategy); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/XYPlane.java/clean/components/rendering/src/omeis/providers/re/data/XYPlane.java |
if (runtime.getScope().getLocalNames() != null) { | if (runtime.getScope().hasLocalVariables()) { | private boolean hasNewLocalVariables(IRubyParserResult result) { int newSize = 0; if (result.getLocalVariables() != null) { newSize = result.getLocalVariables().size(); } int oldSize = 0; if (runtime.getScope().getLocalNames() != null) { oldSize = runtime.getScope().getLocalNames().size(); } return newSize > oldSize; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e143e1ded2275ed4da3449d4a13446b099f800d/Parser.java/buggy/src/org/jruby/parser/Parser.java |
} catch (Exception e) { _log.error("Template: Unable to read template: " + this, e); out.write("<!--\n Template failed to read. Reason: "); | } catch (TemplateException e) { _log.error("Template: Unable to parse template: " + this, e); out.write("<!--\n Template failed to parse. Reason: "); | public final void write(FastWriter out, Context data) throws IOException { try { if (_content == null) { parse(); } } catch (Exception e) { _log.error("Template: Unable to read template: " + this, e); out.write("<!--\n Template failed to read. Reason: "); out.write(e.toString()); out.write(" \n-->"); } try { _content.write(out,data); } catch (PropertyException e) { String warning = "Template: Missing data in Map passed to template " + this; _log.warning(warning,e); out.write("<!--\n Could not interpret template. Reason: "); out.write(warning); out.write(e.toString()); out.write(" \n-->"); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/caae30b46935100916e734c44f76582390ec531e/WMTemplate.java/buggy/webmacro/src/org/webmacro/engine/WMTemplate.java |
"Template: Missing data in Map passed to template " + this; | "Template: Missing data in Context passed to template " + this; | public final void write(FastWriter out, Context data) throws IOException { try { if (_content == null) { parse(); } } catch (Exception e) { _log.error("Template: Unable to read template: " + this, e); out.write("<!--\n Template failed to read. Reason: "); out.write(e.toString()); out.write(" \n-->"); } try { _content.write(out,data); } catch (PropertyException e) { String warning = "Template: Missing data in Map passed to template " + this; _log.warning(warning,e); out.write("<!--\n Could not interpret template. Reason: "); out.write(warning); out.write(e.toString()); out.write(" \n-->"); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/caae30b46935100916e734c44f76582390ec531e/WMTemplate.java/buggy/webmacro/src/org/webmacro/engine/WMTemplate.java |
String message = "Would you like to end this session?"; if (true) { room.closeChatRoom(); return; } else { if (!room.isActive()) { | if (isGroupChat) { String message = "Would you like to end this session?"; final int ok = JOptionPane.showConfirmDialog(chatFrame, message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { | public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; String message = "Would you like to end this session?"; if (true) { room.closeChatRoom(); return; } else { if (!room.isActive()) { room.closeChatRoom(); return; } } final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e205e19b9a00e6f683dfc4115023e2f0efd8e3e9/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { | else { | public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; String message = "Would you like to end this session?"; if (true) { room.closeChatRoom(); return; } else { if (!room.isActive()) { room.closeChatRoom(); return; } } final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e205e19b9a00e6f683dfc4115023e2f0efd8e3e9/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; String message = "Would you like to end this session?"; if (true) { room.closeChatRoom(); return; } else { if (!room.isActive()) { room.closeChatRoom(); return; } } final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e205e19b9a00e6f683dfc4115023e2f0efd8e3e9/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
||
Type[] types = cm.getPropertyTypes(); classNameHolder.put(key, new Holder( cm, locksFields(types), lockedByFields(key,m) )); | locksHolder.put( key, new Locks(cm) ); | public ExtendedMetadata( SessionFactory sessionFactory ) { if ( sessionFactory == null ) throw new ApiUsageException( "SessionFactory may not be null." ); Map<String,ClassMetadata> m = sessionFactory.getAllClassMetadata(); for (String key : m.keySet()) { ClassMetadata cm = m.get(key); Type[] types = cm.getPropertyTypes(); classNameHolder.put(key, new Holder( cm, locksFields(types), lockedByFields(key,m) )); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e30f801c3b2923483e1f69853136328bb21a1d79/ExtendedMetadata.java/buggy/components/server/src/ome/tools/hibernate/ExtendedMetadata.java |
for (String key : m.keySet()) { ClassMetadata cm = m.get(key); lockedByHolder.put( key, lockedByFields(key, m) ); } | public ExtendedMetadata( SessionFactory sessionFactory ) { if ( sessionFactory == null ) throw new ApiUsageException( "SessionFactory may not be null." ); Map<String,ClassMetadata> m = sessionFactory.getAllClassMetadata(); for (String key : m.keySet()) { ClassMetadata cm = m.get(key); Type[] types = cm.getPropertyTypes(); classNameHolder.put(key, new Holder( cm, locksFields(types), lockedByFields(key,m) )); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e30f801c3b2923483e1f69853136328bb21a1d79/ExtendedMetadata.java/buggy/components/server/src/ome/tools/hibernate/ExtendedMetadata.java |
|
p.add(buildToolBar()); | JPanel bars = new JPanel(); bars.setLayout(new BoxLayout(bars, BoxLayout.X_AXIS)); bars.add(buildSelectToolBar()); bars.add(buildControlsToolBar()); p.add(bars); | private JPanel buildBody() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); p.add(classifierUI); p.add(new JSeparator()); p.add(buildToolBar()); return p; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/ClassifierView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/ClassifierView.java |
initComponents(); | void initialize(ClassifierModel model, ClassifierControl controller) { if (model == null) throw new IllegalArgumentException("No model."); if (controller == null) throw new IllegalArgumentException("No control."); this.controller = controller; this.model = model; statusBar = new StatusBar(); classifierUI = new ClassifierUI(model, controller); setTitle(getWindowTitle()); buildGUI(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/ClassifierView.java/clean/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/ClassifierView.java |
|
if(arg0.getOldValue()==null) { return; } | public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); if(null==articlePath) { //Article has not been stored previousley, so nothing have to be done return; } System.out.println("Article path"+articlePath); boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); System.out.println("loading other language "+result); if(result) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); }else { if(null!=language) { result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); System.out.println("loading other language "+result); } } } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/359eb7a18849ea5e020014473c49d0bb21322e5f/EditArticleBlock.java/buggy/src/java/com/idega/block/article/component/EditArticleBlock.java |
|
public void addClassData(ClassData classData) | public synchronized void addClassData(ClassData classData) | public void addClassData(ClassData classData) { if (children.containsKey(classData.getBaseName())) throw new IllegalArgumentException("Source file " + this.name + " already contains a class with the name " + classData.getBaseName()); // Each key is a class basename, stored as an String object. // Each value is information about the class, stored as a ClassData object. children.put(classData.getBaseName(), classData); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/eac239953fcca75f4c9456b19bc9afd820e0f754/SourceFileData.java/buggy/cobertura/src/net/sourceforge/cobertura/coveragedata/SourceFileData.java |
int state = model.getState(); if (state == Browser.READY) { setEnabled(true); } else setEnabled(false); | setEnabled(model.getState() == Browser.READY ); | protected void onStateChange() { int state = model.getState(); if (state == Browser.READY) { //if (model.getBrowserType() == Browser.IMAGES_EXPLORER) setEnabled(true); // else onDisplayChange(model.getLastSelectedDisplay()); } else setEnabled(false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/SortByDateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/SortByDateAction.java |
Event currentEvent = securitySystem.getCurrentEvent(); Event mergedEvent = (Event) internalSave( currentEvent, filter ); securitySystem.setCurrentEvent( mergedEvent ); | private void beforeUpdate( Object argument, UpdateFilter filter ) { if ( argument == null ) throw new IllegalArgumentException( "Argument to save cannot be null."); if ( logger.isDebugEnabled() ) logger.debug( " Saving event before merge. " ); // Save event before we enter. Event currentEvent = securitySystem.getCurrentEvent(); Event mergedEvent = (Event) internalSave( currentEvent, filter ); securitySystem.setCurrentEvent( mergedEvent ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/12f6ae8f254307cf501799bd57a8496e5a87439d/UpdateImpl.java/buggy/components/server/src/ome/logic/UpdateImpl.java |
|
UpdateFilter filter = new UpdateFilter( securitySystem, localQuery ); | UpdateFilter filter = new UpdateFilter( ); | private <T> T doAction( T graph, UpdateAction<T> action ) { T retVal; UpdateFilter filter = new UpdateFilter( securitySystem, localQuery ); Event currentEvent = securitySystem.getCurrentEvent(); try { beforeUpdate( graph, filter ); retVal = action.run( graph, filter ); afterUpdate( currentEvent, filter ); } finally { // Return the previous event. securitySystem.setCurrentEvent( currentEvent ); } return retVal; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/12f6ae8f254307cf501799bd57a8496e5a87439d/UpdateImpl.java/buggy/components/server/src/ome/logic/UpdateImpl.java |
{ setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); GridBagLayout gridbag = new GridBagLayout(); setLayout(gridbag); GridBagConstraints c = new GridBagConstraints(); JLabel label = new JLabel(" Wavelength"); c.ipadx = RenderingAgt.H_SPACE; c.weightx = 0.5; c.gridx = 0; c.gridy = 0; c.fill = GridBagConstraints.HORIZONTAL; gridbag.setConstraints(label, c); add(label); c.gridy = 1; label = new JLabel(" Map"); gridbag.setConstraints(label, c); add(label); c.gridy = 2; gridbag.setConstraints(gammaLabel, c); add(gammaLabel); c.gridy = 3; label = new JLabel(" Resolution"); gridbag.setConstraints(label, c); add(label); c.gridy = 4; label = new JLabel(" Histogram"); gridbag.setConstraints(label, c); add(label); c.gridx = 1; c.gridy = 0; JPanel wp = buildComponentPanel(wavelengths); gridbag.setConstraints(wp, c); add(wp); c.gridy = 1; wp = buildComponentPanel(transformations); gridbag.setConstraints(wp, c); add(wp); c.gridy = 2; c.weightx = 1.0; c.ipadx = 5; JPanel gp = buildSliderPanel(gamma); gridbag.setConstraints(gp, c); add(gp); c.gridy = 3; JPanel brp = buildSliderPanel(bitResolution); gridbag.setConstraints(brp, c); add(brp); c.gridy = 4; c.weightx = 0.0; c.ipadx = 0; JPanel hp = buildComponentPanel(histogram); gridbag.setConstraints(hp, c); add(hp); } | { setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); GridBagLayout gridbag = new GridBagLayout(); setLayout(gridbag); GridBagConstraints c = new GridBagConstraints(); JLabel label = new JLabel(" Wavelength"); c.ipadx = RenderingAgt.H_SPACE; c.weightx = 0.5; c.gridx = 0; c.gridy = 0; c.fill = GridBagConstraints.HORIZONTAL; gridbag.setConstraints(label, c); add(label); c.gridy = 1; label = new JLabel(" Map"); gridbag.setConstraints(label, c); add(label); c.gridy = 2; gridbag.setConstraints(gammaLabel, c); add(gammaLabel); c.gridy = 3; label = new JLabel(" Resolution"); gridbag.setConstraints(label, c); add(label); c.gridy = 4; label = new JLabel(" Histogram"); gridbag.setConstraints(label, c); add(label); c.gridy = 5; label = new JLabel(" Noise reduction"); gridbag.setConstraints(label, c); add(label); c.gridx = 1; c.gridy = 0; JPanel wp = UIUtilities.buildComponentPanel(wavelengths); gridbag.setConstraints(wp, c); add(wp); c.gridy = 1; wp = UIUtilities.buildComponentPanel(transformations); gridbag.setConstraints(wp, c); add(wp); c.gridy = 2; c.weightx = 1.0; c.ipadx = 5; JPanel gp = buildSliderPanel(gamma); gridbag.setConstraints(gp, c); add(gp); c.gridy = 3; JPanel brp = buildSliderPanel(bitResolution); gridbag.setConstraints(brp, c); add(brp); c.gridy = 4; c.weightx = 0.0; c.ipadx = 0; JPanel hp = UIUtilities.buildComponentPanel(histogram); gridbag.setConstraints(hp, c); add(hp); c.gridy = 5; JPanel np = UIUtilities.buildComponentPanel(noise); gridbag.setConstraints(np, c); add(np); } | private void buildGUI() { setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); GridBagLayout gridbag = new GridBagLayout(); setLayout(gridbag); GridBagConstraints c = new GridBagConstraints(); JLabel label = new JLabel(" Wavelength"); c.ipadx = RenderingAgt.H_SPACE; c.weightx = 0.5; c.gridx = 0; c.gridy = 0; c.fill = GridBagConstraints.HORIZONTAL; gridbag.setConstraints(label, c); add(label); c.gridy = 1; label = new JLabel(" Map"); gridbag.setConstraints(label, c); add(label); c.gridy = 2; gridbag.setConstraints(gammaLabel, c); add(gammaLabel); c.gridy = 3; label = new JLabel(" Resolution"); gridbag.setConstraints(label, c); add(label); c.gridy = 4; label = new JLabel(" Histogram"); gridbag.setConstraints(label, c); add(label); c.gridx = 1; c.gridy = 0; JPanel wp = buildComponentPanel(wavelengths); gridbag.setConstraints(wp, c); add(wp); c.gridy = 1; wp = buildComponentPanel(transformations); gridbag.setConstraints(wp, c); add(wp); c.gridy = 2; c.weightx = 1.0; c.ipadx = 5; JPanel gp = buildSliderPanel(gamma); gridbag.setConstraints(gp, c); add(gp); c.gridy = 3; JPanel brp = buildSliderPanel(bitResolution); gridbag.setConstraints(brp, c); add(brp); c.gridy = 4; c.weightx = 0.0; c.ipadx = 0; JPanel hp = buildComponentPanel(histogram); gridbag.setConstraints(hp, c); add(hp); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPane.java |
private JPanel buildSliderPanel(JSlider slider) { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(slider); return p; } | private JPanel buildSliderPanel(JSlider slider) { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(slider); return p; } | private JPanel buildSliderPanel(JSlider slider) { JPanel p = new JPanel(); //p.setLayout(null); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); //slider.setPreferredSize(DIM_SLIDER); //slider.setSize(DIM_SLIDER); //p.setPreferredSize(DIM_SLIDER); //p.setSize(DIM_SLIDER); p.add(slider); return p; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPane.java |
{ IconManager IM = IconManager.getInstance(registry); histogram = new JButton(IM.getIcon(IconManager.HISTOGRAM)); histogram.setToolTipText( UIUtilities.formatToolTipText("Bring the histogram dialog.")); histogram.setBorder(null); } | { IconManager IM = IconManager.getInstance(registry); histogram = new JButton(IM.getIcon(IconManager.HISTOGRAM)); histogram.setToolTipText( UIUtilities.formatToolTipText("Bring the histogram dialog.")); histogram.setBorder(null); } | private void initButton(Registry registry) { IconManager IM = IconManager.getInstance(registry); histogram = new JButton(IM.getIcon(IconManager.HISTOGRAM)); histogram.setToolTipText( UIUtilities.formatToolTipText("Bring the histogram dialog.")); histogram.setBorder(null); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPane.java |
private void initLabel() { gammaLabel = new JLabel(" Gamma: "+qDef.curveCoefficient); } | private void initLabel(double curveCoefficient) { gammaLabel = new JLabel(" Gamma: "+curveCoefficient); } | private void initLabel() { gammaLabel = new JLabel(" Gamma: "+qDef.curveCoefficient); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPane.java |
private void initSliders() { int k = (int) (qDef.curveCoefficient*10); gamma = new JSlider(JSlider.HORIZONTAL, MIN, MAX, k); if (qDef.family == QuantumFactory.LINEAR || qDef.family == QuantumFactory.LOGARITHMIC) gamma.setEnabled(false); else gamma.setEnabled(true); Integer br = ((Integer) uiBR.get(new Integer(qDef.bitResolution))); int resolution = DEPTH_END; if (br != null) resolution = br.intValue(); bitResolution = new JSlider(JSlider.HORIZONTAL, DEPTH_START, DEPTH_END, resolution); } | private void initSliders(int family, double curveCoefficient) { int k = (int) (curveCoefficient*10); gamma = new JSlider(JSlider.HORIZONTAL, MIN, MAX, k); if (family == QuantumFactory.LINEAR || family == QuantumFactory.LOGARITHMIC) gamma.setEnabled(false); else gamma.setEnabled(true); Integer br = ((Integer) uiBR.get(new Integer(qDef.bitResolution))); int resolution = DEPTH_END; if (br != null) resolution = br.intValue(); bitResolution = new JSlider(JSlider.HORIZONTAL, DEPTH_START, DEPTH_END, resolution); } | private void initSliders() { int k = (int) (qDef.curveCoefficient*10); gamma = new JSlider(JSlider.HORIZONTAL, MIN, MAX, k); if (qDef.family == QuantumFactory.LINEAR || qDef.family == QuantumFactory.LOGARITHMIC) gamma.setEnabled(false); else gamma.setEnabled(true); Integer br = ((Integer) uiBR.get(new Integer(qDef.bitResolution))); int resolution = DEPTH_END; if (br != null) resolution = br.intValue(); bitResolution = new JSlider(JSlider.HORIZONTAL, DEPTH_START, DEPTH_END, resolution); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPane.java |
{ String txt = " Gamma: "+v; gammaLabel.setText(txt); } | { String txt = " Gamma: "+v; gammaLabel.setText(txt); } | void setGammaText(double v) { String txt = " Gamma: "+v; gammaLabel.setText(txt); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPane.java |
return RubySymbol.newSymbol(input.getRuntime(), input.unmarshalString()); | RubySymbol result = RubySymbol.newSymbol(input.getRuntime(), input.unmarshalString()); input.register(result); return result; | public static RubySymbol unmarshalFrom(UnmarshalStream input) throws java.io.IOException { return RubySymbol.newSymbol(input.getRuntime(), input.unmarshalString()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9db4d278a734c4fdfd9a83ed95575a45577f1e1b/RubySymbol.java/buggy/org/jruby/RubySymbol.java |
static Pattern createCaseInsensitivePattern(String regEx) | public static Pattern createCaseInsensitivePattern(String regEx) | static Pattern createCaseInsensitivePattern(String regEx) { return Pattern.compile(regEx, Pattern.CASE_INSENSITIVE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/RegExFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/RegExFactory.java |
return RubyFixnum.newFixnum(input.getRuby(), | return RubyFixnum.newFixnum(input.getRuntime(), | public static RubyFixnum unmarshalFrom(UnmarshalStream input) throws java.io.IOException { return RubyFixnum.newFixnum(input.getRuby(), input.unmarshalInt()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
add(annotate); add(createClassifySubMenu()); add(new JSeparator(SwingConstants.HORIZONTAL)); add(view); | add(new JSeparator(JSeparator.HORIZONTAL)); | private void buildGUI() { setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); add(properties); add(annotate); add(createClassifySubMenu()); add(new JSeparator(SwingConstants.HORIZONTAL)); add(view); add(zoomIn); add(zoomOut); add(zoomFit); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64ee7ec527da3cc538fcd8d0a21183719f854676/PopupMenu.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/PopupMenu.java |
return uri.replaceAll(": | return createDiscoveryPathName(uri) + "/" + localName; | protected String createDiscoveryPathName(String uri, String localName) { if (uri == null || uri.length() == 0) { return localName; } // TODO proper encoding required // lets replace any dodgy characters return uri.replaceAll("://", "/").replace(':', '/').replace(' ', '_') + "/" + localName; } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/732c0ef7c045830951a19004a71a949d91016155/XBeanXmlBeanDefinitionParser.java/clean/spring/src/java/org/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java |
String uri = "META-INF/services/org/xbean/spring/" + createDiscoveryPathName(namespaceURI, localName); | String uri = META_INF_PREFIX + createDiscoveryPathName(namespaceURI, localName); InputStream in = loadResource(uri); if (in == null) { in = loadResource(META_INF_PREFIX + createDiscoveryPathName(namespaceURI)); } | protected MappingMetaData findNamespaceProperties(String namespaceURI, String localName) { // lets look for the magic prefix if (namespaceURI != null && namespaceURI.startsWith(JAVA_PACKAGE_PREFIX)) { String packageName = namespaceURI.substring(JAVA_PACKAGE_PREFIX.length()); return new MappingMetaData(packageName); } String uri = "META-INF/services/org/xbean/spring/" + createDiscoveryPathName(namespaceURI, localName); // lets try the thread context class loader first InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(uri); if (in == null) { in = getClass().getClassLoader().getResourceAsStream(uri); if (in == null) { logger.warn("Could not find resource: " + uri); return null; } } // lets load the file try { Properties properties = new Properties(); properties.load(in); return new MappingMetaData(properties); } catch (IOException e) { log.warn("Failed to load resource from uri: " + uri, e); return null; } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/732c0ef7c045830951a19004a71a949d91016155/XBeanXmlBeanDefinitionParser.java/clean/spring/src/java/org/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java |
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(uri); if (in == null) { in = getClass().getClassLoader().getResourceAsStream(uri); if (in == null) { logger.warn("Could not find resource: " + uri); return null; | if (in != null) { try { Properties properties = new Properties(); properties.load(in); return new MappingMetaData(properties); } catch (IOException e) { log.warn("Failed to load resource from uri: " + uri, e); | protected MappingMetaData findNamespaceProperties(String namespaceURI, String localName) { // lets look for the magic prefix if (namespaceURI != null && namespaceURI.startsWith(JAVA_PACKAGE_PREFIX)) { String packageName = namespaceURI.substring(JAVA_PACKAGE_PREFIX.length()); return new MappingMetaData(packageName); } String uri = "META-INF/services/org/xbean/spring/" + createDiscoveryPathName(namespaceURI, localName); // lets try the thread context class loader first InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(uri); if (in == null) { in = getClass().getClassLoader().getResourceAsStream(uri); if (in == null) { logger.warn("Could not find resource: " + uri); return null; } } // lets load the file try { Properties properties = new Properties(); properties.load(in); return new MappingMetaData(properties); } catch (IOException e) { log.warn("Failed to load resource from uri: " + uri, e); return null; } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/732c0ef7c045830951a19004a71a949d91016155/XBeanXmlBeanDefinitionParser.java/clean/spring/src/java/org/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java |
try { Properties properties = new Properties(); properties.load(in); return new MappingMetaData(properties); } catch (IOException e) { log.warn("Failed to load resource from uri: " + uri, e); return null; } | return null; | protected MappingMetaData findNamespaceProperties(String namespaceURI, String localName) { // lets look for the magic prefix if (namespaceURI != null && namespaceURI.startsWith(JAVA_PACKAGE_PREFIX)) { String packageName = namespaceURI.substring(JAVA_PACKAGE_PREFIX.length()); return new MappingMetaData(packageName); } String uri = "META-INF/services/org/xbean/spring/" + createDiscoveryPathName(namespaceURI, localName); // lets try the thread context class loader first InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(uri); if (in == null) { in = getClass().getClassLoader().getResourceAsStream(uri); if (in == null) { logger.warn("Could not find resource: " + uri); return null; } } // lets load the file try { Properties properties = new Properties(); properties.load(in); return new MappingMetaData(properties); } catch (IOException e) { log.warn("Failed to load resource from uri: " + uri, e); return null; } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/732c0ef7c045830951a19004a71a949d91016155/XBeanXmlBeanDefinitionParser.java/clean/spring/src/java/org/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java |
BeanDefinitionReaderUtils.registerBeanDefinition(bdHolder, getBeanDefinitionReader().getBeanFactory()); | protected int parseBeanDefinitions(Element root) throws BeanDefinitionStoreException { NodeList nl = root.getChildNodes(); int beanDefinitionCount = 0; for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element) { Element ele = (Element) node; if (IMPORT_ELEMENT.equals(node.getNodeName())) { importBeanDefinitionResource(ele); } else if (ALIAS_ELEMENT.equals(node.getNodeName())) { String name = ele.getAttribute(NAME_ATTRIBUTE); String alias = ele.getAttribute(ALIAS_ATTRIBUTE); getBeanDefinitionReader().getBeanFactory().registerAlias(name, alias); } else if (BEAN_ELEMENT.equals(node.getNodeName())) { beanDefinitionCount++; BeanDefinitionHolder bdHolder = parseBeanDefinitionElement(ele, false); BeanDefinitionReaderUtils.registerBeanDefinition(bdHolder, getBeanDefinitionReader().getBeanFactory()); } else { BeanDefinitionHolder bdHolder = parseBeanFromExtensionElement(ele); if (bdHolder != null) { beanDefinitionCount++; } else { log.debug("Ignoring unknown element namespace: " + ele.getNamespaceURI() + " localName: " + ele.getLocalName()); } BeanDefinitionReaderUtils.registerBeanDefinition(bdHolder, getBeanDefinitionReader().getBeanFactory()); } } } return beanDefinitionCount; } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/732c0ef7c045830951a19004a71a949d91016155/XBeanXmlBeanDefinitionParser.java/clean/spring/src/java/org/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java |
|
{ return eventManager.getChannelStats(w); } | { return eventManager.getChannelStats(w); } | PixelsStatsEntry[] getChannelStats(int w) { return eventManager.getChannelStats(w); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ return (int) eventManager.getChannelWindowEnd(w); } | { return (int) eventManager.getChannelWindowEnd(w); } | int getChannelWindowEnd(int w) { return (int) eventManager.getChannelWindowEnd(w); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ return (int) eventManager.getChannelWindowStart(w); } | { return (int) eventManager.getChannelWindowStart(w); } | int getChannelWindowStart(int w) { return (int) eventManager.getChannelWindowStart(w); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ return (int) eventManager.getGlobalChannelWindowEnd(w); } | { return (int) eventManager.getGlobalChannelWindowEnd(w); } | int getGlobalChannelWindowEnd(int w) { return (int) eventManager.getGlobalChannelWindowEnd(w); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ return (int) eventManager.getGlobalChannelWindowStart(w); } | { return (int) eventManager.getGlobalChannelWindowStart(w); } | int getGlobalChannelWindowStart(int w) { return (int) eventManager.getGlobalChannelWindowStart(w); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ int w = view.getDomainPane().getWavelengths().getSelectedIndex(); eventManager.setChannelWindowEnd(w, value); } | { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); eventManager.setChannelWindowEnd(w, value); } | void setChannelWindowEnd(int value) { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); eventManager.setChannelWindowEnd(w, value); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ int w = view.getDomainPane().getWavelengths().getSelectedIndex(); eventManager.setChannelWindowStart(w, value); } | { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); eventManager.setChannelWindowStart(w, value); } | void setChannelWindowStart(int value) { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); eventManager.setChannelWindowStart(w, value); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ if (id == CodomainPaneManager.RI) updateGraphic(selected); if (selected) eventManager.addCodomainMap(ctx); else eventManager.removeCodomainMap(ctx); } | { if (id == CodomainPaneManager.RI) updateGraphic(selected); if (selected) eventManager.addCodomainMap(ctx); else eventManager.removeCodomainMap(ctx); } | void setCodomainMap(CodomainMapContext ctx, boolean selected, int id) { if (id == CodomainPaneManager.RI) updateGraphic(selected); if (selected) eventManager.addCodomainMap(ctx); else eventManager.removeCodomainMap(ctx); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
void setQuantumStrategy(double k, int family, int resolution, int id) { if (id == DomainPaneManager.FAMILY) updateGraphic(family); else if (id == DomainPaneManager.GAMMA) updateGraphic((int) (k*10), family); eventManager.setQuantumStrategy(k, family, resolution); } | void setQuantumStrategy(int resolution, boolean b) { eventManager.setQuantumStrategy(resolution, b); } | void setQuantumStrategy(double k, int family, int resolution, int id) { if (id == DomainPaneManager.FAMILY) updateGraphic(family); else if (id == DomainPaneManager.GAMMA) updateGraphic((int) (k*10), family); //for graphic *10 eventManager.setQuantumStrategy(k, family, resolution); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ view.getGRPane().removeAll(); GraphicsRepresentation gr = view.getGRepresentation(); gr = null; int mini = (int) eventManager.getGlobalChannelWindowStart(w); int maxi = (int) eventManager.getGlobalChannelWindowEnd(w); int s = (int) eventManager.getChannelWindowStart(w); int e = (int) eventManager.getChannelWindowEnd(w); QuantumDef qDef = getQuantumDef(); gr = new GraphicsRepresentation(this, qDef.family, qDef.curveCoefficient, qDef.cdStart, qDef.cdEnd, mini, maxi); gr.setReverseIntensity(view.getCodomainPane().getRI().isSelected()); if (qDef.family == QuantumFactory.EXPONENTIAL) gr.setDefaultExponential(s, e); else gr.setDefaultLinear(s, e); view.setGRepresentation(gr); view.buildGRPane(); eventManager.setMappingPane(); } | { view.getGRPane().removeAll(); GraphicsRepresentation gr = view.getGRepresentation(); gr = null; int mini = (int) eventManager.getGlobalChannelWindowStart(w); int maxi = (int) eventManager.getGlobalChannelWindowEnd(w); int s = (int) eventManager.getChannelWindowStart(w); int e = (int) eventManager.getChannelWindowEnd(w); QuantumDef qDef = getQuantumDef(); int family = eventManager.getChannelFamily(w); double cc = eventManager.getChannelCurveCoefficient(w); double[] cbStats = eventManager.getChannelBindingStats(w); gr = new GraphicsRepresentation(this, family, cc, qDef.cdStart, qDef.cdEnd, mini, maxi, cbStats); gr.setReverseIntensity(view.getCodomainPane().getRI().isSelected()); if (family == QuantumFactory.EXPONENTIAL) gr.setDefaultExponential(s, e); else gr.setDefaultLinear(s, e); view.setGRepresentation(gr); view.buildGRPane(); DomainPaneManager dpm = view.getDomainPane().getManager(); dpm.resetDefaultGamma(cc, family); dpm.resetDefaultComboBox(view.getDomainPane().getTransformations(), family); eventManager.setMappingPane(); } | void setWavelength(int w) { view.getGRPane().removeAll(); GraphicsRepresentation gr = view.getGRepresentation(); gr = null; int mini = (int) eventManager.getGlobalChannelWindowStart(w); int maxi = (int) eventManager.getGlobalChannelWindowEnd(w); int s = (int) eventManager.getChannelWindowStart(w); int e = (int) eventManager.getChannelWindowEnd(w); QuantumDef qDef = getQuantumDef(); gr = new GraphicsRepresentation(this, qDef.family, qDef.curveCoefficient, qDef.cdStart, qDef.cdEnd, mini, maxi); gr.setReverseIntensity(view.getCodomainPane().getRI().isSelected()); if (qDef.family == QuantumFactory.EXPONENTIAL) gr.setDefaultExponential(s, e); else gr.setDefaultLinear(s, e); view.setGRepresentation(gr); view.buildGRPane(); eventManager.setMappingPane(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ eventManager.updateCodomainMap(ctx); } | { eventManager.updateCodomainMap(ctx); } | void updateCodomainMap(CodomainMapContext ctx) { eventManager.updateCodomainMap(ctx); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ if (family == QuantumFactory.POLYNOMIAL) view.getGRepresentation().setControlLocation(coefficient); else if (family == QuantumFactory.EXPONENTIAL) view.getGRepresentation().setControlAndEndLocation(coefficient); } | { if (family == QuantumFactory.POLYNOMIAL) view.getGRepresentation().setControlLocation(coefficient); else if (family == QuantumFactory.EXPONENTIAL) view.getGRepresentation().setControlAndEndLocation(coefficient); } | private void updateGraphic(int coefficient, int family) { if (family == QuantumFactory.POLYNOMIAL) view.getGRepresentation().setControlLocation(coefficient); else if (family == QuantumFactory.EXPONENTIAL) view.getGRepresentation().setControlAndEndLocation(coefficient); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
{ if (histogramDialog != null) histogramDialog.dispose(); histogramDialog = null; } | { if (histogramDialog != null) histogramDialog.dispose(); histogramDialog = null; } | void disposeDialogs() { if (histogramDialog != null) histogramDialog.dispose(); histogramDialog = null; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPaneManager.java |
{ resetDefaultGamma(); resetDefaultBitResolution(); resetDefaultComboBox(view.getTransformations(), QuantumFactory.LINEAR); resetDefaultComboBox(view.getWavelengths(), 0); histogramDialog = null; } | { resetDefaultGamma(1, QuantumFactory.LINEAR); resetDefaultBitResolution(); resetDefaultComboBox(view.getTransformations(), QuantumFactory.LINEAR); resetDefaultComboBox(view.getWavelengths(), 0); resetDefaultCheckBox(); histogramDialog = null; } | void resetDefaults() { resetDefaultGamma(); resetDefaultBitResolution(); resetDefaultComboBox(view.getTransformations(), QuantumFactory.LINEAR); resetDefaultComboBox(view.getWavelengths(), 0); histogramDialog = null; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPaneManager.java |
{ if (histogramDialog != null) histogramDialog.getManager().setInputWindowEnd(value); } | { if (histogramDialog != null) histogramDialog.getManager().setInputWindowEnd(value); } | void setInputWindowEnd(int value) { if (histogramDialog != null) histogramDialog.getManager().setInputWindowEnd(value); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPaneManager.java |
{ int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputEndBox(vg); view.updateInputEnd(vg, v); } | { int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputEndBox(vg); view.updateInputEnd(vg, v); } | void setInputWindowEnd(int v, int min, int max) { int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputEndBox(vg); view.updateInputEnd(vg, v); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/GraphicsRepresentationManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/GraphicsRepresentationManager.java |
{ if (histogramDialog != null) histogramDialog.getManager().setInputWindowStart(value); } | { if (histogramDialog != null) histogramDialog.getManager().setInputWindowStart(value); } | void setInputWindowStart(int value) { if (histogramDialog != null) histogramDialog.getManager().setInputWindowStart(value); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPaneManager.java |
{ int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputStartBox(vg); view.updateInputStart(vg, v); } | { int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputStartBox(vg); view.updateInputStart(vg, v); } | void setInputWindowStart(int v, int min, int max) { int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputStartBox(vg); view.updateInputStart(vg, v); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/GraphicsRepresentationManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/GraphicsRepresentationManager.java |
private void resetDefaultGamma() { view.getGammaLabel().setText(" Gamma: "+(double) GraphicsRepresentation.INIT/10); JSlider slider = view.getGamma(); slider.removeChangeListener(this); slider.setValue(GraphicsRepresentation.INIT); slider.addChangeListener(this); } | void resetDefaultGamma(double k, int family) { view.getGammaLabel().setText(" Gamma: "+k); JSlider slider = view.getGamma(); if (family == QuantumFactory.LOGARITHMIC || family == QuantumFactory.LINEAR) slider.setEnabled(false); else slider.setEnabled(true); slider.removeChangeListener(this); slider.setValue((int) (k*10)); slider.addChangeListener(this); } | private void resetDefaultGamma() { view.getGammaLabel().setText(" Gamma: "+(double) GraphicsRepresentation.INIT/10); JSlider slider = view.getGamma(); //Remove temporarily the listener otherwise an event is fired. slider.removeChangeListener(this); slider.setValue(GraphicsRepresentation.INIT); slider.addChangeListener(this); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPaneManager.java |
private void resetDefaultComboBox(JComboBox box, int index) { box.removeActionListener(this); box.setSelectedIndex(index); box.addActionListener(this); } | void resetDefaultComboBox(JComboBox box, int index) { box.removeActionListener(this); box.setSelectedIndex(index); box.addActionListener(this); } | private void resetDefaultComboBox(JComboBox box, int index) { //Remove temporarily the listener otherwise an event is fired. box.removeActionListener(this); box.setSelectedIndex(index); box.addActionListener(this); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/DomainPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/DomainPaneManager.java |
int c; | int c = source.read(); | private int nextc() { int c; if (lex_p == lex_pend) { if (lex_input != null) { RubyObject v = lex_getline(); if (v.isNil()) { return -1; } if (ph.getHeredocEnd() > 0) { ruby.setSourceLine(ph.getHeredocEnd()); ph.setHeredocEnd(0); } ruby.setSourceLine(ruby.getSourceLine() + 1); lex_curline = ((RubyString) v).getValue(); lex_p = lex_pbeg = 0; lex_pend = lex_curline.length(); if (lex_curline.startsWith("__END__") && (lex_pend == 7 || lex_curline.charAt(7) == '\n' || lex_curline.charAt(7) == '\r')) { ph.setRubyEndSeen(true); lex_lastline = null; return -1; } lex_lastline = v; } else { lex_lastline = null; return -1; } } c = lex_curline.charAt(lex_p++); if (c == '\r' && lex_p <= lex_pend && lex_curline.charAt(lex_p) == '\n') { lex_p++; c = '\n'; } return c; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java |
if (lex_p == lex_pend) { | if (c == 65535) { c = -1; } ruby.setSourceLine(source.getLine()); return c; /*int c; if (col == lex_pend) { | private int nextc() { int c; if (lex_p == lex_pend) { if (lex_input != null) { RubyObject v = lex_getline(); if (v.isNil()) { return -1; } if (ph.getHeredocEnd() > 0) { ruby.setSourceLine(ph.getHeredocEnd()); ph.setHeredocEnd(0); } ruby.setSourceLine(ruby.getSourceLine() + 1); lex_curline = ((RubyString) v).getValue(); lex_p = lex_pbeg = 0; lex_pend = lex_curline.length(); if (lex_curline.startsWith("__END__") && (lex_pend == 7 || lex_curline.charAt(7) == '\n' || lex_curline.charAt(7) == '\r')) { ph.setRubyEndSeen(true); lex_lastline = null; return -1; } lex_lastline = v; } else { lex_lastline = null; return -1; } } c = lex_curline.charAt(lex_p++); if (c == '\r' && lex_p <= lex_pend && lex_curline.charAt(lex_p) == '\n') { lex_p++; c = '\n'; } return c; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java |
private int nextc() { int c; if (lex_p == lex_pend) { if (lex_input != null) { RubyObject v = lex_getline(); if (v.isNil()) { return -1; } if (ph.getHeredocEnd() > 0) { ruby.setSourceLine(ph.getHeredocEnd()); ph.setHeredocEnd(0); } ruby.setSourceLine(ruby.getSourceLine() + 1); lex_curline = ((RubyString) v).getValue(); lex_p = lex_pbeg = 0; lex_pend = lex_curline.length(); if (lex_curline.startsWith("__END__") && (lex_pend == 7 || lex_curline.charAt(7) == '\n' || lex_curline.charAt(7) == '\r')) { ph.setRubyEndSeen(true); lex_lastline = null; return -1; } lex_lastline = v; } else { lex_lastline = null; return -1; } } c = lex_curline.charAt(lex_p++); if (c == '\r' && lex_p <= lex_pend && lex_curline.charAt(lex_p) == '\n') { lex_p++; c = '\n'; } return c; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java |
||
lex_p = lex_pbeg = 0; | col = lex_pbeg = 0; | private int nextc() { int c; if (lex_p == lex_pend) { if (lex_input != null) { RubyObject v = lex_getline(); if (v.isNil()) { return -1; } if (ph.getHeredocEnd() > 0) { ruby.setSourceLine(ph.getHeredocEnd()); ph.setHeredocEnd(0); } ruby.setSourceLine(ruby.getSourceLine() + 1); lex_curline = ((RubyString) v).getValue(); lex_p = lex_pbeg = 0; lex_pend = lex_curline.length(); if (lex_curline.startsWith("__END__") && (lex_pend == 7 || lex_curline.charAt(7) == '\n' || lex_curline.charAt(7) == '\r')) { ph.setRubyEndSeen(true); lex_lastline = null; return -1; } lex_lastline = v; } else { lex_lastline = null; return -1; } } c = lex_curline.charAt(lex_p++); if (c == '\r' && lex_p <= lex_pend && lex_curline.charAt(lex_p) == '\n') { lex_p++; c = '\n'; } return c; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java |
c = lex_curline.charAt(lex_p++); if (c == '\r' && lex_p <= lex_pend && lex_curline.charAt(lex_p) == '\n') { lex_p++; | c = lex_curline.charAt(col++); if (c == '\r' && col <= lex_pend && lex_curline.charAt(col) == '\n') { col++; | private int nextc() { int c; if (lex_p == lex_pend) { if (lex_input != null) { RubyObject v = lex_getline(); if (v.isNil()) { return -1; } if (ph.getHeredocEnd() > 0) { ruby.setSourceLine(ph.getHeredocEnd()); ph.setHeredocEnd(0); } ruby.setSourceLine(ruby.getSourceLine() + 1); lex_curline = ((RubyString) v).getValue(); lex_p = lex_pbeg = 0; lex_pend = lex_curline.length(); if (lex_curline.startsWith("__END__") && (lex_pend == 7 || lex_curline.charAt(7) == '\n' || lex_curline.charAt(7) == '\r')) { ph.setRubyEndSeen(true); lex_lastline = null; return -1; } lex_lastline = v; } else { lex_lastline = null; return -1; } } c = lex_curline.charAt(lex_p++); if (c == '\r' && lex_p <= lex_pend && lex_curline.charAt(lex_p) == '\n') { lex_p++; c = '\n'; } return c; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java |
return c; | return c;*/ | private int nextc() { int c; if (lex_p == lex_pend) { if (lex_input != null) { RubyObject v = lex_getline(); if (v.isNil()) { return -1; } if (ph.getHeredocEnd() > 0) { ruby.setSourceLine(ph.getHeredocEnd()); ph.setHeredocEnd(0); } ruby.setSourceLine(ruby.getSourceLine() + 1); lex_curline = ((RubyString) v).getValue(); lex_p = lex_pbeg = 0; lex_pend = lex_curline.length(); if (lex_curline.startsWith("__END__") && (lex_pend == 7 || lex_curline.charAt(7) == '\n' || lex_curline.charAt(7) == '\r')) { ph.setRubyEndSeen(true); lex_lastline = null; return -1; } lex_lastline = v; } else { lex_lastline = null; return -1; } } c = lex_curline.charAt(lex_p++); if (c == '\r' && lex_p <= lex_pend && lex_curline.charAt(lex_p) == '\n') { lex_p++; c = '\n'; } return c; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java |
tokfix(); | private int parse_qstring(int term, int paren) { int strstart; int c; int nest = 0; strstart = ruby.getSourceLine(); newtok(); while ((c = nextc()) != term || nest > 0) { if (c == -1) { ruby.setSourceLine(strstart); ph.rb_compile_error("unterminated string meets end of file"); return 0; } if (c == '\\') { c = nextc(); switch (c) { case '\n' : continue; case '\\' : c = '\\'; break; default : // fall through if (c == term || (paren != 0 && c == paren)) { tokadd(c); continue; } tokadd('\\'); } } if (paren != 0) { if (c == paren) { nest++; } if (c == term && nest-- == 0) { break; } } tokadd(c); } tokfix(); yyVal = RubyString.newString(ruby, tok(), toklen()); ph.setLexState(LexState.EXPR_END); return Token.tSTRING; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.