Program: 86749
Project: 86749
Buggy source:
private void createHttpClient(){
  String userAgent=config.getUserAgent();
  HttpParams httpClientParams=new BasicHttpParams();
  HttpProtocolParams.setUserAgent(httpClientParams,userAgent);
  HttpConnectionParams.setConnectionTimeout(httpClientParams,config.getConnectionTimeout());
  HttpConnectionParams.setSoTimeout(httpClientParams,config.getSocketTimeout());
  HttpConnectionParams.setStaleCheckingEnabled(httpClientParams,true);
  HttpConnectionParams.setTcpNoDelay(httpClientParams,true);
  int socketSendBufferSizeHint=config.getSocketSendBufferSizeHint();
  int socketReceiveBufferSizeHint=config.getSocketReceiveBufferSizeHint();
  if ((socketSendBufferSizeHint > 0) || (socketReceiveBufferSizeHint > 0)) {
    HttpConnectionParams.setSocketBufferSize(httpClientParams,Math.max(socketSendBufferSizeHint,socketReceiveBufferSizeHint));
  }
  ThreadSafeClientConnManager connectionManager=new ThreadSafeClientConnManager();
  connectionManager.setDefaultMaxPerRoute(config.getMaxConnections());
  connectionManager.setMaxTotal(config.getMaxConnections());
  httpClient=new DefaultHttpClient(connectionManager,httpClientParams);
  Scheme sch=new Scheme("String_Node_Str",443,new TrustingSocketFactory());
  httpClient.getConnectionManager().getSchemeRegistry().register(sch);
  httpClient.setHttpRequestRetryHandler(config.getRetryHandler());
  String proxyHost=config.getProxyHost();
  int proxyPort=config.getProxyPort();
  if ((proxyHost != null) && (proxyPort > 0)) {
    HttpHost proxyHttpHost=new HttpHost(proxyHost,proxyPort);
    httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxyHttpHost);
    String proxyUsername=config.getProxyUsername();
    String proxyPassword=config.getProxyPassword();
    String proxyDomain=config.getProxyDomain();
    String proxyWorkstation=config.getProxyWorkstation();
    if ((proxyUsername != null) && (proxyPassword != null)) {
      httpClient.getCredentialsProvider().setCredentials(new AuthScope(proxyHost,proxyPort),new NTCredentials(proxyUsername,proxyPassword,proxyWorkstation,proxyDomain));
    }
  }
}

Fixed version (ground truth):
private void createHttpClient(){
  String userAgent=config.getUserAgent();
  HttpParams httpClientParams=new BasicHttpParams();
  HttpProtocolParams.setUserAgent(httpClientParams,userAgent);
  HttpConnectionParams.setConnectionTimeout(httpClientParams,config.getConnectionTimeout());
  HttpConnectionParams.setSoTimeout(httpClientParams,config.getSocketTimeout());
  HttpConnectionParams.setStaleCheckingEnabled(httpClientParams,true);
  HttpConnectionParams.setTcpNoDelay(httpClientParams,true);
  int socketSendBufferSizeHint=config.getSocketSendBufferSizeHint();
  int socketReceiveBufferSizeHint=config.getSocketReceiveBufferSizeHint();
  if ((socketSendBufferSizeHint > 0) || (socketReceiveBufferSizeHint > 0)) {
    HttpConnectionParams.setSocketBufferSize(httpClientParams,Math.max(socketSendBufferSizeHint,socketReceiveBufferSizeHint));
  }
  ThreadSafeClientConnManager connectionManager=new ThreadSafeClientConnManager();
  connectionManager.setDefaultMaxPerRoute(config.getMaxConnections());
  connectionManager.setMaxTotal(config.getMaxConnections());
  httpClient=new DefaultHttpClient(connectionManager,httpClientParams);
  try {
    SSLSocketFactory sf=createSocketFactory();
    httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("String_Node_Str",443,sf));
  }
 catch (  Exception ignored) {
  }
  httpClient.setHttpRequestRetryHandler(config.getRetryHandler());
  String proxyHost=config.getProxyHost();
  int proxyPort=config.getProxyPort();
  if ((proxyHost != null) && (proxyPort > 0)) {
    HttpHost proxyHttpHost=new HttpHost(proxyHost,proxyPort);
    httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxyHttpHost);
    String proxyUsername=config.getProxyUsername();
    String proxyPassword=config.getProxyPassword();
    String proxyDomain=config.getProxyDomain();
    String proxyWorkstation=config.getProxyWorkstation();
    if ((proxyUsername != null) && (proxyPassword != null)) {
      httpClient.getCredentialsProvider().setCredentials(new AuthScope(proxyHost,proxyPort),new NTCredentials(proxyUsername,proxyPassword,proxyWorkstation,proxyDomain));
    }
  }
}