Program: 53120
Project: 53120
Buggy source:
@Override public int runWithoutHelp(CommandRunnerParams params) throws IOException, InterruptedException {
  Ide projectIde=getIdeFromBuckConfig(params.getBuckConfig()).orNull();
  boolean needsFullRecursiveParse=!isExperimentalIntelliJProjectGenerationEnabled() && projectIde != Ide.XCODE;
  try (CommandThreadManager pool=new CommandThreadManager("String_Node_Str",params.getBuckConfig().getWorkQueueExecutionOrder(),getConcurrencyLimit(params.getBuckConfig()))){
    ImmutableSet<BuildTarget> passedInTargetsSet;
    TargetGraph projectGraph;
    try {
      passedInTargetsSet=params.getParser().resolveTargetSpecs(params.getBuckEventBus(),params.getCell(),getEnableProfiling(),pool.getExecutor(),parseArgumentsAsTargetNodeSpecs(params.getBuckConfig(),getArguments()));
      needsFullRecursiveParse=needsFullRecursiveParse || passedInTargetsSet.isEmpty();
      projectGraph=getProjectGraphForIde(params,pool.getExecutor(),passedInTargetsSet,needsFullRecursiveParse);
    }
 catch (    BuildTargetException|BuildFileParseException|HumanReadableException e) {
      params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
      return 1;
    }
    projectIde=getIdeBasedOnPassedInTargetsAndProjectGraph(params.getBuckConfig(),passedInTargetsSet,Optional.of(projectGraph));
    if (projectIde == ProjectCommand.Ide.XCODE) {
      checkForAndKillXcodeIfRunning(params,getIdePrompt(params.getBuckConfig()));
    }
    ProjectPredicates projectPredicates=ProjectPredicates.forIde(projectIde);
    ImmutableSet<BuildTarget> graphRoots;
    if (!passedInTargetsSet.isEmpty()) {
      ImmutableSet<BuildTarget> supplementalGraphRoots=ImmutableSet.of();
      if (projectIde == Ide.INTELLIJ && needsFullRecursiveParse) {
        supplementalGraphRoots=getRootBuildTargetsForIntelliJ(projectIde,projectGraph,projectPredicates);
      }
      graphRoots=Sets.union(passedInTargetsSet,supplementalGraphRoots).immutableCopy();
    }
 else {
      graphRoots=getRootsFromPredicate(projectGraph,projectPredicates.getProjectRootsPredicate());
    }
    TargetGraphAndTargets targetGraphAndTargets;
    try {
      targetGraphAndTargets=createTargetGraph(params,projectGraph,graphRoots,projectPredicates.getAssociatedProjectPredicate(),isWithTests(),isWithDependenciesTests(),needsFullRecursiveParse,pool.getExecutor());
    }
 catch (    BuildFileParseException|HumanReadableException e) {
      params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
      return 1;
    }
    if (getDryRun()) {
      for (      TargetNode<?> targetNode : targetGraphAndTargets.getTargetGraph().getNodes()) {
        params.getConsole().getStdOut().println(targetNode.toString());
      }
      return 0;
    }
    params.getBuckEventBus().post(ProjectGenerationEvent.started());
    int result;
    try {
switch (projectIde) {
case INTELLIJ:
        result=runIntellijProjectGenerator(params,projectGraph,targetGraphAndTargets,passedInTargetsSet);
      break;
case XCODE:
    result=runXcodeProjectGenerator(params,targetGraphAndTargets,passedInTargetsSet);
  break;
default :
throw new IllegalStateException("String_Node_Str");
}
}
  finally {
params.getBuckEventBus().post(ProjectGenerationEvent.finished());
}
return result;
}
 }

Fixed version (ground truth):
@Override public int runWithoutHelp(CommandRunnerParams params) throws IOException, InterruptedException {
  Ide projectIde=getIdeFromBuckConfig(params.getBuckConfig()).orNull();
  boolean needsFullRecursiveParse=!isExperimentalIntelliJProjectGenerationEnabled() && projectIde != Ide.XCODE;
  try (CommandThreadManager pool=new CommandThreadManager("String_Node_Str",params.getBuckConfig().getWorkQueueExecutionOrder(),getConcurrencyLimit(params.getBuckConfig()))){
    ImmutableSet<BuildTarget> passedInTargetsSet;
    TargetGraph projectGraph;
    try {
      passedInTargetsSet=params.getParser().resolveTargetSpecs(params.getBuckEventBus(),params.getCell(),getEnableProfiling(),pool.getExecutor(),parseArgumentsAsTargetNodeSpecs(params.getBuckConfig(),getArguments()));
      needsFullRecursiveParse=needsFullRecursiveParse || passedInTargetsSet.isEmpty();
      projectGraph=getProjectGraphForIde(params,pool.getExecutor(),passedInTargetsSet,needsFullRecursiveParse);
    }
 catch (    BuildTargetException|BuildFileParseException|HumanReadableException e) {
      params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
      return 1;
    }
    projectIde=getIdeBasedOnPassedInTargetsAndProjectGraph(params.getBuckConfig(),passedInTargetsSet,Optional.of(projectGraph));
    if (projectIde == ProjectCommand.Ide.XCODE) {
      checkForAndKillXcodeIfRunning(params,getIdePrompt(params.getBuckConfig()));
    }
    ProjectPredicates projectPredicates=ProjectPredicates.forIde(projectIde);
    ImmutableSet<BuildTarget> graphRoots;
    if (!passedInTargetsSet.isEmpty()) {
      ImmutableSet<BuildTarget> supplementalGraphRoots=ImmutableSet.of();
      if (projectIde == Ide.INTELLIJ && needsFullRecursiveParse) {
        supplementalGraphRoots=getRootBuildTargetsForIntelliJ(projectIde,projectGraph,projectPredicates);
      }
      graphRoots=Sets.union(passedInTargetsSet,supplementalGraphRoots).immutableCopy();
    }
 else {
      graphRoots=getRootsFromPredicate(projectGraph,projectPredicates.getProjectRootsPredicate());
    }
    TargetGraphAndTargets targetGraphAndTargets;
    try {
      targetGraphAndTargets=createTargetGraph(params,projectGraph,graphRoots,projectPredicates.getAssociatedProjectPredicate(),isWithTests(),isWithDependenciesTests(),needsFullRecursiveParse,pool.getExecutor());
    }
 catch (    BuildFileParseException|BuildTargetException|HumanReadableException e) {
      params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
      return 1;
    }
    if (getDryRun()) {
      for (      TargetNode<?> targetNode : targetGraphAndTargets.getTargetGraph().getNodes()) {
        params.getConsole().getStdOut().println(targetNode.toString());
      }
      return 0;
    }
    params.getBuckEventBus().post(ProjectGenerationEvent.started());
    int result;
    try {
switch (projectIde) {
case INTELLIJ:
        result=runIntellijProjectGenerator(params,projectGraph,targetGraphAndTargets,passedInTargetsSet);
      break;
case XCODE:
    result=runXcodeProjectGenerator(params,targetGraphAndTargets,passedInTargetsSet);
  break;
default :
throw new IllegalStateException("String_Node_Str");
}
}
  finally {
params.getBuckEventBus().post(ProjectGenerationEvent.finished());
}
return result;
}
 }