Program: 129540
Project: 129540
Buggy source:
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);
  }
}

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.containsKey(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.containsKey(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.containsKey(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);
  }
}