Buggy code:
public enum Migration implements CompileParameter { INSTANCE ; private static final String DESCRIPTION_START = "//*MIGRATION_DESCRIPTION" ; private static final String DESCRIPTION_END = "MIGRATION_DESCRIPTION*//" ; private static final String MIGRATION_FILE_NAME = "migration_file" ; public static File getMigrationFile ( final Context context ) { } public static String [ ] extractDescriptions ( final String sql ) throws ExitException { } @ Override public boolean check ( final Context context ) { } @ Override public void run ( final Context context ) throws ExitException { if ( context . contains ( MIGRATION ) ) { final Map < String , String > currentDsl = DslPath . getCurrentDsl ( context ) ; final DbConnection . DatabaseInfo dbInfo = DbConnection . getDatabaseDslAndVersion ( context ) ; final String url = ( ( "Platform.svc//unmanaged//postgres-migration?version=" + ( dbInfo . compilerVersion ) ) + "&postgres=" ) + ( dbInfo . postgresVersion ) ; final JsonObject arg = new JsonObject ( ) . add ( "Old" , Utils . toJson ( dbInfo . dsl ) ) . add ( "New" , Utils . toJson ( currentDsl ) ) ; context . show ( "Downloading<seq2seq4repair_space>SQL<seq2seq4repair_space>migration..." ) ; final Either < String > response = DslServer . put ( url , context , arg ) ; if ( ! ( response . isSuccess ( ) ) ) { context . error ( "Error<seq2seq4repair_space>creating<seq2seq4repair_space>SQL<seq2seq4repair_space>migration:" ) ; context . error ( response . whyNot ( ) ) ; throw new ExitException ( ) ; } final String value = context . get ( SQL ) ; final File path ; if ( ( ( ! ( context . contains ( SQL ) ) ) || ( value == null ) ) || ( ( value . length ( ) ) == 0 ) ) { path = TempPath . getTempPath ( context ) ; } else { path = new File ( value ) ; } if ( ! ( path . exists ( ) ) ) { context . error ( ( ( "Error<seq2seq4repair_space>accessing<seq2seq4repair_space>SQL<seq2seq4repair_space>path<seq2seq4repair_space>(" + ( path . getAbsolutePath ( ) ) ) + ")." ) ) ; throw new ExitException ( ) ; } final String script = ( ( response . get ( ) . startsWith ( "\"" ) ) && ( response . get ( ) . endsWith ( "\"" ) ) ) ? JsonValue . readFrom ( response . get ( ) ) . asString ( ) : response . get ( ) ; <START_BUG> final File file = new File ( ( ( ( ( path . getAbsolutePath ( ) ) + "//sql-migration-" ) + ( new Date ( ) . getTime ( ) ) ) + ".sql" ) ) ; <END_BUG> try { Utils . saveFile ( file , script ) ; } catch ( IOException e ) { context . error ( ( "Error<seq2seq4repair_space>saving<seq2seq4repair_space>migration<seq2seq4repair_space>script<seq2seq4repair_space>to<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) ) ; context . error ( e ) ; throw new ExitException ( ) ; } context . show ( ( "Migration<seq2seq4repair_space>saved<seq2seq4repair_space>to<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) ) ; if ( ( script . length ( ) ) > 0 ) { final String [ ] descriptions = Migration . extractDescriptions ( script ) ; for ( int i = 1 ; i < ( descriptions . length ) ; i ++ ) { context . log ( descriptions [ i ] ) ; } } else { context . show ( "No<seq2seq4repair_space>database<seq2seq4repair_space>changes<seq2seq4repair_space>detected." ) ; } context . cache ( Migration . MIGRATION_FILE_NAME , file ) ; } } @ Override public String getShortDescription ( ) { } @ Override public String getDetailedDescription ( ) { } }

Fix:
final File file = new File ( path . getAbsolutePath ( ) , ( ( "sql-migration-" + ( new Date ( ) . getTime ( ) ) ) + ".sql" ) ) ;