Buggy code:
public class TestPerfTasksLogic extends BenchmarkTestCase { @ Override public void setUp ( ) throws Exception { } public void testIndexAndSearchTasks ( ) throws Exception { } public void testTimedSearchTask ( ) throws Exception { } public void testBGSearchTaskThreads ( ) throws Exception { } public void testHighlighting ( ) throws Exception { } public void testHighlightingTV ( ) throws Exception { } public void testHighlightingNoTvNoStore ( ) throws Exception { } public void testExhaustContentSource ( ) throws Exception { } public void testDocMakerThreadSafety ( ) throws Exception { } public void testParallelDocMaker ( ) throws Exception { } public void testLineDocFile ( ) throws Exception { } public void testReadTokens ( ) throws Exception { } public void testParallelExhausted ( ) throws Exception { } public void testExhaustedLooped ( ) throws Exception { } public void testCloseIndexFalse ( ) throws Exception { } public static class MyMergeScheduler extends SerialMergeScheduler { boolean called ; public MyMergeScheduler ( ) { } } public void testMergeScheduler ( ) throws Exception { } public static class MyMergePolicy extends LogDocMergePolicy { boolean called ; public MyMergePolicy ( ) { } } public void testMergePolicy ( ) throws Exception { } public void testIndexWriterSettings ( ) throws Exception { String [ ] algLines = new String [ ] { "#<seq2seq4repair_space>-----<seq2seq4repair_space>properties<seq2seq4repair_space>" , "content.source=org.apache.lucene.benchmark.byTask.feeds.LineDocSource" , "docs.file=" + ( getReuters20LinesFile ( ) ) , "content.source.log.step=3" , "ram.flush.mb=-1" , "max.buffered=2" , "compound=cmpnd:true:false" , "doc.term.vector=vector:false:true" , "content.source.forever=false" , "directory=RAMDirectory" , "doc.stored=false" , "merge.factor=3" , "doc.tokenized=false" , "debug.level=1" , "#<seq2seq4repair_space>-----<seq2seq4repair_space>alg<seq2seq4repair_space>" , "{<seq2seq4repair_space>\"Rounds\"" , "<seq2seq4repair_space>ResetSystemErase" , "<seq2seq4repair_space>CreateIndex" , "<seq2seq4repair_space>{<seq2seq4repair_space>\"AddDocs\"<seq2seq4repair_space>AddDoc<seq2seq4repair_space>><seq2seq4repair_space>:<seq2seq4repair_space>*<seq2seq4repair_space>" , "<seq2seq4repair_space>NewRound" , "}<seq2seq4repair_space>:<seq2seq4repair_space>2" } ; Benchmark benchmark = execBenchmark ( algLines ) ; final IndexWriter writer = benchmark . getRunData ( ) . getIndexWriter ( ) ; assertEquals ( 2 , writer . getConfig ( ) . getMaxBufferedDocs ( ) ) ; assertEquals ( DISABLE_AUTO_FLUSH , ( ( int ) ( writer . getConfig ( ) . getRAMBufferSizeMB ( ) ) ) ) ; assertEquals ( 3 , ( ( org . apache . lucene . index . LogMergePolicy ) ( writer . getConfig ( ) . getMergePolicy ( ) ) ) . getMergeFactor ( ) ) ; assertFalse ( ( ( org . apache . lucene . index . LogMergePolicy ) ( writer . getConfig ( ) . getMergePolicy ( ) ) ) . getUseCompoundFile ( ) ) ; writer . close ( ) ; Directory dir = benchmark . getRunData ( ) . getDirectory ( ) ; IndexReader reader = IndexReader . open ( dir ) ; Fields tfv = reader . getTermVectors ( 0 ) ; assertNotNull ( tfv ) ; <START_BUG> assertTrue ( ( ( tfv . getUniqueFieldCount ( ) ) > 0 ) ) ; <END_BUG> reader . close ( ) ; } public void testIndexingWithFacets ( ) throws Exception { } public void testForceMerge ( ) throws Exception { } public void testDisableCounting ( ) throws Exception { } private void doTestDisableCounting ( boolean disable ) throws Exception { } private String [ ] disableCountingLines ( boolean disable ) { } public void testLocale ( ) throws Exception { } private String [ ] getLocaleConfig ( String localeParam ) { } public void testCollator ( ) throws Exception { } private void assertEqualCollation ( Analyzer a1 , Analyzer a2 , String text ) throws Exception { } private String [ ] getCollatorConfig ( String localeParam , String collationParam ) { } public void testShingleAnalyzer ( ) throws Exception { } private void assertEqualShingle ( Analyzer analyzer , String text , String [ ] expected ) throws Exception { } private String [ ] getShingleConfig ( String params ) { } private String getReuters20LinesFile ( ) { } }

Fix:
assertTrue ( ( ( tfv . size ( ) ) > 0 ) ) ;