Buggy code:
public class Master { private Name origin ; private File file ; private Record last = null ; private long defaultTTL ; private Master included = null ; private Tokenizer st ; private int currentType ; private int currentDClass ; private long currentTTL ; private Generator generator ; private List generators ; private boolean noExpandGenerate ; Master ( File file , Name initialOrigin , long initialTTL ) throws IOException { } public Master ( String filename , Name origin , long ttl ) throws IOException { } public Master ( String filename , Name origin ) throws IOException { } public Master ( String filename ) throws IOException { } public Master ( InputStream in , Name origin , long ttl ) { } public Master ( InputStream in , Name origin ) { } public Master ( InputStream in ) { } private Name parseName ( String s , Name origin ) throws TextParseException { } private void parseTTLClassAndType ( ) throws IOException { } private long parseUInt32 ( String s ) { } private void startGenerate ( ) throws IOException { } private void endGenerate ( ) throws IOException { } private Record nextGenerated ( ) throws IOException { } public Record _nextRecord ( ) throws IOException { Tokenizer . Token token ; String s ; if ( ( included ) != null ) { Record rec = included . nextRecord ( ) ; if ( rec != null ) return rec ; included = null ; } if ( ( generator ) != null ) { Record rec = nextGenerated ( ) ; if ( rec != null ) return rec ; endGenerate ( ) ; } while ( true ) { Name name ; token = st . get ( true , false ) ; if ( ( token . type ) == ( Tokenizer . WHITESPACE ) ) { Tokenizer . Token next = st . get ( ) ; if ( ( token . type ) == ( Tokenizer . EOL ) ) continue ; else if ( ( token . type ) == ( Tokenizer . EOF ) ) return null ; else st . unget ( ) ; if ( ( last ) == null ) throw st . exception ( "no<seq2seq4repair_space>owner" ) ; name = last . getName ( ) ; } else if ( ( token . type ) == ( Tokenizer . EOL ) ) continue ; else if ( ( token . type ) == ( Tokenizer . EOF ) ) return null ; else if ( ( ( ( String ) ( token . value ) ) . charAt ( 0 ) ) == '$' ) { s = token . value ; if ( s . equalsIgnoreCase ( "$ORIGIN" ) ) { origin = st . getName ( root ) ; st . getEOL ( ) ; continue ; } else if ( s . equalsIgnoreCase ( "$TTL" ) ) { defaultTTL = st . getTTL ( ) ; st . getEOL ( ) ; continue ; } else if ( s . equalsIgnoreCase ( "$INCLUDE" ) ) { String filename = st . getString ( ) ; String parent = file . getParent ( ) ; <START_BUG> File newfile = new File ( filename ) ; <END_BUG> Name incorigin = origin ; token = st . get ( ) ; if ( token . isString ( ) ) { incorigin = parseName ( token . value , root ) ; st . getEOL ( ) ; } included = new Master ( newfile , incorigin , defaultTTL ) ; return nextRecord ( ) ; } else if ( s . equalsIgnoreCase ( "$GENERATE" ) ) { if ( ( generator ) != null ) throw new IllegalStateException ( "cannot<seq2seq4repair_space>nest<seq2seq4repair_space>$GENERATE" ) ; startGenerate ( ) ; if ( noExpandGenerate ) { endGenerate ( ) ; continue ; } return nextGenerated ( ) ; } else { throw st . exception ( ( "Invalid<seq2seq4repair_space>directive:<seq2seq4repair_space>" + s ) ) ; } } else { s = token . value ; name = parseName ( s , origin ) ; if ( ( ( last ) != null ) && ( name . equals ( last . getName ( ) ) ) ) { name = last . getName ( ) ; } } parseTTLClassAndType ( ) ; last = Record . fromString ( name , currentType , currentDClass , currentTTL , st , origin ) ; return last ; } } public Record nextRecord ( ) throws IOException { } public void expandGenerate ( boolean wantExpand ) { } public Iterator generators ( ) { } protected void finalize ( ) { } }

Fix:
File newfile = new File ( parent , filename ) ;