Program: 33495
Project: 33495
Buggy source:
protected List<Row> getRows(final ExtendedFilter filter,final Search search){
  final SearchSupport searchSupport=this;
  SearcherCallback<List<Row>> sc=new SearcherCallback<List<Row>>(){
    @Override public List<Row> doWithSearcher(    org.apache.lucene.search.IndexSearcher searcher) throws Exception {
      Utils.SimpleTimer timer=Utils.getStartedTimer(logger);
      List<Row> results;
      if (search == null) {
        results=new ArrayList<>();
      }
 else {
        Utils.SimpleTimer timer2=Utils.getStartedTimer(SearchSupport.logger);
        int maxResults=filter.maxRows();
        int limit=searcher.getIndexReader().maxDoc();
        if (limit == 0) {
          limit=1;
        }
        maxResults=Math.min(maxResults,limit);
        Query query=search.query(options);
        org.apache.lucene.search.SortField[] sort=search.usesSorting() ? search.sort(options) : null;
        IndexEntryCollector collector=new IndexEntryCollector(sort,maxResults);
        searcher.search(query,collector);
        timer2.endLogTime("String_Node_Str" + collector.totalHits + "String_Node_Str");
        if (SearchSupport.logger.isDebugEnabled()) {
          SearchSupport.logger.debug(String.format("String_Node_Str",collector.totalHits));
        }
        ColumnFamilyStore.AbstractScanIterator iter=new RowScanner(searchSupport,baseCfs,filter,collector.docs().iterator());
        List<Row> inputToFunction=baseCfs.filter(iter,filter);
        Function function=search.function(options);
        return function.process(inputToFunction,customColumnFactory,baseCfs,currentIndex);
      }
      timer.endLogTime("String_Node_Str" + results.size() + "String_Node_Str");
      return results;
    }
  }
;
  return currentIndex.search(filter,sc);
}

Fixed version (ground truth):
protected List<Row> getRows(final ExtendedFilter filter,final Search search){
  final SearchSupport searchSupport=this;
  SearcherCallback<List<Row>> sc=new SearcherCallback<List<Row>>(){
    @Override public List<Row> doWithSearcher(    org.apache.lucene.search.IndexSearcher searcher) throws Exception {
      Utils.SimpleTimer timer=Utils.getStartedTimer(logger);
      List<Row> results;
      if (search == null) {
        results=new ArrayList<>();
      }
 else {
        Utils.SimpleTimer timer2=Utils.getStartedTimer(SearchSupport.logger);
        int resultsLimit=filter.currentLimit();
        int limit=searcher.getIndexReader().maxDoc();
        if (limit == 0) {
          limit=1;
        }
        resultsLimit=Math.min(resultsLimit,limit);
        Query query=search.query(options);
        org.apache.lucene.search.SortField[] sort=search.usesSorting() ? search.sort(options) : null;
        IndexEntryCollector collector=new IndexEntryCollector(sort,resultsLimit);
        searcher.search(query,collector);
        timer2.endLogTime("String_Node_Str" + collector.totalHits + "String_Node_Str");
        if (SearchSupport.logger.isDebugEnabled()) {
          SearchSupport.logger.debug(String.format("String_Node_Str",collector.totalHits));
        }
        ColumnFamilyStore.AbstractScanIterator iter=new RowScanner(searchSupport,baseCfs,filter,collector.docs().iterator());
        List<Row> inputToFunction=baseCfs.filter(iter,filter);
        Function function=search.function(options);
        return function.process(inputToFunction,customColumnFactory,baseCfs,currentIndex);
      }
      timer.endLogTime("String_Node_Str" + results.size() + "String_Node_Str");
      return results;
    }
  }
;
  return currentIndex.search(filter,sc);
}