Program: 177737
Project: 177737
Buggy source:
@SuppressWarnings("String_Node_Str") public static void main(String[] args) throws Exception {
  Options options=new Options();
  options.addOption(new Option(HELP_OPTION,"String_Node_Str"));
  options.addOption(new Option(JSON_OPTION,"String_Node_Str"));
  options.addOption(new Option(TSV_OPTION,"String_Node_Str"));
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").create(COLLECTION_OPTION));
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").create(INDEX_OPTION));
  CommandLine cmdline=null;
  CommandLineParser parser=new GnuParser();
  try {
    cmdline=parser.parse(options,args);
  }
 catch (  ParseException exp) {
    System.err.println("String_Node_Str" + exp.getMessage());
    System.exit(-1);
  }
  if (cmdline.hasOption(HELP_OPTION) || !cmdline.hasOption(COLLECTION_OPTION) || !cmdline.hasOption(INDEX_OPTION)) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(IndexStatuses.class.getName(),options);
    System.exit(-1);
  }
  String collectionPath=cmdline.getOptionValue(COLLECTION_OPTION);
  String indexPath=cmdline.getOptionValue(INDEX_OPTION);
  long startTime=System.currentTimeMillis();
  StatusStream stream;
  File file=new File(collectionPath);
  if (!file.exists()) {
    System.err.println("String_Node_Str" + file + "String_Node_Str");
    System.exit(-1);
  }
  if (cmdline.hasOption(TSV_OPTION)) {
    stream=new TSVStatusCorpusReader(file);
  }
 else {
    stream=new JsonStatusCorpusReader(file);
  }
  Analyzer analyzer=new StandardAnalyzer(Version.LUCENE_41);
  Directory dir=FSDirectory.open(new File(indexPath));
  IndexWriterConfig config=new IndexWriterConfig(Version.LUCENE_41,analyzer);
  config.setOpenMode(OpenMode.CREATE);
  LOG.info("String_Node_Str" + collectionPath);
  LOG.info("String_Node_Str" + indexPath);
  IndexWriter writer=new IndexWriter(dir,config);
  int cnt=0;
  Status status;
  try {
    while ((status=stream.next()) != null) {
      if (status.getText() == null) {
        continue;
      }
      cnt++;
      Document doc=new Document();
      doc.add(new LongField(StatusField.ID.name,status.getId(),Field.Store.YES));
      doc.add(new LongField(StatusField.EPOCH.name,status.getEpoch(),Field.Store.YES));
      doc.add(new TextField(StatusField.SCREEN_NAME.name,status.getScreenname(),Store.YES));
      doc.add(new TextField(StatusField.CREATED_AT.name,status.getCreatedAt(),Store.YES));
      doc.add(new TextField(StatusField.TEXT.name,status.getText(),Store.YES));
      doc.add(new IntField(StatusField.RETWEET_COUNT.name,status.getRetweetCount(),Store.YES));
      long inReplyToStatusId=status.getInReplyToStatusId();
      if (inReplyToStatusId > 0) {
        doc.add(new LongField(StatusField.IN_REPLY_TO_STATUS_ID.name,inReplyToStatusId,Field.Store.YES));
        doc.add(new LongField(StatusField.IN_REPLY_TO_USER_ID.name,status.getInReplyToUserId(),Field.Store.YES));
      }
      String lang=status.getLang();
      if (!lang.equals("String_Node_Str")) {
        doc.add(new TextField(StatusField.LANG.name,status.getLang(),Store.YES));
      }
      double lattitude=status.getLattitude();
      if (!Double.isInfinite(lattitude)) {
        doc.add(new DoubleField(StatusField.LATTITUDE.name,lattitude,Field.Store.YES));
        doc.add(new DoubleField(StatusField.LONGITUDE.name,status.getLongitude(),Field.Store.YES));
      }
      long retweetStatusId=status.getRetweetedStatusId();
      if (retweetStatusId > 0) {
        doc.add(new LongField(StatusField.RETWEETED_STATUS_ID.name,retweetStatusId,Field.Store.YES));
        doc.add(new LongField(StatusField.RETWEETED_USER_ID.name,status.getRetweetedUserId(),Field.Store.YES));
      }
      doc.add(new IntField(StatusField.FRIENDS_COUNT.name,status.getFollowersCount(),Store.YES));
      doc.add(new IntField(StatusField.FOLLOWERS_COUNT.name,status.getFriendsCount(),Store.YES));
      doc.add(new IntField(StatusField.STATUSES_COUNT.name,status.getStatusesCount(),Store.YES));
      writer.addDocument(doc);
      if (cnt % 100000 == 0) {
        LOG.info(cnt + "String_Node_Str");
      }
    }
    LOG.info(String.format("String_Node_Str",cnt));
    LOG.info("String_Node_Str");
    writer.forceMerge(1);
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    writer.close();
    dir.close();
    stream.close();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void main(String[] args) throws Exception {
  Options options=new Options();
  options.addOption(new Option(HELP_OPTION,"String_Node_Str"));
  options.addOption(new Option(JSON_OPTION,"String_Node_Str"));
  options.addOption(new Option(TSV_OPTION,"String_Node_Str"));
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").create(COLLECTION_OPTION));
  options.addOption(OptionBuilder.withArgName("String_Node_Str").hasArg().withDescription("String_Node_Str").create(INDEX_OPTION));
  CommandLine cmdline=null;
  CommandLineParser parser=new GnuParser();
  try {
    cmdline=parser.parse(options,args);
  }
 catch (  ParseException exp) {
    System.err.println("String_Node_Str" + exp.getMessage());
    System.exit(-1);
  }
  if (cmdline.hasOption(HELP_OPTION) || !cmdline.hasOption(COLLECTION_OPTION) || !cmdline.hasOption(INDEX_OPTION)) {
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp(IndexStatuses.class.getName(),options);
    System.exit(-1);
  }
  String collectionPath=cmdline.getOptionValue(COLLECTION_OPTION);
  String indexPath=cmdline.getOptionValue(INDEX_OPTION);
  long startTime=System.currentTimeMillis();
  StatusStream stream;
  File file=new File(collectionPath);
  if (!file.exists()) {
    System.err.println("String_Node_Str" + file + "String_Node_Str");
    System.exit(-1);
  }
  if (cmdline.hasOption(TSV_OPTION)) {
    stream=new TSVStatusCorpusReader(file);
  }
 else {
    stream=new JsonStatusCorpusReader(file);
  }
  Analyzer analyzer=new StandardAnalyzer(Version.LUCENE_41);
  Directory dir=FSDirectory.open(new File(indexPath));
  IndexWriterConfig config=new IndexWriterConfig(Version.LUCENE_41,analyzer);
  config.setOpenMode(OpenMode.CREATE);
  LOG.info("String_Node_Str" + collectionPath);
  LOG.info("String_Node_Str" + indexPath);
  IndexWriter writer=new IndexWriter(dir,config);
  int cnt=0;
  Status status;
  try {
    while ((status=stream.next()) != null) {
      if (status.getText() == null) {
        continue;
      }
      cnt++;
      Document doc=new Document();
      doc.add(new LongField(StatusField.ID.name,status.getId(),Field.Store.YES));
      doc.add(new LongField(StatusField.EPOCH.name,status.getEpoch(),Field.Store.YES));
      doc.add(new TextField(StatusField.SCREEN_NAME.name,status.getScreenname(),Store.YES));
      doc.add(new TextField(StatusField.CREATED_AT.name,status.getCreatedAt(),Store.YES));
      doc.add(new TextField(StatusField.TEXT.name,status.getText(),Store.YES));
      doc.add(new IntField(StatusField.RETWEET_COUNT.name,status.getRetweetCount(),Store.YES));
      long inReplyToStatusId=status.getInReplyToStatusId();
      if (inReplyToStatusId > 0) {
        doc.add(new LongField(StatusField.IN_REPLY_TO_STATUS_ID.name,inReplyToStatusId,Field.Store.YES));
        doc.add(new LongField(StatusField.IN_REPLY_TO_USER_ID.name,status.getInReplyToUserId(),Field.Store.YES));
      }
      String lang=status.getLang();
      if (!lang.equals("String_Node_Str")) {
        doc.add(new TextField(StatusField.LANG.name,status.getLang(),Store.YES));
      }
      double latitude=status.getlatitude();
      if (!Double.isInfinite(latitude)) {
        doc.add(new DoubleField(StatusField.latitude.name,latitude,Field.Store.YES));
        doc.add(new DoubleField(StatusField.LONGITUDE.name,status.getLongitude(),Field.Store.YES));
      }
      doc.add(new IntField(StatusField.FRIENDS_COUNT.name,status.getFollowersCount(),Store.YES));
      doc.add(new IntField(StatusField.FOLLOWERS_COUNT.name,status.getFriendsCount(),Store.YES));
      doc.add(new IntField(StatusField.STATUSES_COUNT.name,status.getStatusesCount(),Store.YES));
      writer.addDocument(doc);
      if (cnt % 100000 == 0) {
        LOG.info(cnt + "String_Node_Str");
      }
    }
    LOG.info(String.format("String_Node_Str",cnt));
    LOG.info("String_Node_Str");
    writer.forceMerge(1);
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    writer.close();
    dir.close();
    stream.close();
  }
}