Program: 174
Project: 174
Buggy source:
private <T>Future<T> doConnect(final Request request,final AsyncHandler<T> asyncHandler,NettyResponseFuture<T> f) throws IOException {
  if (isClose.get()) {
    throw new IOException("String_Node_Str");
  }
  if (connectionsPool.size() >= config.getMaxTotalConnections()) {
    throw new IOException("String_Node_Str");
  }
  Url url=createUrl(request.getUrl());
  if (log.isDebugEnabled())   log.debug("String_Node_Str" + url.toString());
  Channel channel=lookupInCache(url);
  if (channel != null && channel.isOpen()) {
    HttpRequest nettyRequest=buildRequest(config,request,url);
    if (f == null) {
      f=new NettyResponseFuture<T>(url,request,asyncHandler,nettyRequest,config.getRequestTimeoutInMs());
    }
    executeRequest(channel,config,f,nettyRequest);
    return f;
  }
  ConnectListener<T> c=new ConnectListener.Builder<T>(config,request,asyncHandler,f).build();
  configure(url.getProtocol().compareTo(Protocol.HTTPS) == 0,c);
  ChannelFuture channelFuture;
  try {
    if (config.getProxyServer() == null) {
      channelFuture=bootstrap.connect(new InetSocketAddress(url.getHost(),url.getPort()));
    }
 else {
      channelFuture=bootstrap.connect(new InetSocketAddress(config.getProxyServer().getHost(),config.getProxyServer().getPort()));
    }
    bootstrap.setOption("String_Node_Str",config.getConnectionTimeoutInMs());
  }
 catch (  Throwable t) {
    log.error(t);
    c.future().abort(t.getCause());
    return c.future();
  }
  channelFuture.addListener(c);
  openChannels.add(channelFuture.getChannel());
  return c.future();
}

Fixed version (ground truth):
private <T>Future<T> doConnect(final Request request,final AsyncHandler<T> asyncHandler,NettyResponseFuture<T> f) throws IOException {
  if (isClose.get()) {
    throw new IOException("String_Node_Str");
  }
  if (activeConnectionsCount.getAndIncrement() >= config.getMaxTotalConnections()) {
    throw new IOException("String_Node_Str");
  }
  Url url=createUrl(request.getUrl());
  if (log.isDebugEnabled())   log.debug("String_Node_Str" + url.toString());
  Channel channel=lookupInCache(url);
  if (channel != null && channel.isOpen()) {
    HttpRequest nettyRequest=buildRequest(config,request,url);
    if (f == null) {
      f=new NettyResponseFuture<T>(url,request,asyncHandler,nettyRequest,config.getRequestTimeoutInMs());
    }
    executeRequest(channel,config,f,nettyRequest);
    return f;
  }
  ConnectListener<T> c=new ConnectListener.Builder<T>(config,request,asyncHandler,f).build();
  configure(url.getProtocol().compareTo(Protocol.HTTPS) == 0,c);
  ChannelFuture channelFuture;
  try {
    if (config.getProxyServer() == null) {
      channelFuture=bootstrap.connect(new InetSocketAddress(url.getHost(),url.getPort()));
    }
 else {
      channelFuture=bootstrap.connect(new InetSocketAddress(config.getProxyServer().getHost(),config.getProxyServer().getPort()));
    }
    bootstrap.setOption("String_Node_Str",config.getConnectionTimeoutInMs());
  }
 catch (  Throwable t) {
    activeConnectionsCount.decrementAndGet();
    log.error(t);
    c.future().abort(t.getCause());
    return c.future();
  }
  channelFuture.addListener(c);
  openChannels.add(channelFuture.getChannel());
  return c.future();
}