Program: 8070
Project: 8070
Buggy source:
private PostProcess.Callback processMethodCallback(final PriorityBlockingQueue<ProcessEntry> processQueue,final ProcessEntry processEntry,final InputDatum input){
  return new PostProcess.Callback(){
    @Override public void onSuccess(    Object object,    InputContext inputContext){
      inflight.decrementAndGet();
      try {
        flowletContext.getMetrics().count("String_Node_Str",1);
        txCallback.onSuccess(object,inputContext);
      }
 catch (      Throwable t) {
        LOG.info("String_Node_Str" + flowletContext,t);
      }
    }
    @Override public void onFailure(    Object inputObject,    InputContext inputContext,    FailureReason reason,    PostProcess.InputAcknowledger inputAcknowledger){
      LOG.info("String_Node_Str" + reason.getMessage(),reason.getCause());
      FailurePolicy failurePolicy;
      inflight.decrementAndGet();
      try {
        flowletContext.getMetrics().count("String_Node_Str",1);
        failurePolicy=txCallback.onFailure(inputObject,inputContext,reason);
      }
 catch (      Throwable t) {
        LOG.info("String_Node_Str" + flowletContext,t);
        failurePolicy=FailurePolicy.RETRY;
      }
      if (input.getRetry() >= PROCESS_MAX_RETRY) {
        failurePolicy=FailurePolicy.IGNORE;
      }
      if (failurePolicy == FailurePolicy.RETRY) {
        ProcessEntry retryEntry=processEntry.isRetry() ? processEntry : new ProcessEntry(new ProcessSpecification(new SingleItemQueueReader(input),processEntry.processSpec.getProcessMethod()),true);
        processQueue.offer(retryEntry);
      }
 else       if (failurePolicy == FailurePolicy.IGNORE) {
        try {
          flowletContext.getMetrics().count("String_Node_Str",1);
          inputAcknowledger.ack();
        }
 catch (        OperationException e) {
          LOG.error("String_Node_Str" + flowletContext,e);
        }
      }
    }
  }
;
}

Fixed version (ground truth):
private PostProcess.Callback processMethodCallback(final PriorityBlockingQueue<ProcessEntry> processQueue,final ProcessEntry processEntry,final InputDatum input){
  return new PostProcess.Callback(){
    @Override public void onSuccess(    Object object,    InputContext inputContext){
      inflight.decrementAndGet();
      try {
        flowletContext.getMetrics().count("String_Node_Str",1);
        txCallback.onSuccess(object,inputContext);
      }
 catch (      Throwable t) {
        LOG.info("String_Node_Str" + flowletContext,t);
      }
 finally {
        enqueueEntry();
      }
    }
    @Override public void onFailure(    Object inputObject,    InputContext inputContext,    FailureReason reason,    PostProcess.InputAcknowledger inputAcknowledger){
      LOG.info("String_Node_Str" + reason.getMessage(),reason.getCause());
      FailurePolicy failurePolicy;
      inflight.decrementAndGet();
      try {
        flowletContext.getMetrics().count("String_Node_Str",1);
        failurePolicy=txCallback.onFailure(inputObject,inputContext,reason);
      }
 catch (      Throwable t) {
        LOG.error("String_Node_Str" + flowletContext,t);
        failurePolicy=FailurePolicy.RETRY;
      }
      if (input.getRetry() >= PROCESS_MAX_RETRY) {
        LOG.info("String_Node_Str" + input);
        failurePolicy=FailurePolicy.IGNORE;
      }
      if (failurePolicy == FailurePolicy.RETRY) {
        ProcessEntry retryEntry=processEntry.isRetry() ? processEntry : new ProcessEntry(processEntry.getProcessSpec(),new ProcessSpecification(new SingleItemQueueReader(input),processEntry.getProcessSpec().getProcessMethod()));
        processQueue.offer(retryEntry);
      }
 else       if (failurePolicy == FailurePolicy.IGNORE) {
        try {
          flowletContext.getMetrics().count("String_Node_Str",1);
          inputAcknowledger.ack();
        }
 catch (        OperationException e) {
          LOG.error("String_Node_Str" + flowletContext,e);
        }
 finally {
          enqueueEntry();
        }
      }
    }
    private void enqueueEntry(){
      if (!flowletContext.isAsyncMode()) {
        processQueue.offer(processEntry.resetRetry());
      }
    }
  }
;
}