Program: 104562
Project: 104562
Buggy source:
/** 
 * Handles the <tt>ActionEvent</tt> triggered when user clicks on one of the buttons in this toolbar.
 */
public void actionPerformed(ActionEvent e){
  JButton button=(JButton)e.getSource();
  String buttonName=button.getName();
  if (buttonName.equals("String_Node_Str")) {
    Wizard wizard=new Wizard();
    wizard.getDialog().setTitle(Messages.getString("String_Node_Str"));
    NewContact newContact=new NewContact();
    AddContactWizardPage1 page1=new AddContactWizardPage1(wizard,newContact,mainFrame.getProtocolProviders());
    wizard.registerWizardPage(AddContactWizardPage1.IDENTIFIER,page1);
    AddContactWizardPage2 page2=new AddContactWizardPage2(wizard,newContact,mainFrame.getAllGroups());
    wizard.registerWizardPage(AddContactWizardPage2.IDENTIFIER,page2);
    AddContactWizardPage3 page3=new AddContactWizardPage3(newContact);
    wizard.registerWizardPage(AddContactWizardPage3.IDENTIFIER,page3);
    wizard.setCurrentPage(AddContactWizardPage1.IDENTIFIER);
    wizard.getDialog().setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 250,Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 100);
    int returnCode=wizard.showModalDialog();
    if (returnCode == 0) {
      ArrayList ppList=newContact.getProtocolProviders();
      ArrayList groupList=newContact.getGroups();
      for (int i=0; i < ppList.size(); i++) {
        ProtocolProviderService pps=(ProtocolProviderService)ppList.get(i);
        for (int j=0; j < groupList.size(); j++) {
          MetaContactGroup group=(MetaContactGroup)groupList.get(j);
          try {
            mainFrame.getContactList().createMetaContact(pps,group,newContact.getUin());
          }
 catch (          MetaContactListException ex) {
            JOptionPane.showMessageDialog(mainFrame,Messages.getString("String_Node_Str",newContact.getUin()),Messages.getString("String_Node_Str"),JOptionPane.WARNING_MESSAGE);
          }
        }
      }
    }
 else     if (returnCode == 1) {
      wizard.getDialog().dispose();
    }
  }
 else   if (buttonName.equals("String_Node_Str")) {
    configDialog=GuiActivator.getUIService().getConfigurationManager();
    configDialog.showDialog();
  }
 else   if (buttonName.equals("String_Node_Str")) {
    ContactList contactList=mainFrame.getTabbedPane().getContactListPanel().getContactList();
    ContactListModel listModel=(ContactListModel)contactList.getModel();
    if (listModel.showOffline()) {
      listModel.setShowOffline(false);
      listModel.removeOfflineContacts();
    }
 else {
      int currentlySelectedIndex=contactList.getSelectedIndex();
      Object selectedObject=listModel.getElementAt(currentlySelectedIndex);
      listModel.setShowOffline(true);
      listModel.addOfflineContacts();
      if (selectedObject != null) {
        if (selectedObject instanceof MetaContact) {
          contactList.setSelectedIndex(listModel.indexOf((MetaContact)selectedObject));
        }
 else {
          contactList.setSelectedIndex(listModel.indexOf((MetaContactGroup)selectedObject));
        }
      }
    }
  }
 else   if (buttonName.equals("String_Node_Str")) {
    MetaContact selectedMetaContact=(MetaContact)mainFrame.getTabbedPane().getContactListPanel().getContactList().getSelectedValue();
    if (selectedMetaContact != null) {
      Contact defaultContact=selectedMetaContact.getDefaultContact();
      ProtocolProviderService defaultProvider=defaultContact.getProtocolProvider();
      OperationSetWebContactInfo wContactInfo=mainFrame.getWebContactInfo(defaultProvider);
      CrossPlatformBrowserLauncher.openURL(wContactInfo.getWebContactInfo(defaultContact).toString());
    }
  }
}

Fixed version (ground truth):
/** 
 * Handles the <tt>ActionEvent</tt> triggered when user clicks on one of the buttons in this toolbar.
 */
public void actionPerformed(ActionEvent e){
  JButton button=(JButton)e.getSource();
  String buttonName=button.getName();
  if (buttonName.equals("String_Node_Str")) {
    Wizard wizard=new Wizard();
    wizard.getDialog().setTitle(Messages.getString("String_Node_Str"));
    NewContact newContact=new NewContact();
    AddContactWizardPage1 page1=new AddContactWizardPage1(wizard,newContact,mainFrame.getProtocolProviders());
    wizard.registerWizardPage(AddContactWizardPage1.IDENTIFIER,page1);
    AddContactWizardPage2 page2=new AddContactWizardPage2(wizard,newContact,mainFrame.getAllGroups());
    wizard.registerWizardPage(AddContactWizardPage2.IDENTIFIER,page2);
    AddContactWizardPage3 page3=new AddContactWizardPage3(newContact);
    wizard.registerWizardPage(AddContactWizardPage3.IDENTIFIER,page3);
    wizard.setCurrentPage(AddContactWizardPage1.IDENTIFIER);
    wizard.getDialog().setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 250,Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 100);
    int returnCode=wizard.showModalDialog();
    if (returnCode == 0) {
      ArrayList ppList=newContact.getProtocolProviders();
      ArrayList groupList=newContact.getGroups();
      for (int i=0; i < ppList.size(); i++) {
        ProtocolProviderService pps=(ProtocolProviderService)ppList.get(i);
        for (int j=0; j < groupList.size(); j++) {
          MetaContactGroup group=(MetaContactGroup)groupList.get(j);
          try {
            mainFrame.getContactList().createMetaContact(pps,group,newContact.getUin());
          }
 catch (          MetaContactListException ex) {
            JOptionPane.showMessageDialog(mainFrame,Messages.getString("String_Node_Str",newContact.getUin()),Messages.getString("String_Node_Str"),JOptionPane.WARNING_MESSAGE);
          }
        }
      }
    }
 else     if (returnCode == 1) {
      wizard.getDialog().dispose();
    }
  }
 else   if (buttonName.equals("String_Node_Str")) {
    configDialog=GuiActivator.getUIService().getConfigurationManager();
    configDialog.showDialog();
  }
 else   if (buttonName.equals("String_Node_Str")) {
    ContactList contactList=mainFrame.getTabbedPane().getContactListPanel().getContactList();
    ContactListModel listModel=(ContactListModel)contactList.getModel();
    if (listModel.showOffline()) {
      listModel.setShowOffline(false);
      listModel.removeOfflineContacts();
    }
 else {
      Object selectedObject=null;
      int currentlySelectedIndex=contactList.getSelectedIndex();
      if (currentlySelectedIndex != -1) {
        selectedObject=listModel.getElementAt(currentlySelectedIndex);
      }
      listModel.setShowOffline(true);
      listModel.addOfflineContacts();
      if (selectedObject != null) {
        if (selectedObject instanceof MetaContact) {
          contactList.setSelectedIndex(listModel.indexOf((MetaContact)selectedObject));
        }
 else {
          contactList.setSelectedIndex(listModel.indexOf((MetaContactGroup)selectedObject));
        }
      }
    }
  }
 else   if (buttonName.equals("String_Node_Str")) {
    MetaContact selectedMetaContact=(MetaContact)mainFrame.getTabbedPane().getContactListPanel().getContactList().getSelectedValue();
    if (selectedMetaContact != null) {
      Contact defaultContact=selectedMetaContact.getDefaultContact();
      ProtocolProviderService defaultProvider=defaultContact.getProtocolProvider();
      OperationSetWebContactInfo wContactInfo=mainFrame.getWebContactInfo(defaultProvider);
      CrossPlatformBrowserLauncher.openURL(wContactInfo.getWebContactInfo(defaultContact).toString());
    }
  }
}