Program: 7733
Project: 7733
Buggy source:
/** 
 * Deploys an application.
 */
@PUT @Path("String_Node_Str") public void deploy(HttpRequest request,HttpResponder responder){
  try {
    String accountId=getAuthenticatedAccountId(request);
    String archiveName=request.getHeader(ARCHIVE_NAME_HEADER);
    if (archiveName == null || archiveName.isEmpty()) {
      responder.sendStatus(HttpResponseStatus.BAD_REQUEST);
      return;
    }
    ChannelBuffer content=request.getContent();
    if (content == null) {
      responder.sendStatus(HttpResponseStatus.BAD_REQUEST);
      return;
    }
    AuthToken token=new AuthToken(request.getHeader(GatewayAuthenticator.CONTINUUITY_API_KEY));
    TProtocol protocol=getThriftProtocol(Services.APP_FABRIC,endpointStrategy);
    AppFabricService.Client client=new AppFabricService.Client(protocol);
    try {
      ArchiveInfo rInfo=new ArchiveInfo(accountId,"String_Node_Str",archiveName);
      ArchiveId rIdentifier=client.init(token,rInfo);
      while (content.readableBytes() > 0) {
        int bytesToRead=Math.min(1024 * 1024,content.readableBytes());
        client.chunk(token,rIdentifier,content.readSlice(bytesToRead).toByteBuffer());
      }
      client.deploy(token,rIdentifier);
      responder.sendStatus(HttpResponseStatus.OK);
    }
  finally {
      if (client.getInputProtocol().getTransport().isOpen()) {
        client.getInputProtocol().getTransport().close();
      }
      if (client.getOutputProtocol().getTransport().isOpen()) {
        client.getOutputProtocol().getTransport().close();
      }
    }
  }
 catch (  SecurityException e) {
    responder.sendStatus(HttpResponseStatus.FORBIDDEN);
  }
catch (  Exception e) {
    responder.sendStatus(HttpResponseStatus.NOT_FOUND);
  }
}

Fixed version (ground truth):
/** 
 * Deploys an application.
 */
@PUT @Path("String_Node_Str") public void deploy(HttpRequest request,HttpResponder responder){
  try {
    String accountId=getAuthenticatedAccountId(request);
    String archiveName=request.getHeader(ARCHIVE_NAME_HEADER);
    if (archiveName == null || archiveName.isEmpty()) {
      responder.sendStatus(HttpResponseStatus.BAD_REQUEST);
      return;
    }
    ChannelBuffer content=request.getContent();
    if (content == null) {
      responder.sendStatus(HttpResponseStatus.BAD_REQUEST);
      return;
    }
    AuthToken token=new AuthToken(request.getHeader(GatewayAuthenticator.CONTINUUITY_API_KEY));
    TProtocol protocol=getThriftProtocol(Constants.Service.APP_FABRIC,endpointStrategy);
    AppFabricService.Client client=new AppFabricService.Client(protocol);
    try {
      ArchiveInfo rInfo=new ArchiveInfo(accountId,"String_Node_Str",archiveName);
      ArchiveId rIdentifier=client.init(token,rInfo);
      while (content.readableBytes() > 0) {
        int bytesToRead=Math.min(1024 * 1024,content.readableBytes());
        client.chunk(token,rIdentifier,content.readSlice(bytesToRead).toByteBuffer());
      }
      client.deploy(token,rIdentifier);
      responder.sendStatus(HttpResponseStatus.OK);
    }
  finally {
      if (client.getInputProtocol().getTransport().isOpen()) {
        client.getInputProtocol().getTransport().close();
      }
      if (client.getOutputProtocol().getTransport().isOpen()) {
        client.getOutputProtocol().getTransport().close();
      }
    }
  }
 catch (  SecurityException e) {
    responder.sendStatus(HttpResponseStatus.FORBIDDEN);
  }
catch (  Exception e) {
    responder.sendStatus(HttpResponseStatus.NOT_FOUND);
  }
}