Program: 103089
Project: 103089
Buggy source:
/** 
 * Init system properties that corresponds to proxy settings.
 */
static void initProperties(){
  String globalProxyType=getConfigurationService().getString(ProxyInfo.CONNECTON_PROXY_TYPE_PROPERTY_NAME);
  if (globalProxyType != null && !globalProxyType.equals(ProxyInfo.ProxyType.NONE.name())) {
    String globalProxyAddress=getConfigurationService().getString(ProxyInfo.CONNECTON_PROXY_ADDRESS_PROPERTY_NAME);
    String globalProxyPortStr=getConfigurationService().getString(ProxyInfo.CONNECTON_PROXY_PORT_PROPERTY_NAME);
    int globalProxyPort=-1;
    try {
      globalProxyPort=Integer.parseInt(globalProxyPortStr);
    }
 catch (    NumberFormatException ex) {
    }
    String globalProxyUsername=getConfigurationService().getString(ProxyInfo.CONNECTON_PROXY_USERNAME_PROPERTY_NAME);
    String globalProxyPassword=getConfigurationService().getString(ProxyInfo.CONNECTON_PROXY_PASSWORD_PROPERTY_NAME);
    if (globalProxyAddress == null || globalProxyAddress.length() <= 0) {
      return;
    }
    String type=null;
    if (globalProxyType.equals(ProxyInfo.ProxyType.HTTP.name())) {
      type="String_Node_Str";
      System.setProperty("String_Node_Str",globalProxyAddress);
      if (globalProxyPortStr != null) {
        System.setProperty("String_Node_Str",globalProxyPortStr);
      }
      System.setProperty("String_Node_Str","String_Node_Str");
    }
 else     if (globalProxyType.equals(ProxyInfo.ProxyType.SOCKS4.name()) || globalProxyType.equals(ProxyInfo.ProxyType.SOCKS5.name())) {
      type="String_Node_Str";
      System.setProperty("String_Node_Str",globalProxyAddress);
      if (globalProxyPortStr != null) {
        System.setProperty("String_Node_Str",globalProxyPortStr);
      }
      System.setProperty("String_Node_Str","String_Node_Str");
    }
    Authenticator.setDefault(new AuthenticatorImpl(globalProxyAddress,globalProxyPort,type,globalProxyUsername,globalProxyPassword));
  }
 else   Authenticator.setDefault(null);
}

Fixed version (ground truth):
/** 
 * Init system properties that corresponds to proxy settings.
 */
static void initProperties(){
  String globalProxyType=getConfigurationService().getString(ProxyInfo.CONNECTION_PROXY_TYPE_PROPERTY_NAME);
  if (globalProxyType != null && !globalProxyType.equals(ProxyInfo.ProxyType.NONE.name())) {
    String globalProxyAddress=getConfigurationService().getString(ProxyInfo.CONNECTION_PROXY_ADDRESS_PROPERTY_NAME);
    String globalProxyPortStr=getConfigurationService().getString(ProxyInfo.CONNECTION_PROXY_PORT_PROPERTY_NAME);
    int globalProxyPort=-1;
    try {
      globalProxyPort=Integer.parseInt(globalProxyPortStr);
    }
 catch (    NumberFormatException ex) {
    }
    String globalProxyUsername=getConfigurationService().getString(ProxyInfo.CONNECTION_PROXY_USERNAME_PROPERTY_NAME);
    String globalProxyPassword=getConfigurationService().getString(ProxyInfo.CONNECTION_PROXY_PASSWORD_PROPERTY_NAME);
    if (globalProxyAddress == null || globalProxyAddress.length() <= 0) {
      return;
    }
    String type=null;
    if (globalProxyType.equals(ProxyInfo.ProxyType.HTTP.name())) {
      type="String_Node_Str";
      System.setProperty("String_Node_Str",globalProxyAddress);
      if (globalProxyPortStr != null) {
        System.setProperty("String_Node_Str",globalProxyPortStr);
      }
      System.setProperty("String_Node_Str","String_Node_Str");
    }
 else     if (globalProxyType.equals(ProxyInfo.ProxyType.SOCKS4.name()) || globalProxyType.equals(ProxyInfo.ProxyType.SOCKS5.name())) {
      type="String_Node_Str";
      System.setProperty("String_Node_Str",globalProxyAddress);
      if (globalProxyPortStr != null) {
        System.setProperty("String_Node_Str",globalProxyPortStr);
      }
      System.setProperty("String_Node_Str","String_Node_Str");
    }
    Authenticator.setDefault(new AuthenticatorImpl(globalProxyAddress,globalProxyPort,type,globalProxyUsername,globalProxyPassword));
  }
 else   Authenticator.setDefault(null);
}