Program: 6607
Project: 6607
Buggy source:
private void executeAction(ApplicationSpecification appSpec,WorkflowActionNode node,InstantiatorFactory instantiator,final ClassLoader classLoader,WorkflowToken token) throws Exception {
  final SchedulableProgramType programType=node.getProgram().getProgramType();
  final WorkflowActionSpecification actionSpec=getActionSpecification(appSpec,node,programType);
  status.put(node.getNodeId(),node);
  final BasicWorkflowContext workflowContext=createWorkflowContext(actionSpec,token,node.getNodeId());
  final WorkflowAction action=initialize(actionSpec,classLoader,instantiator,workflowContext);
  ExecutorService executor=Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("String_Node_Str").build());
  try {
    Future<?> future=executor.submit(new Runnable(){
      @Override public void run(){
        setContextCombinedClassLoader(action);
        try {
          if (programType == SchedulableProgramType.CUSTOM_ACTION) {
            try {
              runInTransaction(action,workflowContext);
            }
 catch (            TransactionFailureException e) {
              throw Throwables.propagate(e);
            }
          }
 else {
            action.run();
          }
        }
  finally {
          try {
            destroyInTransaction(action,actionSpec,workflowContext);
          }
 catch (          TransactionFailureException e) {
            throw Throwables.propagate(e);
          }
        }
      }
    }
);
    future.get();
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",actionSpec,t);
    Throwables.propagateIfPossible(t,Exception.class);
    throw Throwables.propagate(t);
  }
 finally {
    executor.shutdownNow();
    executor.awaitTermination(Integer.MAX_VALUE,TimeUnit.NANOSECONDS);
    status.remove(node.getNodeId());
  }
  store.updateWorkflowToken(workflowId,runId.getId(),token);
}

Fixed version (ground truth):
private void executeAction(WorkflowActionNode node,InstantiatorFactory instantiator,final ClassLoader classLoader,WorkflowToken token) throws Exception {
  final SchedulableProgramType programType=node.getProgram().getProgramType();
  final WorkflowActionSpecification actionSpec=getActionSpecification(node,programType);
  status.put(node.getNodeId(),node);
  final BasicWorkflowContext workflowContext=createWorkflowContext(actionSpec,token,node.getNodeId());
  final WorkflowAction action=initialize(actionSpec,classLoader,instantiator,workflowContext);
  ExecutorService executor=Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("String_Node_Str").build());
  try {
    Future<?> future=executor.submit(new Runnable(){
      @Override public void run(){
        setContextCombinedClassLoader(action);
        try {
          if (programType == SchedulableProgramType.CUSTOM_ACTION) {
            try {
              runInTransaction(action,workflowContext);
            }
 catch (            TransactionFailureException e) {
              throw Throwables.propagate(e);
            }
          }
 else {
            action.run();
          }
        }
  finally {
          try {
            destroyInTransaction(action,actionSpec,workflowContext);
          }
 catch (          TransactionFailureException e) {
            throw Throwables.propagate(e);
          }
        }
      }
    }
);
    future.get();
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",actionSpec,t);
    Throwables.propagateIfPossible(t,Exception.class);
    throw Throwables.propagate(t);
  }
 finally {
    executor.shutdownNow();
    executor.awaitTermination(Integer.MAX_VALUE,TimeUnit.NANOSECONDS);
    status.remove(node.getNodeId());
  }
  store.updateWorkflowToken(workflowId,runId.getId(),token);
}