Program: 15176
Project: 15176
Buggy source:
private void teardown(Throwable t){
  if (t != null && !this.response.isDone()) {
    LOG.debug("String_Node_Str" + t.getMessage() + "String_Node_Str"+ ((request.get() != null) ? request.get().toSimpleString() : "String_Node_Str"));
    if (t instanceof RetryableConnectionException) {
      LOG.error(t.getMessage());
    }
 else     if (t instanceof ConnectionException) {
      LOG.error(t.getMessage());
    }
 else     if (t instanceof IOException) {
      LOG.error(t.getMessage());
    }
    this.response.setException(t);
  }
 else   if (t != null && this.response.isDone()) {
    LOG.error(t.getMessage());
    this.response.setException(t);
  }
  if (this.connectFuture != null) {
    if (this.connectFuture.isDone() && this.connectFuture.isSuccess()) {
      Channel channel=this.connectFuture.getChannel();
      if (channel != null && channel.isOpen()) {
        channel.close().addListener(new ChannelFutureListener(){
          @Override public void operationComplete(          ChannelFuture future) throws Exception {
            EventRecord.here(AsyncRequestHandler.this.request.get().getClass(),EventClass.SYSTEM_REQUEST,EventType.CHANNEL_CLOSED).trace();
          }
        }
);
      }
 else {
        EventRecord.here(AsyncRequestHandler.this.request.get().getClass(),EventClass.SYSTEM_REQUEST,EventType.CHANNEL_CLOSED,"String_Node_Str").trace();
      }
    }
 else     if (!this.connectFuture.isDone() && !this.connectFuture.cancel()) {
      LOG.error("String_Node_Str" + this.connectFuture.toString());
      Channel channel=this.connectFuture.getChannel();
      if (channel != null) {
        channel.close();
      }
    }
 else     if (!this.connectFuture.isSuccess()) {
      Channel channel=this.connectFuture.getChannel();
      if (channel != null) {
        channel.close();
      }
    }
  }
}

Fixed version (ground truth):
private void teardown(Throwable t){
  if (t != null && !this.response.isDone()) {
    LOG.debug("String_Node_Str" + t.getMessage() + "String_Node_Str"+ ((request.get() != null) ? request.get().toSimpleString() : "String_Node_Str"));
    if (t instanceof RetryableConnectionException) {
      LOG.error(t.getMessage());
    }
 else     if (t instanceof ConnectionException) {
      LOG.error(t.getMessage());
    }
 else     if (t instanceof IOException) {
      LOG.error(t.getMessage());
    }
    this.response.setException(t);
  }
 else   if (t != null && this.response.isDone()) {
    LOG.error(t.getMessage());
    this.response.setException(t);
  }
  if (this.connectFuture != null) {
    if (this.connectFuture.isDone() && this.connectFuture.isSuccess()) {
      Channel channel=this.connectFuture.getChannel();
      if (channel != null && channel.isOpen()) {
        channel.close().addListener(new ChannelFutureListener(){
          @Override public void operationComplete(          ChannelFuture future) throws Exception {
            EventRecord.here(AsyncRequestHandler.this.request.get().getClass(),EventClass.SYSTEM_REQUEST,EventType.CHANNEL_CLOSED).trace();
          }
        }
);
      }
 else {
        EventRecord.here(AsyncRequestHandler.this.request.get().getClass(),EventClass.SYSTEM_REQUEST,EventType.CHANNEL_CLOSED,"String_Node_Str").trace();
      }
    }
 else     if (!this.connectFuture.isDone() && !this.connectFuture.cancel()) {
      LOG.error("String_Node_Str" + this.connectFuture.toString());
      Channel channel=this.connectFuture.getChannel();
      if (channel != null) {
        channel.close();
      }
    }
 else     if (!this.connectFuture.isSuccess()) {
      Channel channel=this.connectFuture.getChannel();
      if (channel != null) {
        channel.close();
      }
    }
  }
 else {
    this.response.setException(t);
  }
}