Buggy code:
public class TestSpans extends LuceneTestCase { private IndexSearcher searcher ; private IndexReader reader ; private Directory directory ; public static final String field = "field" ; @ Override public void setUp ( ) throws Exception { } @ Override public void tearDown ( ) throws Exception { } private String [ ] docFields = new String [ ] { "w1<seq2seq4repair_space>w2<seq2seq4repair_space>w3<seq2seq4repair_space>w4<seq2seq4repair_space>w5" , "w1<seq2seq4repair_space>w3<seq2seq4repair_space>w2<seq2seq4repair_space>w3" , "w1<seq2seq4repair_space>xx<seq2seq4repair_space>w2<seq2seq4repair_space>yy<seq2seq4repair_space>w3" , "w1<seq2seq4repair_space>w3<seq2seq4repair_space>xx<seq2seq4repair_space>w2<seq2seq4repair_space>yy<seq2seq4repair_space>w3" , "u2<seq2seq4repair_space>u2<seq2seq4repair_space>u1" , "u2<seq2seq4repair_space>xx<seq2seq4repair_space>u2<seq2seq4repair_space>u1" , "u2<seq2seq4repair_space>u2<seq2seq4repair_space>xx<seq2seq4repair_space>u1" , "u2<seq2seq4repair_space>xx<seq2seq4repair_space>u2<seq2seq4repair_space>yy<seq2seq4repair_space>u1" , "u2<seq2seq4repair_space>xx<seq2seq4repair_space>u1<seq2seq4repair_space>u2" , "u2<seq2seq4repair_space>u1<seq2seq4repair_space>xx<seq2seq4repair_space>u2" , "u1<seq2seq4repair_space>u2<seq2seq4repair_space>xx<seq2seq4repair_space>u2" , "t1<seq2seq4repair_space>t2<seq2seq4repair_space>t1<seq2seq4repair_space>t3<seq2seq4repair_space>t2<seq2seq4repair_space>t3" } ; public SpanTermQuery makeSpanTermQuery ( String text ) { } private void checkHits ( Query query , int [ ] results ) throws IOException { <START_BUG> CheckHits . checkHits ( query , TestSpans . field , searcher , results ) ; <END_BUG> } private void orderedSlopTest3SQ ( SpanQuery q1 , SpanQuery q2 , SpanQuery q3 , int slop , int [ ] expectedDocs ) throws IOException { } public void orderedSlopTest3 ( int slop , int [ ] expectedDocs ) throws IOException { } public void orderedSlopTest3Equal ( int slop , int [ ] expectedDocs ) throws IOException { } public void orderedSlopTest1Equal ( int slop , int [ ] expectedDocs ) throws IOException { } public void testSpanNearOrdered01 ( ) throws Exception { } public void testSpanNearOrdered02 ( ) throws Exception { } public void testSpanNearOrdered03 ( ) throws Exception { } public void testSpanNearOrdered04 ( ) throws Exception { } public void testSpanNearOrdered05 ( ) throws Exception { } public void testSpanNearOrderedEqual01 ( ) throws Exception { } public void testSpanNearOrderedEqual02 ( ) throws Exception { } public void testSpanNearOrderedEqual03 ( ) throws Exception { } public void testSpanNearOrderedEqual04 ( ) throws Exception { } public void testSpanNearOrderedEqual11 ( ) throws Exception { } public void testSpanNearOrderedEqual12 ( ) throws Exception { } public void testSpanNearOrderedEqual13 ( ) throws Exception { } public void testSpanNearOrderedEqual14 ( ) throws Exception { } public void testSpanNearOrderedEqual15 ( ) throws Exception { } public void testSpanNearOrderedOverlap ( ) throws Exception { } public void testSpanNearUnOrdered ( ) throws Exception { } private Spans orSpans ( String [ ] terms ) throws Exception { } private void tstNextSpans ( Spans spans , int doc , int start , int end ) throws Exception { } public void testSpanOrEmpty ( ) throws Exception { } public void testSpanOrSingle ( ) throws Exception { } public void testSpanOrMovesForward ( ) throws Exception { } public void testSpanOrDouble ( ) throws Exception { } public void testSpanOrDoubleSkip ( ) throws Exception { } public void testSpanOrUnused ( ) throws Exception { } public void testSpanOrTripleSameDoc ( ) throws Exception { } public void testSpanScorerZeroSloppyFreq ( ) throws Exception { } private void addDoc ( IndexWriter writer , String id , String text ) throws IOException { } private int hitCount ( Searcher searcher , String word ) throws Throwable { } private SpanQuery createSpan ( String value ) { } private SpanQuery createSpan ( int slop , boolean ordered , SpanQuery [ ] clauses ) { } private SpanQuery createSpan ( int slop , boolean ordered , String term1 , String term2 ) { } public void testNPESpanQuery ( ) throws Throwable { } }

Fix:
CheckHits . checkHits ( random , query , TestSpans . field , searcher , results ) ;