Program: 52834
Project: 52834
Buggy source:
/** 
 * Executes the tbuild and prints failures to the event bus. 
 */
public ExecutionResult executeAndPrintFailuresToEventBus(ListeningExecutorService executorService,ProjectFilesystem projectFilesystem,FileHashCache fileHashCache,InvocationInfo invocationInfo,BuildMode buildMode,int numberOfMinions,String repository,String tenantId,ListenableFuture<ParallelRuleKeyCalculator<RuleKey>> ruleKeyCalculatorFuture) throws InterruptedException {
  Pair<StampedeId,ListenableFuture<Void>> stampedeIdAndPendingPrepFuture=null;
  try {
    stampedeIdAndPendingPrepFuture=preBuildPhase.runPreDistBuildLocalStepsAsync(executorService,projectFilesystem,fileHashCache,eventBus,invocationInfo.getBuildId(),buildMode,numberOfMinions,repository,tenantId,ruleKeyCalculatorFuture);
  }
 catch (  DistBuildService.DistBuildRejectedException ex) {
    eventBus.post(ConsoleEvent.createForMessageWithAnsiEscapeCodes(Level.WARNING,console.getAnsi().asWarningText(ex.getMessage())));
    return createFailedExecutionResult(Preconditions.checkNotNull(stampedeIdReference.get()),ExitCode.PREPARATION_STEP_FAILED);
  }
catch (  IOException|RuntimeException ex) {
    LOG.error(ex,"String_Node_Str");
    return createFailedExecutionResult(Preconditions.checkNotNull(stampedeIdReference.get()),ExitCode.PREPARATION_STEP_FAILED);
  }
  stampedeIdAndPendingPrepFuture=Preconditions.checkNotNull(stampedeIdAndPendingPrepFuture);
  stampedeIdReference.set(stampedeIdAndPendingPrepFuture.getFirst());
  ListenableFuture<Void> pendingPrepFuture=stampedeIdAndPendingPrepFuture.getSecond();
  try {
    LOG.info("String_Node_Str");
    pendingPrepFuture.get();
    LOG.info("String_Node_Str");
  }
 catch (  InterruptedException ex) {
    pendingPrepFuture.cancel(true);
    Thread.currentThread().interrupt();
    throw ex;
  }
catch (  ExecutionException ex) {
    LOG.error(ex,"String_Node_Str");
    return createFailedExecutionResult(stampedeIdReference.get(),ExitCode.PREPARATION_ASYNC_STEP_FAILED);
  }
  BuildPhase.BuildResult buildResult=null;
  try {
    buildResult=buildPhase.runDistBuildAndUpdateConsoleStatus(executorService,Preconditions.checkNotNull(stampedeIdReference.get()),buildMode,invocationInfo,ruleKeyCalculatorFuture);
  }
 catch (  IOException|RuntimeException ex) {
    LOG.error(ex,"String_Node_Str");
    return createFailedExecutionResult(Preconditions.checkNotNull(stampedeIdReference.get()),ExitCode.DISTRIBUTED_BUILD_STEP_LOCAL_EXCEPTION);
  }
  return postBuildPhase.runPostDistBuildLocalSteps(executorService,buildResult.getBuildSlaveStatusList(),buildResult.getFinalBuildJob(),consoleEventsDispatcher);
}

Fixed version (ground truth):
/** 
 * Executes the tbuild and prints failures to the event bus. 
 */
public ExecutionResult executeAndPrintFailuresToEventBus(ListeningExecutorService executorService,ProjectFilesystem projectFilesystem,FileHashCache fileHashCache,InvocationInfo invocationInfo,BuildMode buildMode,int numberOfMinions,String repository,String tenantId,ListenableFuture<ParallelRuleKeyCalculator<RuleKey>> ruleKeyCalculatorFuture) throws InterruptedException {
  Pair<StampedeId,ListenableFuture<Void>> stampedeIdAndPendingPrepFuture=null;
  try {
    stampedeIdAndPendingPrepFuture=Preconditions.checkNotNull(preBuildPhase.runPreDistBuildLocalStepsAsync(executorService,projectFilesystem,fileHashCache,eventBus,invocationInfo.getBuildId(),buildMode,numberOfMinions,repository,tenantId,ruleKeyCalculatorFuture));
  }
 catch (  DistBuildService.DistBuildRejectedException ex) {
    eventBus.post(ConsoleEvent.createForMessageWithAnsiEscapeCodes(Level.WARNING,console.getAnsi().asWarningText(ex.getMessage())));
    return createFailedExecutionResult(Preconditions.checkNotNull(stampedeIdReference.get()),ExitCode.PREPARATION_STEP_FAILED);
  }
catch (  IOException|RuntimeException ex) {
    LOG.error(ex,"String_Node_Str");
    return createFailedExecutionResult(Preconditions.checkNotNull(stampedeIdReference.get()),ExitCode.PREPARATION_STEP_FAILED);
  }
  stampedeIdReference.set(stampedeIdAndPendingPrepFuture.getFirst());
  ListenableFuture<Void> pendingPrepFuture=stampedeIdAndPendingPrepFuture.getSecond();
  try {
    LOG.info("String_Node_Str");
    pendingPrepFuture.get();
    LOG.info("String_Node_Str");
  }
 catch (  InterruptedException ex) {
    pendingPrepFuture.cancel(true);
    Thread.currentThread().interrupt();
    throw ex;
  }
catch (  ExecutionException ex) {
    LOG.error(ex,"String_Node_Str");
    return createFailedExecutionResult(stampedeIdReference.get(),ExitCode.PREPARATION_ASYNC_STEP_FAILED);
  }
  BuildPhase.BuildResult buildResult=null;
  try {
    buildResult=buildPhase.runDistBuildAndUpdateConsoleStatus(executorService,Preconditions.checkNotNull(stampedeIdReference.get()),buildMode,invocationInfo,ruleKeyCalculatorFuture);
  }
 catch (  IOException|RuntimeException ex) {
    LOG.error(ex,"String_Node_Str");
    return createFailedExecutionResult(Preconditions.checkNotNull(stampedeIdReference.get()),ExitCode.DISTRIBUTED_BUILD_STEP_LOCAL_EXCEPTION);
  }
  return postBuildPhase.runPostDistBuildLocalSteps(executorService,buildResult.getBuildSlaveStatusList(),buildResult.getFinalBuildJob(),consoleEventsDispatcher);
}