Program: 53111
Project: 53111
Buggy source:
@Override public int runWithoutHelp(CommandRunnerParams params) throws IOException, InterruptedException {
  if (isResolveAlias()) {
    return doResolveAlias(params);
  }
  if (isShowRuleKey() && isShowTargetHash()) {
    throw new HumanReadableException("String_Node_Str");
  }
  try (CommandThreadManager pool=new CommandThreadManager("String_Node_Str",params.getBuckConfig().getWorkQueueExecutionOrder(),getConcurrencyLimit(params.getBuckConfig()))){
    if (isShowOutput() || isShowRuleKey() || isShowTargetHash()) {
      try {
        return doShowRules(params,pool.getExecutor());
      }
 catch (      NoSuchBuildTargetException e) {
        throw new HumanReadableException("String_Node_Str",e.getHumanReadableErrorMessage());
      }
    }
    ImmutableSet<String> types=getTypes();
    ImmutableSet.Builder<BuildRuleType> buildRuleTypesBuilder=ImmutableSet.builder();
    for (    String name : types) {
      try {
        buildRuleTypesBuilder.add(params.getCell().getBuildRuleType(name));
      }
 catch (      IllegalArgumentException e) {
        params.getBuckEventBus().post(ConsoleEvent.severe("String_Node_Str" + name));
        return 1;
      }
    }
    ImmutableSet<BuildTarget> matchingBuildTargets;
    TargetGraph graph;
    try {
      if (getArguments().isEmpty() || isDetectTestChanges()) {
        matchingBuildTargets=ImmutableSet.of();
        graph=params.getParser().buildTargetGraphForTargetNodeSpecs(params.getBuckEventBus(),params.getCell(),getEnableProfiling(),pool.getExecutor(),ImmutableList.of(TargetNodePredicateSpec.of(Predicates.<TargetNode<?>>alwaysTrue(),BuildFileSpec.fromRecursivePath(Paths.get("String_Node_Str"))))).getSecond();
      }
 else {
        Pair<ImmutableSet<BuildTarget>,TargetGraph> results=params.getParser().buildTargetGraphForTargetNodeSpecs(params.getBuckEventBus(),params.getCell(),getEnableProfiling(),pool.getExecutor(),parseArgumentsAsTargetNodeSpecs(params.getBuckConfig(),getArguments()));
        matchingBuildTargets=results.getFirst();
        graph=results.getSecond();
      }
    }
 catch (    BuildTargetException|BuildFileParseException e) {
      params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
      return 1;
    }
    PathArguments.ReferencedFiles referencedFiles=getReferencedFiles(params.getCell().getFilesystem().getRootPath());
    SortedMap<String,TargetNode<?>> matchingNodes;
    if (!referencedFiles.absolutePathsOutsideProjectRootOrNonExistingPaths.isEmpty() && referencedFiles.relativePathsUnderProjectRoot.isEmpty()) {
      matchingNodes=ImmutableSortedMap.of();
    }
 else {
      ImmutableSet<BuildRuleType> buildRuleTypes=buildRuleTypesBuilder.build();
      ParserConfig parserConfig=new ParserConfig(params.getBuckConfig());
      matchingNodes=getMatchingNodes(graph,referencedFiles.relativePathsUnderProjectRoot.isEmpty() ? Optional.<ImmutableSet<Path>>absent() : Optional.of(referencedFiles.relativePathsUnderProjectRoot),matchingBuildTargets.isEmpty() ? Optional.<ImmutableSet<BuildTarget>>absent() : Optional.of(matchingBuildTargets),buildRuleTypes.isEmpty() ? Optional.<ImmutableSet<BuildRuleType>>absent() : Optional.of(buildRuleTypes),isDetectTestChanges(),parserConfig.getBuildFileName());
    }
    if (getPrintJson()) {
      try {
        printJsonForTargets(params,pool.getExecutor(),matchingNodes);
      }
 catch (      BuildFileParseException e) {
        params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
        return 1;
      }
    }
 else     if (isPrint0()) {
      printNullDelimitedTargets(matchingNodes.keySet(),params.getConsole().getStdOut());
    }
 else {
      for (      String target : matchingNodes.keySet()) {
        params.getConsole().getStdOut().println(target);
      }
    }
  }
   return 0;
}

Fixed version (ground truth):
@Override public int runWithoutHelp(CommandRunnerParams params) throws IOException, InterruptedException {
  if (isResolveAlias()) {
    return doResolveAlias(params);
  }
  if (isShowRuleKey() && isShowTargetHash()) {
    throw new HumanReadableException("String_Node_Str");
  }
  ImmutableMap<String,ShowOptions> showRulesResult=ImmutableMap.of();
  try (CommandThreadManager pool=new CommandThreadManager("String_Node_Str",params.getBuckConfig().getWorkQueueExecutionOrder(),getConcurrencyLimit(params.getBuckConfig()))){
    if (isShowOutput() || isShowRuleKey() || isShowTargetHash()) {
      try {
        showRulesResult=computeShowRules(params,pool.getExecutor());
      }
 catch (      NoSuchBuildTargetException e) {
        throw new HumanReadableException("String_Node_Str",e.getHumanReadableErrorMessage());
      }
catch (      BuildTargetException|BuildFileParseException e) {
        params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
        return 1;
      }
      if (!getPrintJson()) {
        printShowRules(showRulesResult,params);
        return 0;
      }
    }
    ImmutableSet<String> types=getTypes();
    ImmutableSet.Builder<BuildRuleType> buildRuleTypesBuilder=ImmutableSet.builder();
    for (    String name : types) {
      try {
        buildRuleTypesBuilder.add(params.getCell().getBuildRuleType(name));
      }
 catch (      IllegalArgumentException e) {
        params.getBuckEventBus().post(ConsoleEvent.severe("String_Node_Str" + name));
        return 1;
      }
    }
    ImmutableSet<BuildTarget> matchingBuildTargets;
    TargetGraph graph;
    try {
      if (getArguments().isEmpty() || isDetectTestChanges()) {
        matchingBuildTargets=ImmutableSet.of();
        graph=params.getParser().buildTargetGraphForTargetNodeSpecs(params.getBuckEventBus(),params.getCell(),getEnableProfiling(),pool.getExecutor(),ImmutableList.of(TargetNodePredicateSpec.of(Predicates.<TargetNode<?>>alwaysTrue(),BuildFileSpec.fromRecursivePath(Paths.get("String_Node_Str"))))).getSecond();
      }
 else {
        Pair<ImmutableSet<BuildTarget>,TargetGraph> results=params.getParser().buildTargetGraphForTargetNodeSpecs(params.getBuckEventBus(),params.getCell(),getEnableProfiling(),pool.getExecutor(),parseArgumentsAsTargetNodeSpecs(params.getBuckConfig(),getArguments()));
        matchingBuildTargets=results.getFirst();
        graph=results.getSecond();
      }
    }
 catch (    BuildTargetException|BuildFileParseException e) {
      params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
      return 1;
    }
    PathArguments.ReferencedFiles referencedFiles=getReferencedFiles(params.getCell().getFilesystem().getRootPath());
    SortedMap<String,TargetNode<?>> matchingNodes;
    if (!referencedFiles.absolutePathsOutsideProjectRootOrNonExistingPaths.isEmpty() && referencedFiles.relativePathsUnderProjectRoot.isEmpty()) {
      matchingNodes=ImmutableSortedMap.of();
    }
 else {
      ImmutableSet<BuildRuleType> buildRuleTypes=buildRuleTypesBuilder.build();
      ParserConfig parserConfig=new ParserConfig(params.getBuckConfig());
      matchingNodes=getMatchingNodes(graph,referencedFiles.relativePathsUnderProjectRoot.isEmpty() ? Optional.<ImmutableSet<Path>>absent() : Optional.of(referencedFiles.relativePathsUnderProjectRoot),matchingBuildTargets.isEmpty() ? Optional.<ImmutableSet<BuildTarget>>absent() : Optional.of(matchingBuildTargets),buildRuleTypes.isEmpty() ? Optional.<ImmutableSet<BuildRuleType>>absent() : Optional.of(buildRuleTypes),isDetectTestChanges(),parserConfig.getBuildFileName());
    }
    if (getPrintJson()) {
      try {
        printJsonForTargets(params,pool.getExecutor(),matchingNodes,showRulesResult);
      }
 catch (      BuildFileParseException e) {
        params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));
        return 1;
      }
    }
 else     if (isPrint0()) {
      printNullDelimitedTargets(matchingNodes.keySet(),params.getConsole().getStdOut());
    }
 else {
      for (      String target : matchingNodes.keySet()) {
        params.getConsole().getStdOut().println(target);
      }
    }
  }
   return 0;
}