Program: 104291
Project: 104291
Buggy source:
/** 
 * Creates an account for the given user and password.
 * @param providerFactory the ProtocolProviderFactory which will createthe account
 * @param userName the user identifier
 * @param passwd the password
 * @return the <tt>ProtocolProviderService</tt> for the new account.
 */
private ProtocolProviderService installAccount(ProtocolProviderFactory providerFactory,String userName,String passwd){
  Hashtable accountProperties=new Hashtable();
  if (registration.isRememberPassword()) {
    accountProperties.put(ProtocolProviderFactory.PASSWORD,passwd);
  }
  String serverAddress=null;
  if (registration.getServerAddress() != null)   serverAddress=registration.getServerAddress();
 else   serverAddress=getServerFromUserName(userName);
  accountProperties.put(ProtocolProviderFactory.SERVER_ADDRESS,serverAddress);
  accountProperties.put(ProtocolProviderFactory.SERVER_PORT,registration.getServerPort());
  String proxyAddress=null;
  if (registration.getProxy() != null)   proxyAddress=registration.getProxy();
 else   proxyAddress=getServerFromUserName(userName);
  accountProperties.put(ProtocolProviderFactory.PROXY_ADDRESS,proxyAddress);
  accountProperties.put(ProtocolProviderFactory.PROXY_PORT,registration.getProxyPort());
  accountProperties.put(ProtocolProviderFactory.PREFERRED_TRANSPORT,registration.getPreferredTransport());
  accountProperties.put(ProtocolProviderFactory.IS_PRESENCE_ENABLED,Boolean.toString(registration.isEnablePresence()));
  accountProperties.put(ProtocolProviderFactory.FORCE_P2P_MODE,Boolean.toString(registration.isForceP2PMode()));
  accountProperties.put(ProtocolProviderFactory.POLLING_PERIOD,registration.getPollingPeriod());
  accountProperties.put(ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION,registration.getSubscriptionExpiration());
  accountProperties.put("String_Node_Str",registration.getKeepAliveMethod());
  accountProperties.put("String_Node_Str",registration.getKeepAliveInterval());
  if (isModification) {
    providerFactory.modifyAccount(protocolProvider,accountProperties);
    this.isModification=false;
    return protocolProvider;
  }
  try {
    AccountID accountID=providerFactory.installAccount(userName,accountProperties);
    ServiceReference serRef=providerFactory.getProviderForAccount(accountID);
    protocolProvider=(ProtocolProviderService)SIPAccRegWizzActivator.bundleContext.getService(serRef);
  }
 catch (  IllegalArgumentException exc) {
    SIPAccRegWizzActivator.getUIService().getPopupDialog().showMessagePopupDialog(exc.getMessage(),Resources.getString("String_Node_Str"),PopupDialog.ERROR_MESSAGE);
  }
catch (  IllegalStateException exc) {
    SIPAccRegWizzActivator.getUIService().getPopupDialog().showMessagePopupDialog(exc.getMessage(),Resources.getString("String_Node_Str"),PopupDialog.ERROR_MESSAGE);
  }
  return protocolProvider;
}

Fixed version (ground truth):
/** 
 * Creates an account for the given user and password.
 * @param providerFactory the ProtocolProviderFactory which will createthe account
 * @param userName the user identifier
 * @param passwd the password
 * @return the <tt>ProtocolProviderService</tt> for the new account.
 */
private ProtocolProviderService installAccount(ProtocolProviderFactory providerFactory,String userName,String passwd){
  Hashtable accountProperties=new Hashtable();
  if (registration.isRememberPassword()) {
    accountProperties.put(ProtocolProviderFactory.PASSWORD,passwd);
  }
  String serverAddress=null;
  if (registration.getServerAddress() != null)   serverAddress=registration.getServerAddress();
 else   serverAddress=getServerFromUserName(userName);
  if (serverAddress != null)   accountProperties.put(ProtocolProviderFactory.SERVER_ADDRESS,serverAddress);
  accountProperties.put(ProtocolProviderFactory.SERVER_PORT,registration.getServerPort());
  String proxyAddress=null;
  if (registration.getProxy() != null)   proxyAddress=registration.getProxy();
 else   proxyAddress=getServerFromUserName(userName);
  if (proxyAddress != null)   accountProperties.put(ProtocolProviderFactory.PROXY_ADDRESS,proxyAddress);
  accountProperties.put(ProtocolProviderFactory.PROXY_PORT,registration.getProxyPort());
  accountProperties.put(ProtocolProviderFactory.PREFERRED_TRANSPORT,registration.getPreferredTransport());
  accountProperties.put(ProtocolProviderFactory.IS_PRESENCE_ENABLED,Boolean.toString(registration.isEnablePresence()));
  accountProperties.put(ProtocolProviderFactory.FORCE_P2P_MODE,Boolean.toString(registration.isForceP2PMode()));
  accountProperties.put(ProtocolProviderFactory.POLLING_PERIOD,registration.getPollingPeriod());
  accountProperties.put(ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION,registration.getSubscriptionExpiration());
  accountProperties.put("String_Node_Str",registration.getKeepAliveMethod());
  accountProperties.put("String_Node_Str",registration.getKeepAliveInterval());
  if (isModification) {
    providerFactory.modifyAccount(protocolProvider,accountProperties);
    this.isModification=false;
    return protocolProvider;
  }
  try {
    AccountID accountID=providerFactory.installAccount(userName,accountProperties);
    ServiceReference serRef=providerFactory.getProviderForAccount(accountID);
    protocolProvider=(ProtocolProviderService)SIPAccRegWizzActivator.bundleContext.getService(serRef);
  }
 catch (  IllegalArgumentException exc) {
    SIPAccRegWizzActivator.getUIService().getPopupDialog().showMessagePopupDialog(exc.getMessage(),Resources.getString("String_Node_Str"),PopupDialog.ERROR_MESSAGE);
  }
catch (  IllegalStateException exc) {
    SIPAccRegWizzActivator.getUIService().getPopupDialog().showMessagePopupDialog(exc.getMessage(),Resources.getString("String_Node_Str"),PopupDialog.ERROR_MESSAGE);
  }
  return protocolProvider;
}