Program: 15370
Project: 15370
Buggy source:
public static HttpClient createHttpClient(final Context context){
  final HttpParams params=new BasicHttpParams();
  params.setParameter(CoreProtocolPNames.USER_AGENT,Constants.ua(context));
  params.setParameter(CoreConnectionPNames.SO_TIMEOUT,20000);
  params.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,20000);
  params.setParameter(CoreConnectionPNames.MAX_HEADER_COUNT,100);
  params.setParameter(ClientPNames.HANDLE_REDIRECTS,true);
  params.setParameter(ClientPNames.MAX_REDIRECTS,5);
  params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS,50);
  params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE,new ConnPerRoute(){
    public int getMaxForRoute(    HttpRoute route){
      return 25;
    }
  }
);
  final SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  final ThreadSafeClientConnManager connManager=new ThreadSafeClientConnManager(params,schemeRegistry);
  final DefaultHttpClient httpClient=new DefaultHttpClient(connManager,params);
  httpClient.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(3,true));
  httpClient.addResponseInterceptor(new HttpResponseInterceptor(){
    public void process(    final HttpResponse response,    final HttpContext context) throws HttpException, IOException {
      final HttpEntity entity=response.getEntity();
      final Header encHeader=entity.getContentEncoding();
      if (encHeader == null)       return;
      for (      final HeaderElement elem : encHeader.getElements()) {
        if ("String_Node_Str".equalsIgnoreCase(elem.getName())) {
          response.setEntity(new GzipDecompressingEntity(entity));
          return;
        }
      }
    }
  }
);
  return httpClient;
}

Fixed version (ground truth):
public static HttpClient createHttpClient(final Context context){
  final HttpParams params=new BasicHttpParams();
  params.setParameter(CoreProtocolPNames.USER_AGENT,Constants.ua(context));
  params.setParameter(CoreConnectionPNames.SO_TIMEOUT,15000);
  params.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,15000);
  params.setParameter(CoreConnectionPNames.MAX_HEADER_COUNT,100);
  params.setParameter(ClientPNames.HANDLE_REDIRECTS,true);
  params.setParameter(ClientPNames.MAX_REDIRECTS,5);
  params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS,50);
  params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE,new ConnPerRoute(){
    public int getMaxForRoute(    HttpRoute route){
      return 25;
    }
  }
);
  final SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  final ThreadSafeClientConnManager connManager=new ThreadSafeClientConnManager(params,schemeRegistry);
  final DefaultHttpClient httpClient=new DefaultHttpClient(connManager,params);
  httpClient.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(3,true));
  httpClient.setReuseStrategy(new NoConnectionReuseStrategy());
  httpClient.addResponseInterceptor(new HttpResponseInterceptor(){
    public void process(    final HttpResponse response,    final HttpContext context) throws HttpException, IOException {
      final HttpEntity entity=response.getEntity();
      final Header encHeader=entity.getContentEncoding();
      if (encHeader == null)       return;
      for (      final HeaderElement elem : encHeader.getElements()) {
        if ("String_Node_Str".equalsIgnoreCase(elem.getName())) {
          response.setEntity(new GzipDecompressingEntity(entity));
          return;
        }
      }
    }
  }
);
  return httpClient;
}