Buggy code:
@ Slow public class SpellCheckCollatorTest extends SolrTestCaseJ4 { @ BeforeClass public static void beforeClass ( ) throws Exception { } @ Test public void testCollationWithHypens ( ) throws Exception { } public void testCollateWithOverride ( ) throws Exception { } @ Test public void testCollateWithFilter ( ) throws Exception { } @ Test public void testCollateWithMultipleRequestHandlers ( ) throws Exception { } @ Test public void testExtendedCollate ( ) throws Exception { } @ Test public void testCollateWithGrouping ( ) throws Exception { } @ Test public void testContextSensitiveCollate ( ) throws Exception { String [ ] dictionary = new String [ ] { "direct" , "default_teststop" } ; <START_BUG> for ( int i = 0 ; i < 1 ; i ++ ) { <END_BUG> assertQ ( req ( "q" , "teststop:(flew<seq2seq4repair_space>AND<seq2seq4repair_space>form<seq2seq4repair_space>AND<seq2seq4repair_space>heathrow)" , "qt" , "spellCheckCompRH" , "indent" , "true" , COMPONENT_NAME , "true" , SPELLCHECK_DICT , dictionary [ i ] , SPELLCHECK_EXTENDED_RESULTS , "true" , SPELLCHECK_COUNT , "10" , SPELLCHECK_ALTERNATIVE_TERM_COUNT , "5" , SPELLCHECK_MAX_RESULTS_FOR_SUGGEST , "0" , SPELLCHECK_COLLATE , "true" , SPELLCHECK_MAX_COLLATION_TRIES , "10" , SPELLCHECK_MAX_COLLATIONS , "1" , SPELLCHECK_COLLATE_EXTENDED_RESULTS , "true" ) , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='flew']//arr[@name='suggestion']//lst//str[@name='word']='flow'" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='form']//arr[@name='suggestion']//lst//str[@name='word']='from'" , "////lst[@name='spellcheck']//lst[@name='suggestions']//bool[@name='correctlySpelled']='false'" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='collation']//str[@name='collationQuery']='teststop:(flew<seq2seq4repair_space>AND<seq2seq4repair_space>from<seq2seq4repair_space>AND<seq2seq4repair_space>heathrow)'" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='collation']//int[@name='hits']=1" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='collation']//lst[@name='misspellingsAndCorrections']//str[@name='form']='from'" ) ; assertQ ( req ( "q" , "teststop:(june<seq2seq4repair_space>AND<seq2seq4repair_space>customs)" , "qt" , "spellCheckCompRH" , "indent" , "true" , COMPONENT_NAME , "true" , SPELLCHECK_DICT , dictionary [ i ] , SPELLCHECK_EXTENDED_RESULTS , "true" , SPELLCHECK_COUNT , "10" , SPELLCHECK_ALTERNATIVE_TERM_COUNT , "5" , SPELLCHECK_MAX_RESULTS_FOR_SUGGEST , "1" , SPELLCHECK_COLLATE , "true" , SPELLCHECK_MAX_COLLATION_TRIES , "10" , SPELLCHECK_MAX_COLLATIONS , "1" , SPELLCHECK_COLLATE_EXTENDED_RESULTS , "true" ) , "////result[@numFound=1]" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='june']//arr[@name='suggestion']//lst//str[@name='word']='jane'" , "////lst[@name='spellcheck']//lst[@name='suggestions']//bool[@name='correctlySpelled']='false'" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='collation']//str[@name='collationQuery']='teststop:(jane<seq2seq4repair_space>AND<seq2seq4repair_space>customs)'" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='collation']//int[@name='hits']=1" , "////lst[@name='spellcheck']//lst[@name='suggestions']//lst[@name='collation']//lst[@name='misspellingsAndCorrections']//str[@name='june']='jane'" ) ; } } }

Fix:
for ( int i = 0 ; i <= 1 ; i ++ ) {