Program: 7752
Project: 7752
Buggy source:
@POST @Path("String_Node_Str") public void procedureCall(HttpRequest request,final HttpResponder responder,@PathParam("String_Node_Str") String appId,@PathParam("String_Node_Str") String procedureName,@PathParam("String_Node_Str") String methodName){
  Request postRequest;
  try {
    String accountId=getAuthenticatedAccountId(request);
    String serviceName=String.format("String_Node_Str",accountId,appId,procedureName);
    List<Discoverable> endpoints=Lists.newArrayList(discoveryServiceClient.discover(serviceName));
    if (endpoints.isEmpty()) {
      LOG.trace("String_Node_Str",serviceName);
      responder.sendStatus(NOT_FOUND);
      return;
    }
    Collections.shuffle(endpoints);
    InetSocketAddress endpoint=endpoints.get(0).getSocketAddress();
    String relayUri=Joiner.on('/').appendTo(new StringBuilder("String_Node_Str").append(endpoint.getHostName()).append("String_Node_Str").append(endpoint.getPort()).append("String_Node_Str"),"String_Node_Str",appId,"String_Node_Str",procedureName,methodName).toString();
    LOG.trace("String_Node_Str" + relayUri);
    RequestBuilder requestBuilder=new RequestBuilder("String_Node_Str");
    postRequest=requestBuilder.setUrl(relayUri).setBody(request.getContent().array()).build();
    final Request relayRequest=postRequest;
    asyncHttpClient.executeRequest(postRequest,new AsyncCompletionHandler<Void>(){
      @Override public Void onCompleted(      Response response) throws Exception {
        if (response.getStatusCode() == OK.getCode()) {
          String contentType=response.getContentType();
          ChannelBuffer content;
          int contentLength=Integer.parseInt(response.getHeader(CONTENT_LENGTH));
          if (contentLength > 0) {
            content=ChannelBuffers.dynamicBuffer(contentLength);
          }
 else {
            content=ChannelBuffers.dynamicBuffer();
          }
          InputStream input=response.getResponseBodyAsStream();
          ByteStreams.copy(input,new ChannelBufferOutputStream(content));
          responder.sendContent(OK,ChannelBuffers.wrappedBuffer(response.getResponseBodyAsByteBuffer()),contentType,ImmutableListMultimap.<String,String>of());
        }
 else {
          responder.sendStatus(HttpResponseStatus.valueOf(response.getStatusCode()));
        }
        return null;
      }
      @Override public void onThrowable(      Throwable t){
        LOG.trace("String_Node_Str",relayRequest,t);
        responder.sendStatus(INTERNAL_SERVER_ERROR);
      }
    }
);
  }
 catch (  SecurityException e) {
    responder.sendStatus(FORBIDDEN);
  }
catch (  IllegalArgumentException e) {
    responder.sendStatus(BAD_REQUEST);
  }
catch (  Throwable e) {
    responder.sendStatus(INTERNAL_SERVER_ERROR);
  }
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") public void procedureCall(HttpRequest request,final HttpResponder responder,@PathParam("String_Node_Str") String appId,@PathParam("String_Node_Str") String procedureName,@PathParam("String_Node_Str") String methodName){
  Request postRequest;
  try {
    String accountId=getAuthenticatedAccountId(request);
    String serviceName=String.format("String_Node_Str",accountId,appId,procedureName);
    List<Discoverable> endpoints=Lists.newArrayList(discoveryServiceClient.discover(serviceName));
    if (endpoints.isEmpty()) {
      LOG.trace("String_Node_Str",serviceName);
      responder.sendStatus(NOT_FOUND);
      return;
    }
    Collections.shuffle(endpoints);
    InetSocketAddress endpoint=endpoints.get(0).getSocketAddress();
    String relayUri=Joiner.on('/').appendTo(new StringBuilder("String_Node_Str").append(endpoint.getHostName()).append("String_Node_Str").append(endpoint.getPort()).append("String_Node_Str"),"String_Node_Str",appId,"String_Node_Str",procedureName,methodName).toString();
    LOG.trace("String_Node_Str" + relayUri);
    RequestBuilder requestBuilder=new RequestBuilder("String_Node_Str");
    postRequest=requestBuilder.setUrl(relayUri).setBody(request.getContent().array()).build();
    final Request relayRequest=postRequest;
    asyncHttpClient.executeRequest(postRequest,new AsyncCompletionHandler<Void>(){
      @Override public Void onCompleted(      Response response) throws Exception {
        if (response.getStatusCode() == OK.getCode()) {
          String contentType=response.getContentType();
          ChannelBuffer content;
          int contentLength=getContentLength(response);
          if (contentLength > 0) {
            content=ChannelBuffers.dynamicBuffer(contentLength);
          }
 else {
            content=ChannelBuffers.dynamicBuffer();
          }
          InputStream input=response.getResponseBodyAsStream();
          ByteStreams.copy(input,new ChannelBufferOutputStream(content));
          responder.sendContent(OK,content,contentType,ImmutableListMultimap.<String,String>of());
        }
 else {
          responder.sendStatus(HttpResponseStatus.valueOf(response.getStatusCode()));
        }
        return null;
      }
      @Override public void onThrowable(      Throwable t){
        LOG.trace("String_Node_Str",relayRequest,t);
        responder.sendStatus(INTERNAL_SERVER_ERROR);
      }
    }
);
  }
 catch (  SecurityException e) {
    responder.sendStatus(FORBIDDEN);
  }
catch (  IllegalArgumentException e) {
    responder.sendStatus(BAD_REQUEST);
  }
catch (  Throwable e) {
    responder.sendStatus(INTERNAL_SERVER_ERROR);
  }
}