Program: 129577
Project: 129577
Buggy source:
public void setProxy(String proxyHost,String proxyPort,String proxyUsername,String proxyPassword,boolean httpProxy,boolean socksProxy,boolean httpsProxy){
  Properties properties=System.getProperties();
  this.socksProxy=false;
  this.httpProxy=false;
  this.httpsProxy=false;
  if (socksProxy && proxyHost != null && proxyPort != null) {
    this.socksProxy=true;
    oldProxyHost=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_HOST);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_HOST,proxyHost);
    oldProxyPort=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_PORT);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PORT,proxyPort);
    oldProxyUser=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME,proxyUsername == null ? "String_Node_Str" : proxyUsername);
    oldProxyPwd=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD,proxyPassword == null ? "String_Node_Str" : proxyPassword);
  }
 else   if (httpProxy && proxyHost != null && proxyPort != null) {
    this.httpProxy=true;
    oldHttpProxySet=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_SET);
    oldProxyHost=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_HOST);
    oldProxyPort=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_PORT);
    oldProxyUser=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_USER);
    oldProxyPwd=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_SET,"String_Node_Str");
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_HOST,proxyHost);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PORT,proxyPort);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_USER,proxyUsername == null ? "String_Node_Str" : proxyUsername);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD,proxyPassword == null ? "String_Node_Str" : proxyPassword);
  }
 else   if (httpsProxy && proxyHost != null && proxyPort != null) {
    this.httpsProxy=true;
    oldHttpProxySet=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_SET);
    oldProxyHost=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_HOST);
    oldProxyPort=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_PORT);
    oldProxyUser=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_USER);
    oldProxyPwd=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_SET,"String_Node_Str");
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_HOST,proxyHost);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PORT,proxyPort);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_USER,proxyUsername == null ? "String_Node_Str" : proxyUsername);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD,proxyPassword == null ? "String_Node_Str" : proxyPassword);
  }
}

Fixed version (ground truth):
public void setProxy(String proxyHost,String proxyPort,String proxyUsername,String proxyPassword,boolean httpProxy,boolean socksProxy,boolean httpsProxy){
  Properties properties=System.getProperties();
  if (socksProxy && proxyHost != null && proxyPort != null) {
    if (properties.contains(SalesforceModuleParseAPI.SOCKS_PROXY_HOST)) {
      oldProxyHost=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_HOST);
      oldProxyPort=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_PORT);
      oldProxyUser=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME);
      oldProxyPwd=(String)properties.get(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD);
      oldSocksProxySet=true;
    }
 else {
      oldSocksProxySet=false;
    }
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_HOST,proxyHost);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PORT,proxyPort);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME,proxyUsername == null ? "String_Node_Str" : proxyUsername);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD,proxyPassword == null ? "String_Node_Str" : proxyPassword);
  }
 else   if (httpProxy && proxyHost != null && proxyPort != null) {
    if (properties.contains(SalesforceModuleParseAPI.HTTP_PROXY_HOST)) {
      oldHttpProxySet=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_SET);
      oldProxyHost=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_HOST);
      oldProxyPort=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_PORT);
      oldProxyUser=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_USER);
      oldProxyPwd=(String)properties.get(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD);
    }
 else {
      oldHttpProxySet="String_Node_Str";
    }
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_SET,"String_Node_Str");
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_HOST,proxyHost);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PORT,proxyPort);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_USER,proxyUsername == null ? "String_Node_Str" : proxyUsername);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD,proxyPassword == null ? "String_Node_Str" : proxyPassword);
  }
 else   if (httpsProxy && proxyHost != null && proxyPort != null) {
    if (properties.contains(SalesforceModuleParseAPI.HTTP_PROXY_HOST)) {
      oldHttpsProxySet=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_SET);
      oldProxyHost=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_HOST);
      oldProxyPort=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_PORT);
      oldProxyUser=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_USER);
      oldProxyPwd=(String)properties.get(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD);
    }
 else {
      oldHttpsProxySet="String_Node_Str";
    }
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_SET,"String_Node_Str");
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_HOST,proxyHost);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PORT,proxyPort);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_USER,proxyUsername == null ? "String_Node_Str" : proxyUsername);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD,proxyPassword == null ? "String_Node_Str" : proxyPassword);
  }
}