Buggy code:
public abstract class AbstractCvsTask extends Task { public static final int DEFAULT_COMPRESSION_LEVEL = 3 ; private static final int MAXIMUM_COMRESSION_LEVEL = 9 ; private Commandline cmd = new Commandline ( ) ; private Vector vecCommandlines = new Vector ( ) ; private String cvsRoot ; private String cvsRsh ; private String cvsPackage ; private static final String DEFAULT_COMMAND = "checkout" ; private String command = null ; private boolean quiet = false ; private int compression = 0 ; private boolean noexec = false ; private int port = 0 ; private File passFile = null ; private File dest ; private boolean append = false ; private File output ; private File error ; private boolean failOnError = false ; private ExecuteStreamHandler executeStreamHandler ; private OutputStream outputStream ; private OutputStream errorStream ; public AbstractCvsTask ( ) { } public void setExecuteStreamHandler ( ExecuteStreamHandler handler ) { } protected ExecuteStreamHandler getExecuteStreamHandler ( ) { } protected void setOutputStream ( OutputStream outputStream ) { } protected OutputStream getOutputStream ( ) { } protected void setErrorStream ( OutputStream errorStream ) { } protected OutputStream getErrorStream ( ) { } protected void runCommand ( Commandline toExecute ) throws BuildException { Environment env = new Environment ( ) ; if ( ( port ) > 0 ) { Environment . Variable var = new Environment . Variable ( ) ; var . setKey ( "CVS_CLIENT_PORT" ) ; var . setValue ( String . valueOf ( port ) ) ; env . addVariable ( var ) ; } if ( ( passFile ) == null ) { File defaultPassFile = new File ( ( ( ( System . getProperty ( "cygwin.user.home" , System . getProperty ( "user.home" ) ) ) + ( File . separatorChar ) ) + ".cvspass" ) ) ; if ( defaultPassFile . exists ( ) ) { this . setPassfile ( defaultPassFile ) ; } } if ( ( passFile ) != null ) { if ( ( passFile . isFile ( ) ) && ( passFile . canRead ( ) ) ) { Environment . Variable var = new Environment . Variable ( ) ; var . setKey ( "CVS_PASSFILE" ) ; var . setValue ( String . valueOf ( passFile ) ) ; env . addVariable ( var ) ; log ( ( "Using<seq2seq4repair_space>cvs<seq2seq4repair_space>passfile:<seq2seq4repair_space>" + ( String . valueOf ( passFile ) ) ) , MSG_INFO ) ; } else if ( ! ( passFile . canRead ( ) ) ) { log ( ( ( "cvs<seq2seq4repair_space>passfile:<seq2seq4repair_space>" + ( String . valueOf ( passFile ) ) ) + "<seq2seq4repair_space>ignored<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>readable" ) , MSG_WARN ) ; } else { log ( ( ( "cvs<seq2seq4repair_space>passfile:<seq2seq4repair_space>" + ( String . valueOf ( passFile ) ) ) + "<seq2seq4repair_space>ignored<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>file" ) , MSG_WARN ) ; } } if ( ( cvsRsh ) != null ) { Environment . Variable var = new Environment . Variable ( ) ; var . setKey ( "CVS_RSH" ) ; var . setValue ( String . valueOf ( cvsRsh ) ) ; env . addVariable ( var ) ; } Execute exe = new Execute ( getExecuteStreamHandler ( ) , null ) ; exe . setAntRun ( getProject ( ) ) ; if ( ( dest ) == null ) { dest = getProject ( ) . getBaseDir ( ) ; } if ( ! ( dest . exists ( ) ) ) { dest . mkdirs ( ) ; } exe . setWorkingDirectory ( dest ) ; exe . setCommandline ( toExecute . getCommandline ( ) ) ; exe . setEnvironment ( env . getVariables ( ) ) ; try { String actualCommandLine = executeToString ( exe ) ; log ( actualCommandLine , MSG_VERBOSE ) ; int retCode = exe . execute ( ) ; log ( ( "retCode=" + retCode ) , MSG_DEBUG ) ; <START_BUG> if ( ( failOnError ) && ( retCode != 0 ) ) { <END_BUG> throw new BuildException ( ( ( ( ( ( "cvs<seq2seq4repair_space>exited<seq2seq4repair_space>with<seq2seq4repair_space>error<seq2seq4repair_space>code<seq2seq4repair_space>" + retCode ) + ( StringUtils . LINE_SEP ) ) + "Command<seq2seq4repair_space>line<seq2seq4repair_space>was<seq2seq4repair_space>[" ) + actualCommandLine ) + "]" ) , getLocation ( ) ) ; } } catch ( IOException e ) { if ( failOnError ) { throw new BuildException ( e , getLocation ( ) ) ; } else { log ( ( "Caught<seq2seq4repair_space>exception:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , MSG_WARN ) ; } } catch ( BuildException e ) { if ( failOnError ) { throw e ; } else { Throwable t = e . getException ( ) ; if ( t == null ) { t = e ; } log ( ( "Caught<seq2seq4repair_space>exception:<seq2seq4repair_space>" + ( t . getMessage ( ) ) ) , MSG_WARN ) ; } } catch ( Exception e ) { if ( failOnError ) { throw new BuildException ( e , getLocation ( ) ) ; } else { log ( ( "Caught<seq2seq4repair_space>exception:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , MSG_WARN ) ; } } finally { if ( ( outputStream ) != null ) { try { outputStream . close ( ) ; } catch ( IOException e ) { } } if ( ( errorStream ) != null ) { try { errorStream . close ( ) ; } catch ( IOException e ) { } } } } public void execute ( ) throws BuildException { } private String executeToString ( Execute execute ) { } public void setCvsRoot ( String root ) { } public String getCvsRoot ( ) { } public void setCvsRsh ( String rsh ) { } public String getCvsRsh ( ) { } public void setPort ( int port ) { } public int getPort ( ) { } public void setPassfile ( File passFile ) { } public File getPassFile ( ) { } public void setDest ( File dest ) { } public File getDest ( ) { } public void setPackage ( String p ) { }

Fix:
if ( ( failOnError ) && ( Execute . isFailure ( retCode ) ) ) {