Program: 153211
Project: 153211
Buggy source:
private static void runSearch(SearchCommand searchCommand){
  LOGGER.info("String_Node_Str");
  String indexDirectory=searchCommand.getIndexDir(commandLine);
  String queryLine=searchCommand.getQuery(commandLine);
  List<String> cliFields=searchCommand.getFields(commandLine);
  System.out.println("String_Node_Str" + queryLine + "String_Node_Str");
  for (int i=0; i < cliFields.size(); i++) {
    System.out.print("String_Node_Str" + i + "String_Node_Str"+ cliFields.get(i)+ "String_Node_Str");
  }
  List<String> cliDFields=new ArrayList<String>();
  for (  String fieldName : cliFields) {
    if (fieldName.equals(FieldNames.FILENAME)) {
      cliDFields.add(FieldNames.DFILENAME);
    }
    if (fieldName.equals(FieldNames.PATH)) {
      cliDFields.add(FieldNames.DPATH);
    }
  }
  System.out.println("String_Node_Str");
  SearchRepository searchRepository=new SearchRepository(indexDirectory);
  TopDocs result=searchRepository.getQueryResult(queryLine);
  if (result == null) {
    System.out.println("String_Node_Str");
    return;
  }
  System.out.println("String_Node_Str" + result.totalHits);
  try {
    for (int i=0; i < result.scoreDocs.length; i++) {
      Document hit;
      hit=searchRepository.getSearcher().doc(result.scoreDocs[i].doc);
      List<Field> fieldList=hit.getFields();
      System.out.print((i + 1) + "String_Node_Str");
      for (int k=0; k < fieldList.size(); k++) {
        Field field=(Field)fieldList.get(k);
        if ((cliDFields.size() > 0) && cliDFields.contains(field.name())) {
          System.out.print(field.name() + "String_Node_Str" + field.stringValue()+ "String_Node_Str");
        }
 else {
          if (FieldNames.DPATH.equals(field.name())) {
            System.out.print("String_Node_Str" + field.stringValue() + "String_Node_Str");
          }
          if (FieldNames.DFILENAME.equals(field.name())) {
            System.out.print("String_Node_Str" + field.stringValue() + "String_Node_Str");
          }
          if (FieldNames.REVISION.equals(field.name())) {
            long rev=Long.parseLong(field.stringValue());
            System.out.print("String_Node_Str" + rev + "String_Node_Str");
          }
          if (FieldNames.KIND.equals(field.name())) {
            System.out.print("String_Node_Str" + field.stringValue() + "String_Node_Str");
          }
        }
      }
      System.out.println("String_Node_Str");
    }
  }
 catch (  CorruptIndexException e) {
    LOGGER.error("String_Node_Str" + e.getLocalizedMessage());
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str" + e.getLocalizedMessage());
  }
 finally {
    IndexReader reader=searchRepository.getReader();
    try {
      reader.close();
    }
 catch (    IOException e) {
      LOGGER.error("String_Node_Str" + e.getLocalizedMessage());
    }
  }
}

Fixed version (ground truth):
private static void runSearch(SearchCommand searchCommand){
  LOGGER.info("String_Node_Str");
  String indexDirectory=searchCommand.getIndexDir(commandLine);
  String queryLine=searchCommand.getQuery(commandLine);
  List<String> cliFields=searchCommand.getFields(commandLine);
  System.out.println("String_Node_Str" + queryLine + "String_Node_Str");
  for (int i=0; i < cliFields.size(); i++) {
    System.out.print("String_Node_Str" + i + "String_Node_Str"+ cliFields.get(i)+ "String_Node_Str");
  }
  List<String> cliDFields=new ArrayList<String>();
  for (  String fieldName : cliFields) {
    if (fieldName.equals(FieldNames.FILENAME)) {
      cliDFields.add(FieldNames.DFILENAME);
    }
    if (fieldName.equals(FieldNames.PATH)) {
      cliDFields.add(FieldNames.DPATH);
    }
  }
  System.out.println("String_Node_Str");
  SearchRepository searchRepository=new SearchRepository(indexDirectory);
  TopDocs result=searchRepository.getQueryResult(queryLine);
  if (result == null) {
    System.out.println("String_Node_Str");
    return;
  }
  System.out.println("String_Node_Str" + result.totalHits);
  try {
    for (int i=0; i < result.scoreDocs.length; i++) {
      Document hit;
      hit=searchRepository.getSearcher().doc(result.scoreDocs[i].doc);
      List<Field> fieldList=hit.getFields();
      System.out.print((i + 1) + "String_Node_Str");
      for (int k=0; k < fieldList.size(); k++) {
        Field field=(Field)fieldList.get(k);
        if ((cliDFields.size() > 0) && cliDFields.contains(field.name())) {
          System.out.print(field.name() + "String_Node_Str" + field.stringValue()+ "String_Node_Str");
        }
 else {
          if (FieldNames.DPATH.equals(field.name())) {
            System.out.print("String_Node_Str" + field.stringValue() + "String_Node_Str");
          }
          if (FieldNames.DFILENAME.equals(field.name())) {
            System.out.print("String_Node_Str" + field.stringValue() + "String_Node_Str");
          }
          if (FieldNames.REVISION.equals(field.name())) {
            long rev=Long.parseLong(field.stringValue());
            System.out.print("String_Node_Str" + rev + "String_Node_Str");
          }
          if (FieldNames.KIND.equals(field.name())) {
            System.out.print("String_Node_Str" + field.stringValue() + "String_Node_Str");
          }
        }
      }
      System.out.println("String_Node_Str");
    }
  }
 catch (  CorruptIndexException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
 finally {
    IndexReader reader=searchRepository.getReader();
    try {
      reader.close();
    }
 catch (    IOException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}