Buggy code:
@ RunWith ( LuceneTestCase . LuceneTestCaseRunner . class ) public abstract class LuceneTestCase extends Assert { public static final boolean VERBOSE = Boolean . getBoolean ( "tests.verbose" ) ; public static final Version TEST_VERSION_CURRENT = Version . LUCENE_34 ; static final String TEST_METHOD ; public static final File TEMP_DIR ; private static final Map < File , StackTraceElement [ ] > tempDirs = Collections . synchronizedMap ( new HashMap < File , StackTraceElement [ ] > ( ) ) ; public static final String TEST_LOCALE = System . getProperty ( "tests.locale" , "random" ) ; public static final String TEST_TIMEZONE = System . getProperty ( "tests.timezone" , "random" ) ; public static final String TEST_DIRECTORY = System . getProperty ( "tests.directory" , "random" ) ; public static final int TEST_ITER = Integer . parseInt ( System . getProperty ( "tests.iter" , "1" ) ) ; public static final int TEST_ITER_MIN = Integer . parseInt ( System . getProperty ( "tests.iter.min" , Integer . toString ( LuceneTestCase . TEST_ITER ) ) ) ; public static final String TEST_SEED = System . getProperty ( "tests.seed" , "random" ) ; public static final boolean TEST_NIGHTLY = Boolean . parseBoolean ( System . getProperty ( "tests.nightly" , "false" ) ) ; public static final String TEST_LINE_DOCS_FILE = System . getProperty ( "tests.linedocsfile" , "europarl.lines.txt.gz" ) ; public static final String TEST_CLEAN_THREADS = System . getProperty ( "tests.cleanthreads" , "perClass" ) ; public static final int RANDOM_MULTIPLIER = Integer . parseInt ( System . getProperty ( "tests.multiplier" , "1" ) ) ; private int savedBoolMaxClauseCount ; private volatile Thread . UncaughtExceptionHandler savedUncaughtExceptionHandler = null ; private static LuceneTestCase . State state = LuceneTestCase . State . INITIAL ; private static enum State { INITIAL , SETUP , RANTEST , TEARDOWN ; } private static class UncaughtExceptionEntry { public final Thread thread ; public final Throwable exception ; public UncaughtExceptionEntry ( Thread thread , Throwable exception ) { } } private List < LuceneTestCase . UncaughtExceptionEntry > uncaughtExceptions = Collections . synchronizedList ( new ArrayList < LuceneTestCase . UncaughtExceptionEntry > ( ) ) ; private static Locale locale ; private static Locale savedLocale ; private static TimeZone timeZone ; private static TimeZone savedTimeZone ; protected static Map < MockDirectoryWrapper , StackTraceElement [ ] > stores ; private static class TwoLongs { public final long l1 ; public final long l2 ; public TwoLongs ( long l1 , long l2 ) { } @ Override public String toString ( ) { } public static LuceneTestCase . TwoLongs fromString ( String s ) { } } @ Deprecated private static List < String > testClassesRun = new ArrayList < String > ( ) ; @ BeforeClass public static void beforeClassLuceneTestCaseJ4 ( ) { } @ AfterClass public static void afterClassLuceneTestCaseJ4 ( ) { } private static boolean testsFailed ; @ Rule public final TestWatchman intercept = new TestWatchman ( ) { @ Override public void failed ( Throwable e , FrameworkMethod method ) { } @ Override public void starting ( FrameworkMethod method ) { } } ; @ Before public void setUp ( ) throws Exception { } protected void purgeFieldCache ( final FieldCache fc ) { } protected String getTestLabel ( ) { } public static void setUseCompoundFile ( MergePolicy mp , boolean useCompound ) { } public static void setMergeFactor ( MergePolicy mp , int mergeFactor ) { } @ After public void tearDown ( ) throws Exception { } private static final int THREAD_STOP_GRACE_MSEC = 50 ; private static final IdentityHashMap < Thread , Boolean > rogueThreads = new IdentityHashMap < Thread , Boolean > ( ) ; private static int threadCleanup ( String context ) { } protected void assertSaneFieldCaches ( final String msg ) { } public static int atLeast ( Random random , int i ) { <START_BUG> int min = ( LuceneTestCase . TEST_NIGHTLY ? 5 * i : i ) * ( LuceneTestCase . RANDOM_MULTIPLIER ) ; <END_BUG> int max = min + ( min // 2 ) ; return _TestUtil . nextInt ( random , min , max ) ; } public static int atLeast ( int i ) { } public static boolean rarely ( Random random ) { } public static boolean rarely ( ) { } public static boolean usually ( Random random ) { } public static boolean usually ( ) { } @ Deprecated public static void assertEquals ( double expected , double actual ) { } @ Deprecated public static void assertEquals ( String message , double expected , double actual ) { } @ Deprecated public static void assertEquals ( float expected , float actual ) { } @ Deprecated public static void assertEquals ( String message , float expected , float actual ) { } private static final class TestIgnoredException extends RuntimeException { TestIgnoredException ( String msg ) { } TestIgnoredException ( String msg , Throwable t ) { } @ Override public String getMessage ( ) { } @ Override public void printStackTrace ( PrintStream s ) { } } public static void assumeTrue ( String msg , boolean b ) { } public static void assumeFalse ( String msg , boolean b ) { } public static void assumeNoException ( String msg , Exception e ) { } public static void dumpIterator ( String label , Iterator < ? > iter , PrintStream stream ) { } public static void dumpArray ( String label , Object [ ] objs , PrintStream stream ) { } public static IndexWriterConfig newIndexWriterConfig ( Version v , Analyzer a ) { } public static IndexWriterConfig newIndexWriterConfig ( Random r , Version v , Analyzer a ) { } public static LogMergePolicy newLogMergePolicy ( ) { } public static TieredMergePolicy newTieredMergePolicy ( ) { } public static LogMergePolicy newLogMergePolicy ( Random r ) { } public static TieredMergePolicy newTieredMergePolicy ( Random r ) { } public static LogMergePolicy newLogMergePolicy ( boolean useCFS ) { }

Fix:
int min = ( LuceneTestCase . TEST_NIGHTLY ? 3 * i : i ) * ( LuceneTestCase . RANDOM_MULTIPLIER ) ;