Buggy code:
public class Expand extends Task { private File dest ; private File source ; private boolean overwrite = true ; private Mapper mapperElement = null ; private Vector patternsets = new Vector ( ) ; private Vector filesets = new Vector ( ) ; private static final String NATIVE_ENCODING = "native-encoding" ; private String encoding = "UTF8" ; public static final String ERROR_MULTIPLE_MAPPERS = "Cannot<seq2seq4repair_space>define<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>mapper" ; public void execute ( ) throws BuildException { } protected void expandFile ( FileUtils fileUtils , File srcF , File dir ) { } protected FileNameMapper getMapper ( ) { } protected void extractFile ( FileUtils fileUtils , File srcF , File dir , InputStream compressedInputStream , String entryName , Date entryDate , boolean isDirectory , FileNameMapper mapper ) throws IOException { if ( ( ( patternsets ) != null ) && ( ( patternsets . size ( ) ) > 0 ) ) { String name = entryName . replace ( '//' , File . separatorChar ) . replace ( '\\' , File . separatorChar ) ; boolean included = false ; for ( int v = 0 ; v < ( patternsets . size ( ) ) ; v ++ ) { PatternSet p = ( ( PatternSet ) ( patternsets . elementAt ( v ) ) ) ; String [ ] incls = p . getIncludePatterns ( getProject ( ) ) ; if ( ( incls == null ) || ( ( incls . length ) == 0 ) ) { incls = new String [ ] { "**" } ; } for ( int w = 0 ; w < ( incls . length ) ; w ++ ) { String pattern = incls [ w ] . replace ( '//' , File . separatorChar ) . replace ( '\\' , File . separatorChar ) ; if ( pattern . endsWith ( File . separator ) ) { pattern += "**" ; } included = SelectorUtils . matchPath ( pattern , name ) ; if ( included ) { break ; } } if ( ! included ) { break ; } String [ ] excls = p . getExcludePatterns ( getProject ( ) ) ; if ( excls != null ) { for ( int w = 0 ; w < ( excls . length ) ; w ++ ) { String pattern = excls [ w ] . replace ( '//' , File . separatorChar ) . replace ( '\\' , File . separatorChar ) ; if ( pattern . endsWith ( File . separator ) ) { pattern += "**" ; } included = ! ( SelectorUtils . matchPath ( pattern , name ) ) ; if ( ! included ) { break ; } } } } if ( ! included ) { return ; } } String [ ] mappedNames = mapper . mapFileName ( entryName ) ; if ( ( mappedNames == null ) || ( ( mappedNames . length ) == 0 ) ) { mappedNames = new String [ ] { entryName } ; } File f = fileUtils . resolveFile ( dir , mappedNames [ 0 ] ) ; try { if ( ( ( ! ( overwrite ) ) && ( f . exists ( ) ) ) && ( ( f . lastModified ( ) ) >= ( entryDate . getTime ( ) ) ) ) { log ( ( ( "Skipping<seq2seq4repair_space>" + f ) + "<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>up-to-date" ) , MSG_DEBUG ) ; return ; } log ( ( ( ( "expanding<seq2seq4repair_space>" + entryName ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + f ) , MSG_VERBOSE ) ; <START_BUG> File dirF = fileUtils . getParentFile ( f ) ; <END_BUG> if ( dirF != null ) { dirF . mkdirs ( ) ; } if ( isDirectory ) { f . mkdirs ( ) ; } else { byte [ ] buffer = new byte [ 1024 ] ; int length = 0 ; FileOutputStream fos = null ; try { fos = new FileOutputStream ( f ) ; while ( ( length = compressedInputStream . read ( buffer ) ) >= 0 ) { fos . write ( buffer , 0 , length ) ; } fos . close ( ) ; fos = null ; } finally { if ( fos != null ) { try { fos . close ( ) ; } catch ( IOException e ) { } } } } fileUtils . setFileLastModified ( f , entryDate . getTime ( ) ) ; } catch ( FileNotFoundException ex ) { log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>expand<seq2seq4repair_space>to<seq2seq4repair_space>file<seq2seq4repair_space>" + ( f . getPath ( ) ) ) , MSG_WARN ) ; } } public void setDest ( File d ) { } public void setSrc ( File s ) { } public void setOverwrite ( boolean b ) { } public void addPatternset ( PatternSet set ) { } public void addFileset ( FileSet set ) { } public Mapper createMapper ( ) throws BuildException { } public void add ( FileNameMapper fileNameMapper ) { } public void setEncoding ( String encoding ) { } }

Fix:
File dirF = f . getParentFile ( ) ;