Program: 82457
Project: 82457
Buggy source:
/** 
 * NOTE: This method will not preserve the correct field types.
 * @param preTag
 * @param postTag
 */
public static Document highlight(int docId,Document document,Query query,BlurAnalyzer analyzer,IndexReader reader,String preTag,String postTag) throws IOException, InvalidTokenOffsetsException {
  Query fixedQuery=fixSuperQuery(query,null);
  SimpleHTMLFormatter htmlFormatter=new SimpleHTMLFormatter(preTag,postTag);
  Document result=new Document();
  for (  IndexableField f : document) {
    String name=f.name();
    if (FIELDS_NOT_TO_HIGHLIGHT.contains(name)) {
      result.add(f);
      continue;
    }
    String text=f.stringValue();
    Number numericValue=f.numericValue();
    Query fieldFixedQuery;
    if (analyzer.isFullTextField(text)) {
      fieldFixedQuery=fixSuperQuery(query,name);
    }
 else {
      fieldFixedQuery=fixedQuery;
    }
    if (numericValue != null) {
      if (shouldNumberBeHighlighted(name,numericValue,fieldFixedQuery)) {
        String numberHighlight=preTag + text + postTag;
        result.add(new StringField(name,numberHighlight,Store.YES));
      }
    }
 else {
      Highlighter highlighter=new Highlighter(htmlFormatter,new QueryScorer(fieldFixedQuery,name));
      TokenStream tokenStream=TokenSources.getAnyTokenStream(reader,docId,name,analyzer);
      TextFragment[] frag=highlighter.getBestTextFragments(tokenStream,text,false,10);
      for (int j=0; j < frag.length; j++) {
        if ((frag[j] != null) && (frag[j].getScore() > 0)) {
          result.add(new StringField(name,frag[j].toString(),Store.YES));
        }
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * NOTE: This method will not preserve the correct field types.
 * @param preTag
 * @param postTag
 */
public static Document highlight(int docId,Document document,Query query,BlurAnalyzer analyzer,IndexReader reader,String preTag,String postTag) throws IOException, InvalidTokenOffsetsException {
  Query fixedQuery=fixSuperQuery(query,null);
  SimpleHTMLFormatter htmlFormatter=new SimpleHTMLFormatter(preTag,postTag);
  Document result=new Document();
  for (  IndexableField f : document) {
    String name=f.name();
    if (FIELDS_NOT_TO_HIGHLIGHT.contains(name)) {
      result.add(f);
      continue;
    }
    String text=f.stringValue();
    Number numericValue=f.numericValue();
    Query fieldFixedQuery;
    if (analyzer.isFullTextField(name)) {
      fieldFixedQuery=fixSuperQuery(query,name);
    }
 else {
      fieldFixedQuery=fixedQuery;
    }
    if (numericValue != null) {
      if (shouldNumberBeHighlighted(name,numericValue,fieldFixedQuery)) {
        String numberHighlight=preTag + text + postTag;
        result.add(new StringField(name,numberHighlight,Store.YES));
      }
    }
 else {
      Highlighter highlighter=new Highlighter(htmlFormatter,new QueryScorer(fieldFixedQuery,name));
      TokenStream tokenStream=TokenSources.getAnyTokenStream(reader,docId,name,analyzer);
      TextFragment[] frag=highlighter.getBestTextFragments(tokenStream,text,false,10);
      for (int j=0; j < frag.length; j++) {
        if ((frag[j] != null) && (frag[j].getScore() > 0)) {
          result.add(new StringField(name,frag[j].toString(),Store.YES));
        }
      }
    }
  }
  return result;
}