Program: 61261
Project: 61261
Buggy source:
public static void main(String[] args) throws IOException {
  DefaultOptionBuilder obuilder=new DefaultOptionBuilder();
  ArgumentBuilder abuilder=new ArgumentBuilder();
  GroupBuilder gbuilder=new GroupBuilder();
  Option inputOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option outputOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option fieldOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option idFieldOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option dictOutOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option weightOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option delimiterOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option powerOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option maxOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option outWriterOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option minDFOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option maxDFPercentOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option helpOpt=obuilder.withLongName("String_Node_Str").withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Group group=gbuilder.withName("String_Node_Str").withOption(inputOpt).withOption(idFieldOpt).withOption(outputOpt).withOption(delimiterOpt).withOption(helpOpt).withOption(fieldOpt).withOption(maxOpt).withOption(dictOutOpt).withOption(powerOpt).withOption(outWriterOpt).withOption(maxDFPercentOpt).withOption(weightOpt).withOption(minDFOpt).create();
  try {
    Parser parser=new Parser();
    parser.setGroup(group);
    CommandLine cmdLine=parser.parse(args);
    if (cmdLine.hasOption(helpOpt)) {
      CommandLineUtil.printHelp(group);
      return;
    }
    if (cmdLine.hasOption(inputOpt)) {
      File file=new File(cmdLine.getValue(inputOpt).toString());
      if (!file.isDirectory()) {
        throw new IllegalArgumentException("String_Node_Str" + file.getName() + "String_Node_Str");
      }
      long maxDocs=Long.MAX_VALUE;
      if (cmdLine.hasOption(maxOpt)) {
        maxDocs=Long.parseLong(cmdLine.getValue(maxOpt).toString());
      }
      if (maxDocs < 0) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      Directory dir=FSDirectory.open(file);
      IndexReader reader=IndexReader.open(dir,true);
      Weight weight;
      if (cmdLine.hasOption(weightOpt)) {
        String wString=cmdLine.getValue(weightOpt).toString();
        if (wString.equalsIgnoreCase("String_Node_Str")) {
          weight=new TF();
        }
 else         if (wString.equalsIgnoreCase("String_Node_Str")) {
          weight=new TFIDF();
        }
 else {
          throw new OptionException(weightOpt);
        }
      }
 else {
        weight=new TFIDF();
      }
      String field=cmdLine.getValue(fieldOpt).toString();
      int minDf=1;
      if (cmdLine.hasOption(minDFOpt)) {
        minDf=Integer.parseInt(cmdLine.getValue(minDFOpt).toString());
      }
      int maxDFPercent=99;
      if (cmdLine.hasOption(maxDFPercentOpt)) {
        maxDFPercent=Integer.parseInt(cmdLine.getValue(maxDFPercentOpt).toString());
      }
      TermInfo termInfo=new CachedTermInfo(reader,field,minDf,maxDFPercent);
      VectorMapper mapper=new TFDFMapper(reader,weight,termInfo);
      double norm=LuceneIterable.NO_NORMALIZING;
      if (cmdLine.hasOption(powerOpt)) {
        String power=cmdLine.getValue(powerOpt).toString();
        if (power.equals("String_Node_Str")) {
          norm=Double.POSITIVE_INFINITY;
        }
 else {
          norm=Double.parseDouble(power);
        }
      }
      String idField=null;
      if (cmdLine.hasOption(idFieldOpt)) {
        idField=cmdLine.getValue(idFieldOpt).toString();
      }
      LuceneIterable iterable;
      if (norm == LuceneIterable.NO_NORMALIZING) {
        iterable=new LuceneIterable(reader,idField,field,mapper,LuceneIterable.NO_NORMALIZING);
      }
 else {
        iterable=new LuceneIterable(reader,idField,field,mapper,norm);
      }
      String outFile=cmdLine.getValue(outputOpt).toString();
      log.info("String_Node_Str",outFile);
      VectorWriter vectorWriter;
      if (cmdLine.hasOption(outWriterOpt)) {
        String outWriter=cmdLine.getValue(outWriterOpt).toString();
        if (outWriter.equals("String_Node_Str")) {
          BufferedWriter writer=new BufferedWriter(new FileWriter(outFile));
          vectorWriter=new JWriterVectorWriter(writer);
        }
 else {
          vectorWriter=getSeqFileWriter(outFile);
        }
      }
 else {
        vectorWriter=getSeqFileWriter(outFile);
      }
      long numDocs=vectorWriter.write(iterable,maxDocs);
      vectorWriter.close();
      log.info("String_Node_Str",numDocs);
      String delimiter=cmdLine.hasOption(delimiterOpt) ? cmdLine.getValue(delimiterOpt).toString() : "String_Node_Str";
      File dictOutFile=new File(cmdLine.getValue(dictOutOpt).toString());
      log.info("String_Node_Str",dictOutFile);
      BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dictOutFile),Charset.forName("String_Node_Str")));
      JWriterTermInfoWriter tiWriter=new JWriterTermInfoWriter(writer,delimiter,field);
      tiWriter.write(termInfo);
      tiWriter.close();
      writer.close();
    }
  }
 catch (  OptionException e) {
    log.error("String_Node_Str",e);
    CommandLineUtil.printHelp(group);
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException {
  DefaultOptionBuilder obuilder=new DefaultOptionBuilder();
  ArgumentBuilder abuilder=new ArgumentBuilder();
  GroupBuilder gbuilder=new GroupBuilder();
  Option inputOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option outputOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option fieldOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option idFieldOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option dictOutOpt=obuilder.withLongName("String_Node_Str").withRequired(true).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option weightOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option delimiterOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option powerOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option maxOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option outWriterOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option minDFOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Option maxDFPercentOpt=obuilder.withLongName("String_Node_Str").withRequired(false).withArgument(abuilder.withName("String_Node_Str").withMinimum(1).withMaximum(1).create()).withDescription("String_Node_Str" + "String_Node_Str").withShortName("String_Node_Str").create();
  Option helpOpt=obuilder.withLongName("String_Node_Str").withDescription("String_Node_Str").withShortName("String_Node_Str").create();
  Group group=gbuilder.withName("String_Node_Str").withOption(inputOpt).withOption(idFieldOpt).withOption(outputOpt).withOption(delimiterOpt).withOption(helpOpt).withOption(fieldOpt).withOption(maxOpt).withOption(dictOutOpt).withOption(powerOpt).withOption(outWriterOpt).withOption(maxDFPercentOpt).withOption(weightOpt).withOption(minDFOpt).create();
  try {
    Parser parser=new Parser();
    parser.setGroup(group);
    CommandLine cmdLine=parser.parse(args);
    if (cmdLine.hasOption(helpOpt)) {
      CommandLineUtil.printHelp(group);
      return;
    }
    if (cmdLine.hasOption(inputOpt)) {
      File file=new File(cmdLine.getValue(inputOpt).toString());
      if (!file.isDirectory()) {
        throw new IllegalArgumentException("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str");
      }
      long maxDocs=Long.MAX_VALUE;
      if (cmdLine.hasOption(maxOpt)) {
        maxDocs=Long.parseLong(cmdLine.getValue(maxOpt).toString());
      }
      if (maxDocs < 0) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      Directory dir=FSDirectory.open(file);
      IndexReader reader=IndexReader.open(dir,true);
      Weight weight;
      if (cmdLine.hasOption(weightOpt)) {
        String wString=cmdLine.getValue(weightOpt).toString();
        if (wString.equalsIgnoreCase("String_Node_Str")) {
          weight=new TF();
        }
 else         if (wString.equalsIgnoreCase("String_Node_Str")) {
          weight=new TFIDF();
        }
 else {
          throw new OptionException(weightOpt);
        }
      }
 else {
        weight=new TFIDF();
      }
      String field=cmdLine.getValue(fieldOpt).toString();
      int minDf=1;
      if (cmdLine.hasOption(minDFOpt)) {
        minDf=Integer.parseInt(cmdLine.getValue(minDFOpt).toString());
      }
      int maxDFPercent=99;
      if (cmdLine.hasOption(maxDFPercentOpt)) {
        maxDFPercent=Integer.parseInt(cmdLine.getValue(maxDFPercentOpt).toString());
      }
      TermInfo termInfo=new CachedTermInfo(reader,field,minDf,maxDFPercent);
      VectorMapper mapper=new TFDFMapper(reader,weight,termInfo);
      double norm=LuceneIterable.NO_NORMALIZING;
      if (cmdLine.hasOption(powerOpt)) {
        String power=cmdLine.getValue(powerOpt).toString();
        if (power.equals("String_Node_Str")) {
          norm=Double.POSITIVE_INFINITY;
        }
 else {
          norm=Double.parseDouble(power);
        }
      }
      String idField=null;
      if (cmdLine.hasOption(idFieldOpt)) {
        idField=cmdLine.getValue(idFieldOpt).toString();
      }
      LuceneIterable iterable;
      if (norm == LuceneIterable.NO_NORMALIZING) {
        iterable=new LuceneIterable(reader,idField,field,mapper,LuceneIterable.NO_NORMALIZING);
      }
 else {
        iterable=new LuceneIterable(reader,idField,field,mapper,norm);
      }
      String outFile=cmdLine.getValue(outputOpt).toString();
      log.info("String_Node_Str",outFile);
      VectorWriter vectorWriter;
      if (cmdLine.hasOption(outWriterOpt)) {
        String outWriter=cmdLine.getValue(outWriterOpt).toString();
        if (outWriter.equals("String_Node_Str")) {
          BufferedWriter writer=new BufferedWriter(new FileWriter(outFile));
          vectorWriter=new JWriterVectorWriter(writer);
        }
 else {
          vectorWriter=getSeqFileWriter(outFile);
        }
      }
 else {
        vectorWriter=getSeqFileWriter(outFile);
      }
      long numDocs=vectorWriter.write(iterable,maxDocs);
      vectorWriter.close();
      log.info("String_Node_Str",numDocs);
      String delimiter=cmdLine.hasOption(delimiterOpt) ? cmdLine.getValue(delimiterOpt).toString() : "String_Node_Str";
      File dictOutFile=new File(cmdLine.getValue(dictOutOpt).toString());
      log.info("String_Node_Str",dictOutFile);
      BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dictOutFile),Charset.forName("String_Node_Str")));
      JWriterTermInfoWriter tiWriter=new JWriterTermInfoWriter(writer,delimiter,field);
      tiWriter.write(termInfo);
      tiWriter.close();
      writer.close();
    }
  }
 catch (  OptionException e) {
    log.error("String_Node_Str",e);
    CommandLineUtil.printHelp(group);
  }
}