Program: 103263
Project: 103263
Buggy source:
/** 
 * Loads the account with the given identifier.
 * @param accountID the account identifier
 */
public void loadAccount(AccountID accountID){
  String password=SIPAccRegWizzActivator.getSIPProtocolProviderFactory().loadPassword(accountID);
  String serverAddress=accountID.getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
  String displayName=accountID.getAccountPropertyString(ProtocolProviderFactory.DISPLAY_NAME);
  String authName=accountID.getAccountPropertyString(ProtocolProviderFactory.AUTHORIZATION_NAME);
  String serverPort=accountID.getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT);
  String proxyAddress=accountID.getAccountPropertyString(ProtocolProviderFactory.PROXY_ADDRESS);
  String proxyPort=accountID.getAccountPropertyString(ProtocolProviderFactory.PROXY_PORT);
  String preferredTransport=accountID.getAccountPropertyString(ProtocolProviderFactory.PREFERRED_TRANSPORT);
  boolean enablePresence=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.IS_PRESENCE_ENABLED,false);
  boolean forceP2P=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.FORCE_P2P_MODE,false);
  String clientTlsCertificateId=accountID.getAccountPropertyString(ProtocolProviderFactory.CLIENT_TLS_CERTIFICATE);
  boolean proxyAutoConfigureEnabled=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.PROXY_AUTO_CONFIG,false);
  String pollingPeriod=accountID.getAccountPropertyString(ProtocolProviderFactory.POLLING_PERIOD);
  String subscriptionPeriod=accountID.getAccountPropertyString(ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION);
  String keepAliveMethod=accountID.getAccountPropertyString("String_Node_Str");
  String keepAliveInterval=accountID.getAccountPropertyString("String_Node_Str");
  String voicemailURI=accountID.getAccountPropertyString(ProtocolProviderFactory.VOICEMAIL_URI);
  boolean xCapEnable=accountID.getAccountPropertyBoolean("String_Node_Str",false);
  boolean xivoEnable=accountID.getAccountPropertyBoolean("String_Node_Str",false);
  boolean isServerOverridden=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.IS_SERVER_OVERRIDDEN,false);
  connectionPanel.setServerOverridden(isServerOverridden);
  accountPanel.setUserIDEnabled(false);
  accountPanel.setUserID((serverAddress == null) ? accountID.getUserID() : accountID.getAccountPropertyString(ProtocolProviderFactory.USER_ID));
  if (password != null) {
    accountPanel.setPassword(password);
    accountPanel.setRememberPassword(true);
  }
 else {
    accountPanel.setRememberPassword(false);
  }
  connectionPanel.setServerAddress(serverAddress);
  connectionPanel.setServerEnabled(isServerOverridden);
  if (displayName != null && displayName.length() > 0)   accountPanel.setDisplayName(displayName);
  if (authName != null && authName.length() > 0)   connectionPanel.setAuthenticationName(authName);
  connectionPanel.setCertificateId(clientTlsCertificateId);
  connectionPanel.enablesProxyAutoConfigure(proxyAutoConfigureEnabled);
  connectionPanel.setServerPort(serverPort);
  connectionPanel.setProxy(proxyAddress);
  connectionPanel.setSelectedTransport(preferredTransport);
  connectionPanel.setProxyPort(proxyPort);
  securityPanel.loadAccount(accountID);
  presencePanel.setPresenceEnabled(enablePresence);
  presencePanel.setForcePeerToPeerMode(forceP2P);
  presencePanel.setPollPeriod(pollingPeriod);
  presencePanel.setSubscriptionExpiration(subscriptionPeriod);
  if (!enablePresence) {
    presencePanel.setPresenceOptionsEnabled(enablePresence);
  }
  connectionPanel.setKeepAliveMethod(keepAliveMethod);
  connectionPanel.setKeepAliveInterval(keepAliveInterval);
  if (voicemailURI != null && voicemailURI.length() > 0)   connectionPanel.setVoicemailURI(voicemailURI);
  if (xCapEnable) {
    boolean xCapUseSipCredentials=accountID.getAccountPropertyBoolean("String_Node_Str",true);
    presencePanel.setXCapEnable(xCapEnable);
    presencePanel.setClistOptionEnableEnabled(xCapEnable);
    presencePanel.setClistOptionUseSipCredentials(xCapUseSipCredentials);
    presencePanel.setClistOptionUseSipCredentialsEnabled(xCapUseSipCredentials);
    presencePanel.setClistOptionServerUri(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionUser(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionPassword(accountID.getAccountPropertyString("String_Node_Str"));
  }
 else   if (xivoEnable) {
    boolean xCapUseSipCredentials=accountID.getAccountPropertyBoolean("String_Node_Str",true);
    presencePanel.setXiVOEnable(xivoEnable);
    presencePanel.setClistOptionEnableEnabled(xivoEnable);
    presencePanel.setClistOptionUseSipCredentials(xCapUseSipCredentials);
    presencePanel.setClistOptionUseSipCredentialsEnabled(xCapUseSipCredentials);
    presencePanel.setClistOptionServerUri(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionUser(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionPassword(accountID.getAccountPropertyString("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Loads the account with the given identifier.
 * @param accountID the account identifier
 */
public void loadAccount(AccountID accountID){
  String password=SIPAccRegWizzActivator.getSIPProtocolProviderFactory().loadPassword(accountID);
  String serverAddress=accountID.getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
  String displayName=accountID.getAccountPropertyString(ProtocolProviderFactory.DISPLAY_NAME);
  String authName=accountID.getAccountPropertyString(ProtocolProviderFactory.AUTHORIZATION_NAME);
  String serverPort=accountID.getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT);
  String proxyAddress=accountID.getAccountPropertyString(ProtocolProviderFactory.PROXY_ADDRESS);
  String proxyPort=accountID.getAccountPropertyString(ProtocolProviderFactory.PROXY_PORT);
  String preferredTransport=accountID.getAccountPropertyString(ProtocolProviderFactory.PREFERRED_TRANSPORT);
  boolean enablePresence=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.IS_PRESENCE_ENABLED,false);
  boolean forceP2P=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.FORCE_P2P_MODE,false);
  String clientTlsCertificateId=accountID.getAccountPropertyString(ProtocolProviderFactory.CLIENT_TLS_CERTIFICATE);
  boolean proxyAutoConfigureEnabled=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.PROXY_AUTO_CONFIG,false);
  String pollingPeriod=accountID.getAccountPropertyString(ProtocolProviderFactory.POLLING_PERIOD);
  String subscriptionPeriod=accountID.getAccountPropertyString(ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION);
  String keepAliveMethod=accountID.getAccountPropertyString(ProtocolProviderFactory.KEEP_ALIVE_METHOD);
  String keepAliveInterval=accountID.getAccountPropertyString(ProtocolProviderFactory.KEEP_ALIVE_INTERVAL);
  String voicemailURI=accountID.getAccountPropertyString(ProtocolProviderFactory.VOICEMAIL_URI);
  boolean xCapEnable=accountID.getAccountPropertyBoolean("String_Node_Str",false);
  boolean xivoEnable=accountID.getAccountPropertyBoolean("String_Node_Str",false);
  boolean isServerOverridden=accountID.getAccountPropertyBoolean(ProtocolProviderFactory.IS_SERVER_OVERRIDDEN,false);
  connectionPanel.setServerOverridden(isServerOverridden);
  accountPanel.setUserIDEnabled(false);
  accountPanel.setUserID((serverAddress == null) ? accountID.getUserID() : accountID.getAccountPropertyString(ProtocolProviderFactory.USER_ID));
  if (password != null) {
    accountPanel.setPassword(password);
    accountPanel.setRememberPassword(true);
  }
 else {
    accountPanel.setRememberPassword(false);
  }
  connectionPanel.setServerAddress(serverAddress);
  connectionPanel.setServerEnabled(isServerOverridden);
  if (displayName != null && displayName.length() > 0)   accountPanel.setDisplayName(displayName);
  if (authName != null && authName.length() > 0)   connectionPanel.setAuthenticationName(authName);
  connectionPanel.setCertificateId(clientTlsCertificateId);
  connectionPanel.enablesProxyAutoConfigure(proxyAutoConfigureEnabled);
  connectionPanel.setServerPort(serverPort);
  connectionPanel.setProxy(proxyAddress);
  connectionPanel.setSelectedTransport(preferredTransport);
  connectionPanel.setProxyPort(proxyPort);
  securityPanel.loadAccount(accountID);
  presencePanel.setPresenceEnabled(enablePresence);
  presencePanel.setForcePeerToPeerMode(forceP2P);
  presencePanel.setPollPeriod(pollingPeriod);
  presencePanel.setSubscriptionExpiration(subscriptionPeriod);
  if (!enablePresence) {
    presencePanel.setPresenceOptionsEnabled(enablePresence);
  }
  connectionPanel.setKeepAliveMethod(keepAliveMethod);
  connectionPanel.setKeepAliveInterval(keepAliveInterval);
  if (voicemailURI != null && voicemailURI.length() > 0)   connectionPanel.setVoicemailURI(voicemailURI);
  if (xCapEnable) {
    boolean xCapUseSipCredentials=accountID.getAccountPropertyBoolean("String_Node_Str",true);
    presencePanel.setXCapEnable(xCapEnable);
    presencePanel.setClistOptionEnableEnabled(xCapEnable);
    presencePanel.setClistOptionUseSipCredentials(xCapUseSipCredentials);
    presencePanel.setClistOptionUseSipCredentialsEnabled(xCapUseSipCredentials);
    presencePanel.setClistOptionServerUri(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionUser(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionPassword(accountID.getAccountPropertyString("String_Node_Str"));
  }
 else   if (xivoEnable) {
    boolean xCapUseSipCredentials=accountID.getAccountPropertyBoolean("String_Node_Str",true);
    presencePanel.setXiVOEnable(xivoEnable);
    presencePanel.setClistOptionEnableEnabled(xivoEnable);
    presencePanel.setClistOptionUseSipCredentials(xCapUseSipCredentials);
    presencePanel.setClistOptionUseSipCredentialsEnabled(xCapUseSipCredentials);
    presencePanel.setClistOptionServerUri(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionUser(accountID.getAccountPropertyString("String_Node_Str"));
    presencePanel.setClistOptionPassword(accountID.getAccountPropertyString("String_Node_Str"));
  }
}