Buggy code:
public class Rpm extends Task { private String command = "-bb" ; private boolean cleanBuildDir = false ; private boolean removeSpec = false ; private boolean removeSource = false ; private File error ; private File output ; private String specFile ; private File topDir ; public void setCleanBuildDir ( boolean cbd ) { } public void setCommand ( String c ) { } public void setError ( File error ) { } public void setOutput ( File output ) { } public void setRemoveSource ( boolean rs ) { } public void setRemoveSpec ( boolean rs ) { } public void setSpecFile ( String sf ) throws TaskException { } public void setTopDir ( File td ) { } public void execute ( ) throws TaskException { Commandline toExecute = new Commandline ( ) ; toExecute . setExecutable ( "rpm" ) ; if ( ( topDir ) != null ) { toExecute . createArgument ( ) . setValue ( "--define" ) ; toExecute . createArgument ( ) . setValue ( ( "_topdir" + ( topDir ) ) ) ; } toExecute . createArgument ( ) . setLine ( command ) ; if ( cleanBuildDir ) { toExecute . createArgument ( ) . setValue ( "--clean" ) ; } if ( removeSpec ) { toExecute . createArgument ( ) . setValue ( "--rmspec" ) ; } if ( removeSource ) { toExecute . createArgument ( ) . setValue ( "--rmsource" ) ; } toExecute . createArgument ( ) . setValue ( ( "SPECS//" + ( specFile ) ) ) ; ExecuteStreamHandler streamhandler = null ; OutputStream outputstream = null ; OutputStream errorstream = null ; if ( ( ( error ) == null ) && ( ( output ) == null ) ) { streamhandler = new org . apache . tools . ant . taskdefs . exec . LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_WARN ) ; } else { if ( ( output ) != null ) { try { outputstream = new PrintStream ( new BufferedOutputStream ( new FileOutputStream ( output ) ) ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } else { outputstream = new org . apache . tools . ant . taskdefs . exec . LogOutputStream ( this , Project . MSG_INFO ) ; } if ( ( error ) != null ) { try { errorstream = new PrintStream ( new BufferedOutputStream ( new FileOutputStream ( error ) ) ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } else { errorstream = new org . apache . tools . ant . taskdefs . exec . LogOutputStream ( this , Project . MSG_WARN ) ; } streamhandler = new PumpStreamHandler ( outputstream , errorstream ) ; } Execute exe = new Execute ( streamhandler , null ) ; <START_BUG> exe . setAntRun ( project ) ; <END_BUG> if ( ( topDir ) == null ) topDir = getBaseDirectory ( ) ; exe . setWorkingDirectory ( topDir ) ; exe . setCommandline ( toExecute . getCommandline ( ) ) ; try { exe . execute ( ) ; getLogger ( ) . info ( ( ( "Building<seq2seq4repair_space>the<seq2seq4repair_space>RPM<seq2seq4repair_space>based<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>" + ( specFile ) ) + "<seq2seq4repair_space>file" ) ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } finally { if ( ( output ) != null ) { try { outputstream . close ( ) ; } catch ( IOException e ) { } } if ( ( error ) != null ) { try { errorstream . close ( ) ; } catch ( IOException e ) { } } } } }

Fix:
exe . setAntRun ( getProject ( ) ) ;