Program: 157755
Project: 157755
Buggy source:
private boolean performConnect(boolean reconnect){
  if (currentConnection == null || !reconnect) {
    String server=MagePreferences.getServerAddress();
    int port=MagePreferences.getServerPort();
    String userName=MagePreferences.getUserName(server);
    String password=MagePreferences.getPassword(server);
    String proxyServer=PREFS.get("String_Node_Str","String_Node_Str");
    int proxyPort=Integer.parseInt(PREFS.get("String_Node_Str","String_Node_Str"));
    ProxyType proxyType=ProxyType.valueByText(PREFS.get("String_Node_Str","String_Node_Str"));
    String proxyUsername=PREFS.get("String_Node_Str","String_Node_Str");
    String proxyPassword=PREFS.get("String_Node_Str","String_Node_Str");
    setCursor(new Cursor(Cursor.WAIT_CURSOR));
    currentConnection=new Connection();
    currentConnection.setUsername(userName);
    currentConnection.setPassword(password);
    currentConnection.setHost(server);
    currentConnection.setPort(port);
    String allMAC="String_Node_Str";
    try {
      allMAC=currentConnection.getMAC();
    }
 catch (    SocketException ex) {
    }
    currentConnection.setUserIdStr(System.getProperty("String_Node_Str") + "String_Node_Str" + System.getProperty("String_Node_Str")+ "String_Node_Str"+ MagePreferences.getUserNames()+ "String_Node_Str"+ allMAC);
    currentConnection.setProxyType(proxyType);
    currentConnection.setProxyHost(proxyServer);
    currentConnection.setProxyPort(proxyPort);
    currentConnection.setProxyUsername(proxyUsername);
    currentConnection.setProxyPassword(proxyPassword);
    setUserPrefsToConnection(currentConnection);
  }
  try {
    LOGGER.debug("String_Node_Str" + currentConnection.getProxyType().toString() + ' '+ currentConnection.getProxyHost()+ ' '+ currentConnection.getProxyPort()+ ' '+ currentConnection.getProxyUsername());
    if (MageFrame.connect(currentConnection)) {
      prepareAndShowTablesPane();
      return true;
    }
 else {
      showMessage("String_Node_Str");
    }
  }
  finally {
    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }
  return false;
}

Fixed version (ground truth):
private boolean performConnect(boolean reconnect){
  if (currentConnection == null || !reconnect) {
    String server=MagePreferences.getServerAddress();
    int port=MagePreferences.getServerPort();
    String userName=MagePreferences.getUserName(server);
    String password=MagePreferences.getPassword(server);
    String proxyServer=PREFS.get("String_Node_Str","String_Node_Str");
    int proxyPort=Integer.parseInt(PREFS.get("String_Node_Str","String_Node_Str"));
    ProxyType proxyType=ProxyType.valueByText(PREFS.get("String_Node_Str","String_Node_Str"));
    String proxyUsername=PREFS.get("String_Node_Str","String_Node_Str");
    String proxyPassword=PREFS.get("String_Node_Str","String_Node_Str");
    setCursor(new Cursor(Cursor.WAIT_CURSOR));
    currentConnection=new Connection();
    currentConnection.setUsername(userName);
    currentConnection.setPassword(password);
    currentConnection.setHost(server);
    currentConnection.setPort(port);
    String allMAC="String_Node_Str";
    try {
      allMAC=Connection.getMAC();
    }
 catch (    SocketException ex) {
    }
    currentConnection.setUserIdStr(System.getProperty("String_Node_Str") + "String_Node_Str" + System.getProperty("String_Node_Str")+ "String_Node_Str"+ MagePreferences.getUserNames()+ "String_Node_Str"+ allMAC);
    currentConnection.setProxyType(proxyType);
    currentConnection.setProxyHost(proxyServer);
    currentConnection.setProxyPort(proxyPort);
    currentConnection.setProxyUsername(proxyUsername);
    currentConnection.setProxyPassword(proxyPassword);
    setUserPrefsToConnection(currentConnection);
  }
  try {
    LOGGER.debug("String_Node_Str" + currentConnection.getProxyType().toString() + ' '+ currentConnection.getProxyHost()+ ' '+ currentConnection.getProxyPort()+ ' '+ currentConnection.getProxyUsername());
    if (MageFrame.connect(currentConnection)) {
      prepareAndShowTablesPane();
      return true;
    }
 else {
      showMessage("String_Node_Str");
    }
  }
  finally {
    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }
  return false;
}