Buggy code:
public abstract class DefaultRmicAdapter implements RmicAdapter { private Rmic attributes ; private FileNameMapper mapper ; private static final Random RAND = new Random ( ) ; public static final String RMI_STUB_SUFFIX = "_Stub" ; public static final String RMI_SKEL_SUFFIX = "_Skel" ; public static final String RMI_TIE_SUFFIX = "_Tie" ; public static final String STUB_COMPAT = "-vcompat" ; public static final String STUB_1_1 = "-v1.1" ; public static final String STUB_1_2 = "-v1.2" ; public static final String STUB_OPTION_1_1 = "1.1" ; public static final String STUB_OPTION_1_2 = "1.2" ; public static final String STUB_OPTION_COMPAT = "compat" ; public DefaultRmicAdapter ( ) { } public void setRmic ( final Rmic attributes ) { } public Rmic getRmic ( ) { } protected String getStubClassSuffix ( ) { } protected String getSkelClassSuffix ( ) { } protected String getTieClassSuffix ( ) { } public FileNameMapper getMapper ( ) { } public Path getClasspath ( ) { } protected Path getCompileClasspath ( ) { } protected Commandline setupRmicCommand ( ) { } protected Commandline setupRmicCommand ( String [ ] options ) { Commandline cmd = new Commandline ( ) ; if ( options != null ) { for ( int i = 0 ; i < ( options . length ) ; i ++ ) { cmd . createArgument ( ) . setValue ( options [ i ] ) ; } } Path classpath = getCompileClasspath ( ) ; cmd . createArgument ( ) . setValue ( "-d" ) ; <START_BUG> cmd . createArgument ( ) . setFile ( attributes . getBase ( ) ) ; <END_BUG> if ( ( attributes . getExtdirs ( ) ) != null ) { cmd . createArgument ( ) . setValue ( "-extdirs" ) ; cmd . createArgument ( ) . setPath ( attributes . getExtdirs ( ) ) ; } cmd . createArgument ( ) . setValue ( "-classpath" ) ; cmd . createArgument ( ) . setPath ( classpath ) ; String stubOption = addStubVersionOptions ( ) ; if ( stubOption != null ) { cmd . createArgument ( ) . setValue ( stubOption ) ; } if ( null != ( attributes . getSourceBase ( ) ) ) { cmd . createArgument ( ) . setValue ( "-keepgenerated" ) ; } if ( attributes . getIiop ( ) ) { attributes . log ( "IIOP<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>turned<seq2seq4repair_space>on." , MSG_INFO ) ; cmd . createArgument ( ) . setValue ( "-iiop" ) ; if ( ( attributes . getIiopopts ( ) ) != null ) { attributes . log ( ( "IIOP<seq2seq4repair_space>Options:<seq2seq4repair_space>" + ( attributes . getIiopopts ( ) ) ) , MSG_INFO ) ; cmd . createArgument ( ) . setValue ( attributes . getIiopopts ( ) ) ; } } if ( attributes . getIdl ( ) ) { cmd . createArgument ( ) . setValue ( "-idl" ) ; attributes . log ( "IDL<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>turned<seq2seq4repair_space>on." , MSG_INFO ) ; if ( ( attributes . getIdlopts ( ) ) != null ) { cmd . createArgument ( ) . setValue ( attributes . getIdlopts ( ) ) ; attributes . log ( ( "IDL<seq2seq4repair_space>Options:<seq2seq4repair_space>" + ( attributes . getIdlopts ( ) ) ) , MSG_INFO ) ; } } if ( attributes . getDebug ( ) ) { cmd . createArgument ( ) . setValue ( "-g" ) ; } String [ ] compilerArgs = attributes . getCurrentCompilerArgs ( ) ; compilerArgs = preprocessCompilerArgs ( compilerArgs ) ; cmd . addArguments ( compilerArgs ) ; logAndAddFilesToCompile ( cmd ) ; return cmd ; } protected String addStubVersionOptions ( ) { } protected String [ ] preprocessCompilerArgs ( String [ ] compilerArgs ) { } protected String [ ] filterJvmCompilerArgs ( String [ ] compilerArgs ) { } protected void logAndAddFilesToCompile ( Commandline cmd ) { } private class RmicFileNameMapper implements FileNameMapper { RmicFileNameMapper ( ) { } public void setFrom ( String s ) { } public void setTo ( String s ) { } public String [ ] mapFileName ( String name ) { } } }

Fix:
cmd . createArgument ( ) . setFile ( attributes . getOutputDir ( ) ) ;