Buggy code:
@ 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 ) { } public static LogMergePolicy newLogMergePolicy ( boolean useCFS , int mergeFactor ) { } public static LogMergePolicy newLogMergePolicy ( int mergeFactor ) { } public static MockDirectoryWrapper newDirectory ( ) throws IOException { } public static MockDirectoryWrapper newDirectory ( Random r ) throws IOException { } public static MockDirectoryWrapper newDirectory ( Directory d ) throws IOException { } public static MockDirectoryWrapper newFSDirectory ( File f ) throws IOException { } public static MockDirectoryWrapper newFSDirectory ( File f , LockFactory lf ) throws IOException { } public static MockDirectoryWrapper newDirectory ( Random r , Directory d ) throws IOException { } public static Field newField ( String name , String value , Index index ) { } public static Field newField ( String name , String value , Store store , Index index ) { } public static Field newField ( String name , String value , Store store , Index index , TermVector tv ) { } public static Field newField ( Random random , String name , String value , Index index ) { } public static Field newField ( Random random , String name , String value , Store store , Index index ) { } public static Field newField ( Random random , String name , String value , Store store , Index index , TermVector tv ) { } static final TermVector [ ] tvSettings = new TermVector [ ] { TermVector . NO , TermVector . YES , TermVector . WITH_OFFSETS , TermVector . WITH_POSITIONS , TermVector . WITH_POSITIONS_OFFSETS } ; private static TermVector randomTVSetting ( Random random , TermVector minimum ) { } public static Locale randomLocale ( Random random ) { } public static TimeZone randomTimeZone ( Random random ) { } public static Locale localeForName ( String localeName ) { } private static final String [ ] FS_DIRECTORIES = new String [ ] { "SimpleFSDirectory" , "NIOFSDirectory" , "MMapDirectory" } ; private static final String [ ] CORE_DIRECTORIES = new String [ ] { "RAMDirectory" , LuceneTestCase . FS_DIRECTORIES [ 0 ] , LuceneTestCase . FS_DIRECTORIES [ 1 ] , LuceneTestCase . FS_DIRECTORIES [ 2 ] } ; public static String randomDirectory ( Random random ) { } private static Directory newFSDirectoryImpl ( Class < ? extends FSDirectory > clazz , File file , LockFactory lockFactory ) throws IOException { } public static void registerTempFile ( File tmpFile ) { } static Directory newDirectoryImpl ( Random random , String clazzName ) { if ( clazzName . equals ( "random" ) ) clazzName = LuceneTestCase . randomDirectory ( random ) ; if ( ( clazzName . indexOf ( "." ) ) == ( - 1 ) ) clazzName = "org.apache.lucene.store." + clazzName ; try { final Class < ? extends Directory > clazz = Class . forName ( clazzName ) . asSubclass ( Directory . class ) ; if ( FSDirectory . class . isAssignableFrom ( clazz ) ) { <START_BUG> final File tmpFile = File . createTempFile ( "test" , "tmp" , LuceneTestCase . TEMP_DIR ) ; <END_BUG> tmpFile . delete ( ) ; tmpFile . mkdir ( ) ; LuceneTestCase . registerTempFile ( tmpFile ) ; return LuceneTestCase . newFSDirectoryImpl ( clazz . asSubclass ( FSDirectory . class ) , tmpFile , null ) ; } return clazz . newInstance ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } public static IndexSearcher newSearcher ( IndexReader r ) throws IOException { } public static IndexSearcher newSearcher ( IndexReader r , boolean maybeWrap ) throws IOException { } public String getName ( ) { } protected File getDataFile ( String name ) throws IOException { } public void reportAdditionalFailureInfo ( ) { } private String reproduceWithExtraParams ( ) { } private static long staticSeed ; private long seed ; private static final Random seedRand = new Random ( ) ; protected static final Random random = new Random ( 0 ) ; private String name = "<unknown>" ; @ Documented @ Inherited @ Retention ( RetentionPolicy . RUNTIME ) public @ interface Nightly { } public static class LuceneTestCaseRunner extends BlockJUnit4ClassRunner { private List < FrameworkMethod > testMethods ; @ Override protected List < FrameworkMethod > computeTestMethods ( ) { } @ Override protected void runChild ( FrameworkMethod arg0 , RunNotifier arg1 ) { } public LuceneTestCaseRunner ( Class < ? > clazz ) throws InitializationError { }

Fix:
final File tmpFile = _TestUtil . createTempFile ( "test" , "tmp" , LuceneTestCase . TEMP_DIR ) ;