Program: 103067
Project: 103067
Buggy source:
/** 
 * Installs the account defined in this wizard.
 * @param userName the user name to sign in with
 * @param password the password to sign in with
 * @return the created <tt>ProtocolProviderService</tt> corresponding to thenew account
 * @throws OperationFailedException if the operation didn't succeed
 */
public ProtocolProviderService signin(final String userName,final String password) throws OperationFailedException {
  final AccountPanel accPanel=(AccountPanel)firstWizardPage.getSimpleForm();
  String accPanelUsername=accPanel.getUsername();
  boolean equals=false;
  final boolean rememberPassword=(password != null);
  if (StringUtils.isEquals(accPanelUsername,userName)) {
    char[] accPanelPasswordChars=accPanel.getPassword();
    char[] passwordChars=(password == null) ? null : password.toCharArray();
    if (accPanelPasswordChars == null)     equals=((passwordChars == null) || passwordChars.length == 0);
 else     if (passwordChars == null)     equals=(accPanelPasswordChars.length == 0);
 else     equals=Arrays.equals(accPanelPasswordChars,passwordChars);
    if (equals) {
      boolean accPanelRememberPassword=accPanel.isRememberPassword();
      equals=(accPanelRememberPassword == rememberPassword);
    }
  }
  if (!equals) {
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        public void run(){
          accPanel.setUsername(userName);
          accPanel.setPassword(password);
          accPanel.setRememberPassword(rememberPassword);
        }
      }
);
    }
 catch (    Exception e) {
      if (e instanceof OperationFailedException) {
        throw (OperationFailedException)e;
      }
 else {
        throw new OperationFailedException("String_Node_Str" + accPanel.getClass().getName(),OperationFailedException.INTERNAL_ERROR,e);
      }
    }
  }
  if (!firstWizardPage.isCommitted())   firstWizardPage.commitPage();
  if (!firstWizardPage.isCommitted()) {
    throw new OperationFailedException("String_Node_Str",OperationFailedException.GENERAL_ERROR);
  }
  ProtocolProviderFactory factory=JabberAccRegWizzActivator.getJabberProtocolProviderFactory();
  return installAccount(factory,registration.getUserID(),password);
}

Fixed version (ground truth):
/** 
 * Installs the account defined in this wizard.
 * @param userName the user name to sign in with
 * @param password the password to sign in with
 * @return the created <tt>ProtocolProviderService</tt> corresponding to thenew account
 * @throws OperationFailedException if the operation didn't succeed
 */
public ProtocolProviderService signin(final String userName,final String password) throws OperationFailedException {
  final AccountPanel accPanel=(AccountPanel)firstWizardPage.getSimpleForm();
  String accPanelUsername=accPanel.getUsername();
  boolean equals=false;
  final boolean rememberPassword=(password != null);
  if (StringUtils.isEquals(accPanelUsername,userName)) {
    char[] accPanelPasswordChars=accPanel.getPassword();
    char[] passwordChars=(password == null) ? null : password.toCharArray();
    if (accPanelPasswordChars == null)     equals=((passwordChars == null) || passwordChars.length == 0);
 else     if (passwordChars == null)     equals=(accPanelPasswordChars.length == 0);
 else     equals=Arrays.equals(accPanelPasswordChars,passwordChars);
    if (equals) {
      boolean accPanelRememberPassword=accPanel.isRememberPassword();
      equals=(accPanelRememberPassword == rememberPassword);
    }
  }
  if (!equals) {
    try {
      if (SwingUtilities.isEventDispatchThread()) {
        accPanel.setUsername(userName);
        accPanel.setPassword(password);
        accPanel.setRememberPassword(rememberPassword);
      }
 else {
        SwingUtilities.invokeAndWait(new Runnable(){
          public void run(){
            accPanel.setUsername(userName);
            accPanel.setPassword(password);
            accPanel.setRememberPassword(rememberPassword);
          }
        }
);
      }
    }
 catch (    Exception e) {
      if (e instanceof OperationFailedException) {
        throw (OperationFailedException)e;
      }
 else {
        throw new OperationFailedException("String_Node_Str" + accPanel.getClass().getName(),OperationFailedException.INTERNAL_ERROR,e);
      }
    }
  }
  if (!firstWizardPage.isCommitted())   firstWizardPage.commitPage();
  if (!firstWizardPage.isCommitted()) {
    throw new OperationFailedException("String_Node_Str",OperationFailedException.GENERAL_ERROR);
  }
  ProtocolProviderFactory factory=JabberAccRegWizzActivator.getJabberProtocolProviderFactory();
  return installAccount(factory,registration.getUserID(),password);
}