Program: 32740
Project: 32740
Buggy source:
public void init(){
  ConnectionSocketFactory plainsf=new PlainConnectionSocketFactory();
  SSLConnectionSocketFactory sslsf=null;
  if (configure.getSslContext() != null) {
    sslsf=new SSLConnectionSocketFactory(configure.getSslContext());
  }
 else {
    sslsf=new SSLConnectionSocketFactory(SSLContexts.createSystemDefault());
  }
  Registry<ConnectionSocketFactory> r=RegistryBuilder.<ConnectionSocketFactory>create().register("String_Node_Str",plainsf).register("String_Node_Str",sslsf).build();
  cm=new PoolingHttpClientConnectionManager(r);
  cm.setDefaultMaxPerRoute(configure.getMaxPerConnection());
  cm.setMaxTotal(configure.getMaxTotalConnection());
  Builder custom=RequestConfig.custom();
  if (configure.getConnectionTimeout() >= 0) {
    custom.setConnectTimeout(configure.getConnectionTimeout());
  }
  if (configure.getTimeout() >= 0) {
    custom.setConnectionRequestTimeout(configure.getTimeout());
    custom.setSocketTimeout(configure.getTimeout());
  }
  custom.setStaleConnectionCheckEnabled(configure.isStaleConnectionCheck());
  RequestConfig requestConfig=custom.build();
  HttpClientBuilder builder=HttpClientBuilder.create().setDefaultRequestConfig(requestConfig);
  builder.setConnectionManager(cm);
  ConnectionKeepAliveStrategy keepAliveStrategy=new ConnectionKeepAliveStrategy(){
    @Override public long getKeepAliveDuration(    HttpResponse response,    HttpContext context){
      HeaderElementIterator it=new BasicHeaderElementIterator(response.headerIterator(HTTP.CONN_KEEP_ALIVE));
      while (it.hasNext()) {
        HeaderElement he=it.nextElement();
        String param=he.getName();
        String value=he.getValue();
        if (value != null && param.equalsIgnoreCase("String_Node_Str")) {
          try {
            return Long.parseLong(value) * 1000;
          }
 catch (          NumberFormatException ignore) {
          }
        }
      }
      return 30 * 1000;
    }
  }
;
  builder.setKeepAliveStrategy(keepAliveStrategy);
  builder.setRetryHandler(new DefaultHttpRequestRetryHandler(configure.getRetryCount(),false));
  if (configure.getProxyHost() != null && configure.getProxyPort() != 0) {
    HttpHost proxy=new HttpHost(configure.getProxyHost(),configure.getProxyPort(),"String_Node_Str");
    DefaultProxyRoutePlanner routePlanner=new DefaultProxyRoutePlanner(proxy);
    builder.setRoutePlanner(routePlanner);
  }
  client=builder.build();
}

Fixed version (ground truth):
public void init(){
  ConnectionSocketFactory plainsf=new PlainConnectionSocketFactory();
  SSLConnectionSocketFactory sslsf=initSSLConnectionSocketFactory();
  Registry<ConnectionSocketFactory> r=RegistryBuilder.<ConnectionSocketFactory>create().register("String_Node_Str",plainsf).register("String_Node_Str",sslsf).build();
  cm=new PoolingHttpClientConnectionManager(r);
  cm.setDefaultMaxPerRoute(configure.getMaxPerConnection());
  cm.setMaxTotal(configure.getMaxTotalConnection());
  Builder custom=RequestConfig.custom();
  if (configure.getConnectionTimeout() >= 0) {
    custom.setConnectTimeout(configure.getConnectionTimeout());
  }
  if (configure.getTimeout() >= 0) {
    custom.setConnectionRequestTimeout(configure.getTimeout());
    custom.setSocketTimeout(configure.getTimeout());
  }
  custom.setStaleConnectionCheckEnabled(configure.isStaleConnectionCheck());
  RequestConfig requestConfig=custom.build();
  HttpClientBuilder builder=HttpClientBuilder.create().setDefaultRequestConfig(requestConfig);
  builder.setConnectionManager(cm);
  ConnectionKeepAliveStrategy keepAliveStrategy=new ConnectionKeepAliveStrategy(){
    @Override public long getKeepAliveDuration(    HttpResponse response,    HttpContext context){
      HeaderElementIterator it=new BasicHeaderElementIterator(response.headerIterator(HTTP.CONN_KEEP_ALIVE));
      while (it.hasNext()) {
        HeaderElement he=it.nextElement();
        String param=he.getName();
        String value=he.getValue();
        if (value != null && "String_Node_Str".equalsIgnoreCase(param)) {
          try {
            return Long.parseLong(value) * 1000L;
          }
 catch (          NumberFormatException ignore) {
          }
        }
      }
      return 30L * 1000L;
    }
  }
;
  builder.setKeepAliveStrategy(keepAliveStrategy);
  builder.setRetryHandler(new DefaultHttpRequestRetryHandler(configure.getRetryCount(),false));
  if (configure.getProxyHost() != null && configure.getProxyPort() != 0) {
    HttpHost proxy=new HttpHost(configure.getProxyHost(),configure.getProxyPort(),"String_Node_Str");
    DefaultProxyRoutePlanner routePlanner=new DefaultProxyRoutePlanner(proxy);
    builder.setRoutePlanner(routePlanner);
  }
  client=builder.build();
}