Program: 189053
Project: 189053
Buggy source:
/** 
 * Interface for mock-testing
 * @param args
 * @return
 */
public static SGID runMain(String[] args){
  Options options=new Options();
  Option option1=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").isRequired().hasArgs(1).create(WORKER_CHAR_PARAM);
  options.addOption(option1);
  Option option2=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs(1).create(NUMBER_THREADS_PARAM);
  options.addOption(option2);
  Option option3=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").create(COMPRESSED_PARAM);
  options.addOption(option3);
  Option option4=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").isRequired().hasArgs(1).create(REFERENCE_ID_PARAM);
  options.addOption(option4);
  Option option5=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs().withValueSeparator(VALUE_SEPARATOR_PARAM).isRequired().create(INPUT_FILES_PARAM);
  options.addOption(option5);
  Option option6=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs(1).create(OUTPUT_FILE_PARAM);
  options.addOption(option6);
  Option option7=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").withValueSeparator(VALUE_SEPARATOR_PARAM).hasArgs().create(TAGSETS_PARAM);
  options.addOption(option7);
  Option option8=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs().create(ADHOC_TAGSETS_PARAM);
  options.addOption(option8);
  Option option9=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str" + BATCH_SIZE + "String_Node_Str").hasArgs(1).create(BATCH_SIZE_PARAM);
  options.addOption(option9);
  try {
    CommandLineParser parser=new PosixParser();
    CommandLine cmd=parser.parse(options,args);
    String worker=cmd.getOptionValue(WORKER_CHAR_PARAM);
    int threads=Integer.valueOf(cmd.getOptionValue(NUMBER_THREADS_PARAM,"String_Node_Str"));
    boolean compressed=Boolean.valueOf(cmd.getOptionValue(COMPRESSED_PARAM,"String_Node_Str"));
    SGID referenceSGID=Utility.parseSGID(cmd.getOptionValue(REFERENCE_ID_PARAM));
    int batch_size=Integer.valueOf(cmd.getOptionValue(BATCH_SIZE_PARAM,String.valueOf(BATCH_SIZE)));
    List<String> inputFiles=new ArrayList<String>();
    inputFiles.addAll(Arrays.asList(cmd.getOptionValues(INPUT_FILES_PARAM)));
    File outputFile=null;
    if (cmd.hasOption(OUTPUT_FILE_PARAM)) {
      String outputFilename=cmd.getOptionValue(OUTPUT_FILE_PARAM);
      outputFile=Utility.checkOutput(outputFilename);
    }
    List<SGID> tagSetSGIDs=new ArrayList<SGID>();
    if (cmd.hasOption(TAGSETS_PARAM)) {
      List<String> tagSetIDs=new ArrayList<String>();
      tagSetIDs.addAll(Arrays.asList(cmd.getOptionValues(TAGSETS_PARAM)));
      for (      String ID : tagSetIDs) {
        tagSetSGIDs.add(Utility.parseSGID(ID));
      }
    }
    SGID adhocSGID=cmd.hasOption(ADHOC_TAGSETS_PARAM) ? Utility.parseSGID(cmd.getOptionValue(ADHOC_TAGSETS_PARAM)) : null;
    SGID mainMethod=FeatureImporter.performImport(referenceSGID,threads,inputFiles,worker,compressed,outputFile,tagSetSGIDs,adhocSGID,batch_size);
    if (mainMethod == null) {
      return null;
    }
    return mainMethod;
  }
 catch (  IOException ex) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(SOFeatureImporter.class.getSimpleName(),options);
    Logger.getLogger(SOFeatureImporter.class.getName()).log(Level.SEVERE,null,ex);
    System.exit(FeatureImporter.EXIT_CODE_INVALID_ARGS);
  }
catch (  MissingOptionException e) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(SOFeatureImporter.class.getSimpleName(),options);
    System.exit(FeatureImporter.EXIT_CODE_INVALID_ARGS);
  }
catch (  ParseException e) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(SOFeatureImporter.class.getSimpleName(),options);
    System.exit(FeatureImporter.EXIT_CODE_INVALID_ARGS);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Interface for mock-testing
 * @param args
 * @return
 */
public static SGID runMain(String[] args){
  Options options=new Options();
  Option option1=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").isRequired().hasArgs(1).create(WORKER_CHAR_PARAM);
  options.addOption(option1);
  Option option2=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs(1).create(NUMBER_THREADS_PARAM);
  options.addOption(option2);
  Option option3=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").create(COMPRESSED_PARAM);
  options.addOption(option3);
  Option option4=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").isRequired().hasArgs(1).create(REFERENCE_ID_PARAM);
  options.addOption(option4);
  Option option5=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs().withValueSeparator(VALUE_SEPARATOR_PARAM).isRequired().create(INPUT_FILES_PARAM);
  options.addOption(option5);
  Option option6=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs(1).create(OUTPUT_FILE_PARAM);
  options.addOption(option6);
  Option option7=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").withValueSeparator(VALUE_SEPARATOR_PARAM).hasArgs().create(TAGSETS_PARAM);
  options.addOption(option7);
  Option option8=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str").hasArgs().create(ADHOC_TAGSETS_PARAM);
  options.addOption(option8);
  Option option9=OptionBuilder.withArgName("String_Node_Str").withDescription("String_Node_Str" + BATCH_SIZE + "String_Node_Str").hasArgs(1).create(BATCH_SIZE_PARAM);
  options.addOption(option9);
  try {
    CommandLineParser parser=new PosixParser();
    CommandLine cmd=parser.parse(options,args);
    String worker=cmd.getOptionValue(WORKER_CHAR_PARAM);
    int threads=Integer.valueOf(cmd.getOptionValue(NUMBER_THREADS_PARAM,"String_Node_Str"));
    boolean compressed=Boolean.valueOf(cmd.hasOption(COMPRESSED_PARAM));
    SGID referenceSGID=Utility.parseSGID(cmd.getOptionValue(REFERENCE_ID_PARAM));
    int batch_size=Integer.valueOf(cmd.getOptionValue(BATCH_SIZE_PARAM,String.valueOf(BATCH_SIZE)));
    List<String> inputFiles=new ArrayList<String>();
    inputFiles.addAll(Arrays.asList(cmd.getOptionValues(INPUT_FILES_PARAM)));
    File outputFile=null;
    if (cmd.hasOption(OUTPUT_FILE_PARAM)) {
      String outputFilename=cmd.getOptionValue(OUTPUT_FILE_PARAM);
      outputFile=Utility.checkOutput(outputFilename);
    }
    List<SGID> tagSetSGIDs=new ArrayList<SGID>();
    if (cmd.hasOption(TAGSETS_PARAM)) {
      List<String> tagSetIDs=new ArrayList<String>();
      tagSetIDs.addAll(Arrays.asList(cmd.getOptionValues(TAGSETS_PARAM)));
      for (      String ID : tagSetIDs) {
        tagSetSGIDs.add(Utility.parseSGID(ID));
      }
    }
    SGID adhocSGID=cmd.hasOption(ADHOC_TAGSETS_PARAM) ? Utility.parseSGID(cmd.getOptionValue(ADHOC_TAGSETS_PARAM)) : null;
    SGID mainMethod=FeatureImporter.performImport(referenceSGID,threads,inputFiles,worker,compressed,outputFile,tagSetSGIDs,adhocSGID,batch_size);
    if (mainMethod == null) {
      return null;
    }
    return mainMethod;
  }
 catch (  IOException ex) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(SOFeatureImporter.class.getSimpleName(),options);
    Logger.getLogger(SOFeatureImporter.class.getName()).log(Level.SEVERE,null,ex);
    System.exit(FeatureImporter.EXIT_CODE_INVALID_ARGS);
  }
catch (  MissingOptionException e) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(SOFeatureImporter.class.getSimpleName(),options);
    System.exit(FeatureImporter.EXIT_CODE_INVALID_ARGS);
  }
catch (  ParseException e) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(SOFeatureImporter.class.getSimpleName(),options);
    System.exit(FeatureImporter.EXIT_CODE_INVALID_ARGS);
  }
  return null;
}