Program: 102921
Project: 102921
Buggy source:
/** 
 * Loads given account registration object.
 * @param sipAccReg the account registration object to load.
 */
public void loadAccount(SIPAccountRegistration sipAccReg){
  String password=sipAccReg.getPassword();
  String serverAddress=sipAccReg.getServerAddress();
  String displayName=sipAccReg.getAccountPropertyString(ProtocolProviderFactory.DISPLAY_NAME);
  String authName=sipAccReg.getAuthorizationName();
  String serverPort=sipAccReg.getServerPort();
  String proxyAddress=sipAccReg.getProxy();
  String proxyPort=sipAccReg.getProxyPort();
  String preferredTransport=sipAccReg.getPreferredTransport();
  boolean enablePresence=sipAccReg.isEnablePresence();
  boolean forceP2P=sipAccReg.isForceP2PMode();
  String clientTlsCertificateId=sipAccReg.getTlsClientCertificate();
  boolean proxyAutoConfigureEnabled=sipAccReg.isProxyAutoConfigure();
  boolean proxyForceBypassConfigureEnabled=sipAccReg.isProxyForceBypassConfigure();
  String pollingPeriod=sipAccReg.getPollingPeriod();
  String subscriptionPeriod=sipAccReg.getSubscriptionExpiration();
  String keepAliveMethod=sipAccReg.getKeepAliveMethod();
  String keepAliveInterval=sipAccReg.getKeepAliveInterval();
  String dtmfMethod=sipAccReg.getDTMFMethod();
  String dtmfMinimalToneDuration=sipAccReg.getDtmfMinimalToneDuration();
  String voicemailURI=sipAccReg.getVoicemailURI();
  String voicemailCheckURI=sipAccReg.getVoicemailCheckURI();
  boolean xCapEnable=sipAccReg.isXCapEnable();
  boolean xivoEnable=sipAccReg.isXiVOEnable();
  boolean isServerOverridden=sipAccReg.isServerOverridden();
  connectionPanel.setServerOverridden(isServerOverridden);
  accountPanel.setUserIDEnabled(false);
  accountPanel.setUserID(sipAccReg.getId());
  if (password != null) {
    accountPanel.setPassword(password);
    accountPanel.setRememberPassword(true);
  }
 else {
    accountPanel.setPassword("String_Node_Str");
    accountPanel.setRememberPassword(false);
  }
  connectionPanel.setServerAddress(serverAddress);
  connectionPanel.setServerEnabled(isServerOverridden);
  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(sipAccReg.getSecurityRegistration());
  presencePanel.reinit();
  presencePanel.setPresenceEnabled(enablePresence);
  presencePanel.setForcePeerToPeerMode(forceP2P);
  presencePanel.setPollPeriod(pollingPeriod);
  presencePanel.setSubscriptionExpiration(subscriptionPeriod);
  if (!enablePresence) {
    presencePanel.setPresenceOptionsEnabled(enablePresence);
  }
  connectionPanel.setKeepAliveMethod(keepAliveMethod);
  connectionPanel.setKeepAliveInterval(keepAliveInterval);
  connectionPanel.setDTMFMethod(dtmfMethod);
  connectionPanel.setDtmfMinimalToneDuration(dtmfMinimalToneDuration);
  boolean mwiEnabled=sipAccReg.isMessageWaitingIndicationsEnabled();
  connectionPanel.setMessageWaitingIndications(mwiEnabled);
  if (!StringUtils.isNullOrEmpty(voicemailURI))   connectionPanel.setVoicemailURI(voicemailURI);
  if (!StringUtils.isNullOrEmpty(voicemailCheckURI))   connectionPanel.setVoicemailCheckURI(voicemailCheckURI);
  if (xCapEnable) {
    presencePanel.setXCapEnable(xCapEnable);
    presencePanel.setClistOptionEnableEnabled(xCapEnable);
  }
 else   if (xivoEnable) {
    presencePanel.setXiVOEnable(xivoEnable);
    presencePanel.setClistOptionEnableEnabled(xivoEnable);
  }
  boolean clistUseSipCredentials=sipAccReg.isClistOptionUseSipCredentials();
  presencePanel.setClistOptionUseSipCredentials(clistUseSipCredentials);
  presencePanel.setClistOptionUseSipCredentialsEnabled(clistUseSipCredentials);
  presencePanel.setClistOptionServerUri(sipAccReg.getClistOptionServerUri());
  presencePanel.setClistOptionUser(sipAccReg.getClistOptionUser());
  presencePanel.setClistOptionPassword(sipAccReg.getClistOptionPassword());
  encodingsPanel.loadAccount(sipAccReg.getEncodingsRegistration());
}

Fixed version (ground truth):
/** 
 * Loads given account registration object.
 * @param sipAccReg the account registration object to load.
 */
public void loadAccount(SIPAccountRegistration sipAccReg){
  String password=sipAccReg.getPassword();
  String serverAddress=sipAccReg.getServerAddress();
  String displayName=sipAccReg.getAccountPropertyString(ProtocolProviderFactory.DISPLAY_NAME);
  String authName=sipAccReg.getAuthorizationName();
  String serverPort=sipAccReg.getServerPort();
  String proxyAddress=sipAccReg.getProxy();
  String proxyPort=sipAccReg.getProxyPort();
  String preferredTransport=sipAccReg.getPreferredTransport();
  boolean enablePresence=sipAccReg.isEnablePresence();
  boolean forceP2P=sipAccReg.isForceP2PMode();
  String clientTlsCertificateId=sipAccReg.getTlsClientCertificate();
  boolean proxyAutoConfigureEnabled=sipAccReg.isProxyAutoConfigure();
  boolean proxyForceBypassConfigureEnabled=sipAccReg.isProxyForceBypassConfigure();
  String pollingPeriod=sipAccReg.getPollingPeriod();
  String subscriptionPeriod=sipAccReg.getSubscriptionExpiration();
  String keepAliveMethod=sipAccReg.getKeepAliveMethod();
  String keepAliveInterval=sipAccReg.getKeepAliveInterval();
  String dtmfMethod=sipAccReg.getDTMFMethod();
  String dtmfMinimalToneDuration=sipAccReg.getDtmfMinimalToneDuration();
  String voicemailURI=sipAccReg.getVoicemailURI();
  String voicemailCheckURI=sipAccReg.getVoicemailCheckURI();
  boolean xCapEnable=sipAccReg.isXCapEnable();
  boolean xivoEnable=sipAccReg.isXiVOEnable();
  boolean isServerOverridden=sipAccReg.isServerOverridden();
  connectionPanel.setServerOverridden(isServerOverridden);
  accountPanel.setUserIDEnabled(false);
  accountPanel.setUserID(sipAccReg.getId());
  if (password != null) {
    accountPanel.setPassword(password);
    accountPanel.setRememberPassword(true);
  }
 else {
    accountPanel.setPassword("String_Node_Str");
    accountPanel.setRememberPassword(false);
  }
  connectionPanel.setServerAddress(serverAddress);
  connectionPanel.setServerEnabled(isServerOverridden);
  accountPanel.setDisplayName(displayName);
  if (authName != null && authName.length() > 0)   connectionPanel.setAuthenticationName(authName);
  connectionPanel.setCertificateId(clientTlsCertificateId);
  connectionPanel.enablesProxyAutoConfigure(proxyAutoConfigureEnabled);
  connectionPanel.enablesProxyForceBypassConfigure(proxyForceBypassConfigureEnabled);
  connectionPanel.setServerPort(serverPort);
  connectionPanel.setProxy(proxyAddress);
  connectionPanel.setSelectedTransport(preferredTransport);
  connectionPanel.setProxyPort(proxyPort);
  securityPanel.loadAccount(sipAccReg.getSecurityRegistration());
  presencePanel.reinit();
  presencePanel.setPresenceEnabled(enablePresence);
  presencePanel.setForcePeerToPeerMode(forceP2P);
  presencePanel.setPollPeriod(pollingPeriod);
  presencePanel.setSubscriptionExpiration(subscriptionPeriod);
  if (!enablePresence) {
    presencePanel.setPresenceOptionsEnabled(enablePresence);
  }
  connectionPanel.setKeepAliveMethod(keepAliveMethod);
  connectionPanel.setKeepAliveInterval(keepAliveInterval);
  connectionPanel.setDTMFMethod(dtmfMethod);
  connectionPanel.setDtmfMinimalToneDuration(dtmfMinimalToneDuration);
  boolean mwiEnabled=sipAccReg.isMessageWaitingIndicationsEnabled();
  connectionPanel.setMessageWaitingIndications(mwiEnabled);
  if (!StringUtils.isNullOrEmpty(voicemailURI))   connectionPanel.setVoicemailURI(voicemailURI);
  if (!StringUtils.isNullOrEmpty(voicemailCheckURI))   connectionPanel.setVoicemailCheckURI(voicemailCheckURI);
  if (xCapEnable) {
    presencePanel.setXCapEnable(xCapEnable);
    presencePanel.setClistOptionEnableEnabled(xCapEnable);
  }
 else   if (xivoEnable) {
    presencePanel.setXiVOEnable(xivoEnable);
    presencePanel.setClistOptionEnableEnabled(xivoEnable);
  }
  boolean clistUseSipCredentials=sipAccReg.isClistOptionUseSipCredentials();
  presencePanel.setClistOptionUseSipCredentials(clistUseSipCredentials);
  presencePanel.setClistOptionUseSipCredentialsEnabled(clistUseSipCredentials);
  presencePanel.setClistOptionServerUri(sipAccReg.getClistOptionServerUri());
  presencePanel.setClistOptionUser(sipAccReg.getClistOptionUser());
  presencePanel.setClistOptionPassword(sipAccReg.getClistOptionPassword());
  encodingsPanel.loadAccount(sipAccReg.getEncodingsRegistration());
}