Program: 129539
Project: 129539
Buggy source:
public void resetAllProxy(){
  Properties properties=System.getProperties();
  if (properties.contains(SalesforceModuleParseAPI.SOCKS_PROXY_HOST) && oldSocksProxySet) {
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_HOST,oldProxyHost);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PORT,oldProxyPort);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME,oldProxyUser);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD,oldProxyPwd);
  }
 else {
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_HOST);
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_PORT);
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME);
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD);
  }
  if (properties.contains(SalesforceModuleParseAPI.HTTP_PROXY_SET) && "String_Node_Str".equals(oldHttpProxySet)) {
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_SET,oldHttpProxySet);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_HOST,oldProxyHost);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PORT,oldProxyPort);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_USER,oldProxyUser);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD,oldProxyPwd);
  }
 else {
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_SET);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_HOST);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_PORT);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_USER);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD);
  }
  if (properties.contains(SalesforceModuleParseAPI.HTTPS_PROXY_SET) && "String_Node_Str".equals(oldHttpsProxySet)) {
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_SET,oldHttpsProxySet);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_HOST,oldProxyHost);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PORT,oldProxyPort);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_USER,oldProxyUser);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD,oldProxyPwd);
  }
 else {
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_SET);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_HOST);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_PORT);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_USER);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD);
  }
}

Fixed version (ground truth):
public void resetAllProxy(){
  Properties properties=System.getProperties();
  if (properties.containsKey(SalesforceModuleParseAPI.SOCKS_PROXY_HOST) && oldSocksProxySet) {
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_HOST,oldProxyHost);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PORT,oldProxyPort);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME,oldProxyUser);
    properties.put(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD,oldProxyPwd);
  }
 else {
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_HOST);
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_PORT);
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_USERNAME);
    properties.remove(SalesforceModuleParseAPI.SOCKS_PROXY_PASSWORD);
  }
  if (properties.containsKey(SalesforceModuleParseAPI.HTTP_PROXY_SET) && "String_Node_Str".equals(oldHttpProxySet)) {
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_SET,oldHttpProxySet);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_HOST,oldProxyHost);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PORT,oldProxyPort);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_USER,oldProxyUser);
    properties.put(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD,oldProxyPwd);
  }
 else {
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_SET);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_HOST);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_PORT);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_USER);
    properties.remove(SalesforceModuleParseAPI.HTTP_PROXY_PASSWORD);
  }
  if (properties.containsKey(SalesforceModuleParseAPI.HTTPS_PROXY_SET) && "String_Node_Str".equals(oldHttpsProxySet)) {
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_SET,oldHttpsProxySet);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_HOST,oldProxyHost);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PORT,oldProxyPort);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_USER,oldProxyUser);
    properties.put(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD,oldProxyPwd);
  }
 else {
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_SET);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_HOST);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_PORT);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_USER);
    properties.remove(SalesforceModuleParseAPI.HTTPS_PROXY_PASSWORD);
  }
}