Program: 7794
Project: 7794
Buggy source:
private <T>ProcessMethodCallback processMethodCallback(final BlockingQueue<FlowletProcessEntry<?>> processQueue,final FlowletProcessEntry<T> processEntry,final InputDatum input){
  return new ProcessMethodCallback(){
    @Override public void onSuccess(    Object object,    InputContext inputContext){
      try {
        flowletContext.getSystemMetrics().gauge("String_Node_Str",1);
        txCallback.onSuccess(object,inputContext);
      }
 catch (      Throwable t) {
        LOG.error("String_Node_Str",flowletContext,t);
      }
 finally {
        enqueueEntry();
        inflight.decrementAndGet();
      }
    }
    @Override public void onFailure(    Object inputObject,    InputContext inputContext,    FailureReason reason,    InputAcknowledger inputAcknowledger){
      LOG.warn("String_Node_Str",flowletContext,reason.getMessage(),input,reason.getCause());
      FailurePolicy failurePolicy;
      try {
        flowletContext.getSystemMetrics().gauge("String_Node_Str",1);
        failurePolicy=txCallback.onFailure(inputObject,inputContext,reason);
        if (failurePolicy == null) {
          failurePolicy=FailurePolicy.RETRY;
          LOG.info("String_Node_Str",failurePolicy);
        }
      }
 catch (      Throwable t) {
        LOG.error("String_Node_Str",flowletContext,t);
        failurePolicy=FailurePolicy.RETRY;
      }
      if (input.getRetry() >= processEntry.getProcessSpec().getProcessMethod().getMaxRetries()) {
        LOG.info("String_Node_Str",input);
        failurePolicy=FailurePolicy.IGNORE;
      }
      if (failurePolicy == FailurePolicy.RETRY) {
        FlowletProcessEntry retryEntry=processEntry.isRetry() ? processEntry : FlowletProcessEntry.create(processEntry.getProcessSpec(),new ProcessSpecification<T>(new SingleItemQueueReader(input),processEntry.getProcessSpec().getInputDecoder(),processEntry.getProcessSpec().getProcessMethod()));
        processQueue.offer(retryEntry);
      }
 else       if (failurePolicy == FailurePolicy.IGNORE) {
        try {
          flowletContext.getSystemMetrics().gauge("String_Node_Str",1);
          inputAcknowledger.ack();
        }
 catch (        OperationException e) {
          LOG.error("String_Node_Str",flowletContext,e);
        }
 finally {
          enqueueEntry();
          inflight.decrementAndGet();
        }
      }
    }
    private void enqueueEntry(){
      if (!flowletContext.isAsyncMode()) {
        processQueue.offer(processEntry.resetRetry());
      }
    }
  }
;
}

Fixed version (ground truth):
private <T>ProcessMethodCallback processMethodCallback(final BlockingQueue<FlowletProcessEntry<?>> processQueue,final FlowletProcessEntry<T> processEntry,final InputDatum input){
  return new ProcessMethodCallback(){
    @Override public void onSuccess(    Object object,    InputContext inputContext){
      try {
        flowletContext.getSystemMetrics().gauge("String_Node_Str",input.size());
        txCallback.onSuccess(object,inputContext);
      }
 catch (      Throwable t) {
        LOG.error("String_Node_Str",flowletContext,t);
      }
 finally {
        enqueueEntry();
        inflight.decrementAndGet();
      }
    }
    @Override public void onFailure(    Object inputObject,    InputContext inputContext,    FailureReason reason,    InputAcknowledger inputAcknowledger){
      LOG.warn("String_Node_Str",flowletContext,reason.getMessage(),input,reason.getCause());
      FailurePolicy failurePolicy;
      try {
        flowletContext.getSystemMetrics().gauge("String_Node_Str",1);
        failurePolicy=txCallback.onFailure(inputObject,inputContext,reason);
        if (failurePolicy == null) {
          failurePolicy=FailurePolicy.RETRY;
          LOG.info("String_Node_Str",failurePolicy);
        }
      }
 catch (      Throwable t) {
        LOG.error("String_Node_Str",flowletContext,t);
        failurePolicy=FailurePolicy.RETRY;
      }
      if (input.getRetry() >= processEntry.getProcessSpec().getProcessMethod().getMaxRetries()) {
        LOG.info("String_Node_Str",input);
        failurePolicy=FailurePolicy.IGNORE;
      }
      if (failurePolicy == FailurePolicy.RETRY) {
        FlowletProcessEntry retryEntry=processEntry.isRetry() ? processEntry : FlowletProcessEntry.create(processEntry.getProcessSpec(),new ProcessSpecification<T>(new SingleItemQueueReader(input),processEntry.getProcessSpec().getInputDecoder(),processEntry.getProcessSpec().getProcessMethod()));
        processQueue.offer(retryEntry);
      }
 else       if (failurePolicy == FailurePolicy.IGNORE) {
        try {
          flowletContext.getSystemMetrics().gauge("String_Node_Str",input.size());
          inputAcknowledger.ack();
        }
 catch (        OperationException e) {
          LOG.error("String_Node_Str",flowletContext,e);
        }
 finally {
          enqueueEntry();
          inflight.decrementAndGet();
        }
      }
    }
    private void enqueueEntry(){
      if (!flowletContext.isAsyncMode()) {
        processQueue.offer(processEntry.resetRetry());
      }
    }
  }
;
}