Program: 104290
Project: 104290
Buggy source:
/** 
 * Fills the UIN and Password fields in this panel with the data coming from the given protocolProvider.
 * @param protocolProvider The <tt>ProtocolProviderService</tt> to loadthe data from.
 */
public void loadAccount(ProtocolProviderService protocolProvider){
  AccountID accountID=protocolProvider.getAccountID();
  String password=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PASSWORD);
  String serverAddress=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.SERVER_ADDRESS);
  String serverPort=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.SERVER_PORT);
  String proxyAddress=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PROXY_ADDRESS);
  String proxyPort=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PROXY_PORT);
  String preferredTransport=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PREFERRED_TRANSPORT);
  boolean enablePresence=new Boolean((String)accountID.getAccountProperties().get(ProtocolProviderFactory.IS_PRESENCE_ENABLED)).booleanValue();
  boolean forceP2P=new Boolean((String)accountID.getAccountProperties().get(ProtocolProviderFactory.FORCE_P2P_MODE)).booleanValue();
  String pollingPeriod=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.POLLING_PERIOD);
  String subscriptionPeriod=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION);
  String keepAliveMethod=(String)accountID.getAccountProperties().get("String_Node_Str");
  String keepAliveInterval=(String)accountID.getAccountProperties().get("String_Node_Str");
  uinField.setEnabled(false);
  this.uinField.setText(accountID.getUserID() + "String_Node_Str" + serverAddress);
  if (password != null) {
    this.passField.setText(password);
    this.rememberPassBox.setSelected(true);
  }
  serverField.setText(serverAddress);
  serverField.setEnabled(false);
  serverPortField.setText(serverPort);
  proxyField.setText(proxyAddress);
  transportCombo.setSelectedItem(preferredTransport);
  proxyPortField.setText(proxyPort);
  if (!(SIPAccountRegistration.DEFAULT_PORT.equals(serverPort) || SIPAccountRegistration.DEFAULT_TLS_PORT.equals(serverPort)) || !(SIPAccountRegistration.DEFAULT_PORT.equals(proxyPort) || SIPAccountRegistration.DEFAULT_TLS_PORT.equals(proxyPort)) || !transportCombo.getSelectedItem().equals(SIPAccountRegistration.DEFAULT_TRANSPORT)) {
    enableAdvOpButton.setSelected(true);
    serverField.setEnabled(false);
    serverPortField.setEnabled(true);
    proxyField.setEnabled(true);
    proxyPortField.setEnabled(true);
    transportCombo.setEnabled(true);
  }
  enablePresOpButton.setSelected(enablePresence);
  forceP2PPresOpButton.setSelected(forceP2P);
  pollPeriodField.setText(pollingPeriod);
  subscribeExpiresField.setText(subscriptionPeriod);
  if (!enablePresence) {
    pollPeriodField.setEnabled(false);
    subscribeExpiresField.setEnabled(false);
  }
  keepAliveMethodBox.setSelectedItem(keepAliveMethod);
  keepAliveIntervalValue.setText(keepAliveInterval);
}

Fixed version (ground truth):
/** 
 * Fills the UIN and Password fields in this panel with the data coming from the given protocolProvider.
 * @param protocolProvider The <tt>ProtocolProviderService</tt> to loadthe data from.
 */
public void loadAccount(ProtocolProviderService protocolProvider){
  AccountID accountID=protocolProvider.getAccountID();
  String password=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PASSWORD);
  String serverAddress=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.SERVER_ADDRESS);
  String serverPort=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.SERVER_PORT);
  String proxyAddress=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PROXY_ADDRESS);
  String proxyPort=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PROXY_PORT);
  String preferredTransport=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.PREFERRED_TRANSPORT);
  boolean enablePresence=new Boolean((String)accountID.getAccountProperties().get(ProtocolProviderFactory.IS_PRESENCE_ENABLED)).booleanValue();
  boolean forceP2P=new Boolean((String)accountID.getAccountProperties().get(ProtocolProviderFactory.FORCE_P2P_MODE)).booleanValue();
  String pollingPeriod=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.POLLING_PERIOD);
  String subscriptionPeriod=(String)accountID.getAccountProperties().get(ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION);
  String keepAliveMethod=(String)accountID.getAccountProperties().get("String_Node_Str");
  String keepAliveInterval=(String)accountID.getAccountProperties().get("String_Node_Str");
  uinField.setEnabled(false);
  this.uinField.setText((serverAddress == null) ? accountID.getUserID() : (accountID.getUserID() + "String_Node_Str" + serverAddress));
  if (password != null) {
    this.passField.setText(password);
    this.rememberPassBox.setSelected(true);
  }
  serverField.setText(serverAddress);
  serverField.setEnabled(false);
  serverPortField.setText(serverPort);
  proxyField.setText(proxyAddress);
  transportCombo.setSelectedItem(preferredTransport);
  proxyPortField.setText(proxyPort);
  if (!(SIPAccountRegistration.DEFAULT_PORT.equals(serverPort) || SIPAccountRegistration.DEFAULT_TLS_PORT.equals(serverPort)) || !(SIPAccountRegistration.DEFAULT_PORT.equals(proxyPort) || SIPAccountRegistration.DEFAULT_TLS_PORT.equals(proxyPort)) || !transportCombo.getSelectedItem().equals(SIPAccountRegistration.DEFAULT_TRANSPORT)) {
    enableAdvOpButton.setSelected(true);
    serverField.setEnabled(false);
    serverPortField.setEnabled(true);
    proxyField.setEnabled(true);
    proxyPortField.setEnabled(true);
    transportCombo.setEnabled(true);
  }
  enablePresOpButton.setSelected(enablePresence);
  forceP2PPresOpButton.setSelected(forceP2P);
  pollPeriodField.setText(pollingPeriod);
  subscribeExpiresField.setText(subscriptionPeriod);
  if (!enablePresence) {
    pollPeriodField.setEnabled(false);
    subscribeExpiresField.setEnabled(false);
  }
  keepAliveMethodBox.setSelectedItem(keepAliveMethod);
  keepAliveIntervalValue.setText(keepAliveInterval);
}