Program: 37056
Project: 37056
Buggy source:
public int go(String[] args,PrintStream out,PrintStream err){
  try {
    if (args.length == 0 || findJavaSourceFiles(args) || findAtFile(args) || null == Util.findServerSettings(args)) {
      printHelp();
      return 0;
    }
    Log.setLogLevel(findLogLevel(args),out,err);
    String server_settings=Util.findServerSettings(args);
    args=verifyImplicitOption(args);
    args=addSrcBeforeDirectories(args);
    checkSrcOption(args);
    bin_dir=findDirectoryOption(args,"String_Node_Str","String_Node_Str",true,false,true);
    gensrc_dir=findDirectoryOption(args,"String_Node_Str","String_Node_Str",false,false,true);
    header_dir=findDirectoryOption(args,"String_Node_Str","String_Node_Str",false,false,true);
    makefile_source_list=findFileOption(args,"String_Node_Str","String_Node_Str",false);
    javac_state=JavacState.load(args,bin_dir,gensrc_dir,header_dir,findBooleanOption(args,"String_Node_Str"),out,err);
    suffix_rules=javac_state.getJavaSuffixRule();
    findTranslateOptions(args,suffix_rules);
    if (suffix_rules.keySet().size() > 1 && gensrc_dir == null) {
      Log.error("String_Node_Str");
      return -1;
    }
    findCopyOptions(args,suffix_rules);
    Map<String,Module> modules=new HashMap<String,Module>();
    Module current_module=new Module("String_Node_Str","String_Node_Str");
    modules.put("String_Node_Str",current_module);
    Map<String,Source> sources=new HashMap<String,Source>();
    findFiles(args,"String_Node_Str",suffix_rules.keySet(),sources,modules,current_module,false);
    if (sources.isEmpty()) {
      Log.error("String_Node_Str");
      return -1;
    }
    Map<String,Source> sources_to_link_to=new HashMap<String,Source>();
    rewriteOptions(args,"String_Node_Str","String_Node_Str");
    findFiles(args,"String_Node_Str",Util.set("String_Node_Str"),sources_to_link_to,modules,current_module,true);
    Map<String,Source> classes_to_link_to=new HashMap<String,Source>();
    Map<String,Source> modules_to_link_to=new HashMap<String,Source>();
    javac_state.now().collectPackagesSourcesAndArtifacts(modules);
    javac_state.now().checkInternalState("String_Node_Str",false,sources);
    javac_state.now().checkInternalState("String_Node_Str",true,sources_to_link_to);
    javac_state.setVisibleSources(sources_to_link_to);
    javac_state.checkSourceStatus(false);
    javac_state.findAllArtifacts();
    if (!findBooleanOption(args,"String_Node_Str")) {
      javac_state.removeUnidentifiedArtifacts();
    }
    javac_state.taintPackagesThatMissArtifacts();
    javac_state.deleteClassArtifactsInTaintedPackages();
    javac_state.performCopying(bin_dir,suffix_rules);
    javac_state.performTranslation(gensrc_dir,suffix_rules);
    Map<String,Source> generated_sources=new HashMap<String,Source>();
    Source.scanRoot(gensrc_dir,Util.set("String_Node_Str"),null,null,null,null,generated_sources,modules,current_module,false,true,false);
    javac_state.now().collectPackagesSourcesAndArtifacts(modules);
    javac_state.checkSourceStatus(true);
    javac_state.compareWithMakefileList(makefile_source_list);
    boolean again;
    Set<String> recently_compiled=new HashSet<String>();
    boolean[] rc=new boolean[1];
    do {
      javac_state.deleteClassArtifactsInTaintedPackages();
      again=javac_state.performJavaCompilations(bin_dir,server_settings,args,recently_compiled,rc);
      if (!rc[0])       break;
    }
 while (again);
    if (rc[0]) {
      javac_state.save();
      javac_state.now().collectArtifacts(modules);
      javac_state.removeSuperfluousArtifacts(recently_compiled);
    }
    return rc[0] ? 0 : -1;
  }
 catch (  ProblemException e) {
    Log.error(e.getMessage());
    return -1;
  }
catch (  Exception e) {
    e.printStackTrace(err);
    return -1;
  }
}

Fixed version (ground truth):
public int go(String[] args,PrintStream out,PrintStream err){
  try {
    if (args.length == 0 || findJavaSourceFiles(args) || findAtFile(args) || null == Util.findServerSettings(args)) {
      printHelp();
      return 0;
    }
    Log.setLogLevel(findLogLevel(args),out,err);
    String server_settings=Util.findServerSettings(args);
    args=verifyImplicitOption(args);
    args=addSrcBeforeDirectories(args);
    checkSrcOption(args);
    bin_dir=findDirectoryOption(args,"String_Node_Str","String_Node_Str",true,false,true);
    gensrc_dir=findDirectoryOption(args,"String_Node_Str","String_Node_Str",false,false,true);
    header_dir=findDirectoryOption(args,"String_Node_Str","String_Node_Str",false,false,true);
    makefile_source_list=findFileOption(args,"String_Node_Str","String_Node_Str",false);
    javac_state=JavacState.load(args,bin_dir,gensrc_dir,header_dir,findBooleanOption(args,"String_Node_Str"),out,err);
    suffix_rules=javac_state.getJavaSuffixRule();
    findTranslateOptions(args,suffix_rules);
    if (suffix_rules.keySet().size() > 1 && gensrc_dir == null) {
      Log.error("String_Node_Str");
      return -1;
    }
    findCopyOptions(args,suffix_rules);
    Map<String,Module> modules=new HashMap<String,Module>();
    Module current_module=new Module("String_Node_Str","String_Node_Str");
    modules.put("String_Node_Str",current_module);
    Map<String,Source> sources=new HashMap<String,Source>();
    findFiles(args,"String_Node_Str",suffix_rules.keySet(),sources,modules,current_module,false);
    if (sources.isEmpty()) {
      Log.error("String_Node_Str");
      return -1;
    }
    Map<String,Source> sources_to_link_to=new HashMap<String,Source>();
    rewriteOptions(args,"String_Node_Str","String_Node_Str");
    findFiles(args,"String_Node_Str",Util.set("String_Node_Str"),sources_to_link_to,modules,current_module,true);
    javac_state.now().collectPackagesSourcesAndArtifacts(modules);
    javac_state.now().checkInternalState("String_Node_Str",false,sources);
    javac_state.now().checkInternalState("String_Node_Str",true,sources_to_link_to);
    javac_state.setVisibleSources(sources_to_link_to);
    javac_state.checkSourceStatus(false);
    javac_state.findAllArtifacts();
    if (!findBooleanOption(args,"String_Node_Str")) {
      javac_state.removeUnidentifiedArtifacts();
    }
    javac_state.taintPackagesThatMissArtifacts();
    javac_state.deleteClassArtifactsInTaintedPackages();
    javac_state.performCopying(bin_dir,suffix_rules);
    javac_state.performTranslation(gensrc_dir,suffix_rules);
    Map<String,Source> generated_sources=new HashMap<String,Source>();
    Source.scanRoot(gensrc_dir,Util.set("String_Node_Str"),null,null,null,null,generated_sources,modules,current_module,false,true,false);
    javac_state.now().collectPackagesSourcesAndArtifacts(modules);
    javac_state.checkSourceStatus(true);
    javac_state.compareWithMakefileList(makefile_source_list);
    boolean again;
    Set<String> recently_compiled=new HashSet<String>();
    boolean[] rc=new boolean[1];
    do {
      javac_state.deleteClassArtifactsInTaintedPackages();
      again=javac_state.performJavaCompilations(bin_dir,server_settings,args,recently_compiled,rc);
      if (!rc[0])       break;
    }
 while (again);
    if (rc[0]) {
      javac_state.save();
      javac_state.now().collectArtifacts(modules);
      javac_state.removeSuperfluousArtifacts(recently_compiled);
    }
    return rc[0] ? 0 : -1;
  }
 catch (  ProblemException e) {
    Log.error(e.getMessage());
    return -1;
  }
catch (  Exception e) {
    e.printStackTrace(err);
    return -1;
  }
}