Buggy code:
public class SQLExec extends Task { public static class DelimiterType extends EnumeratedAttribute { public static final String NORMAL = "normal" ; public static final String ROW = "row" ; public String [ ] getValues ( ) { } } private int goodSql = 0 ; private int totalSql = 0 ; private Path classpath ; private AntClassLoader loader ; private Connection conn = null ; private boolean autocommit = false ; private Statement statement = null ; private String driver = null ; private String url = null ; private String userId = null ; private String password = null ; private File srcFile = null ; private String sqlCommand = "" ; private Vector transactions = new Vector ( ) ; private String delimiter = ";" ; private String delimiterType = SQLExec . DelimiterType . NORMAL ; private boolean print = false ; private boolean showheaders = true ; private File output = null ; private String rdbms = null ; private String version = null ; private String onError = "abort" ; public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public void setSrc ( File srcFile ) { } public void addText ( String sql ) { } public SQLExec . Transaction createTransaction ( ) { } public void setDriver ( String driver ) { } public void setUrl ( String url ) { } public void setUserid ( String userId ) { } public void setPassword ( String password ) { } public void setAutocommit ( boolean autocommit ) { } public void setDelimiter ( String delimiter ) { } public void setDelimiterType ( SQLExec . DelimiterType delimiterType ) { } public void setPrint ( boolean print ) { } public void setShowheaders ( boolean showheaders ) { } public void setOutput ( File output ) { } public void setRdbms ( String vendor ) { } public void setVersion ( String version ) { } public void setOnerror ( SQLExec . OnError action ) { } public void execute ( ) throws BuildException { sqlCommand = sqlCommand . trim ( ) ; if ( ( ( srcFile ) == null ) && ( ( sqlCommand . length ( ) ) == 0 ) ) { if ( ( transactions . size ( ) ) == 0 ) { throw new BuildException ( "Source<seq2seq4repair_space>file,<seq2seq4repair_space>transactions<seq2seq4repair_space>or<seq2seq4repair_space>sql<seq2seq4repair_space>statement<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" , location ) ; } } else { SQLExec . Transaction t = createTransaction ( ) ; t . setSrc ( srcFile ) ; t . addText ( sqlCommand ) ; } if ( ( driver ) == null ) { throw new BuildException ( "Driver<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" , location ) ; } if ( ( userId ) == null ) { throw new BuildException ( "User<seq2seq4repair_space>Id<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" , location ) ; } if ( ( password ) == null ) { throw new BuildException ( "Password<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" , location ) ; } if ( ( url ) == null ) { throw new BuildException ( "Url<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" , location ) ; } if ( ( ( srcFile ) != null ) && ( ! ( srcFile . exists ( ) ) ) ) { throw new BuildException ( "Source<seq2seq4repair_space>file<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist!" , location ) ; } Driver driverInstance = null ; try { Class dc ; if ( ( classpath ) != null ) { log ( ( ( ( "Loading<seq2seq4repair_space>" + ( driver ) ) + "<seq2seq4repair_space>using<seq2seq4repair_space>AntClassLoader<seq2seq4repair_space>with<seq2seq4repair_space>classpath<seq2seq4repair_space>" ) + ( classpath ) ) , MSG_VERBOSE ) ; <START_BUG> loader = new AntClassLoader ( project , classpath , false ) ; <END_BUG> dc = loader . loadClass ( driver ) ; } else { log ( ( ( "Loading<seq2seq4repair_space>" + ( driver ) ) + "<seq2seq4repair_space>using<seq2seq4repair_space>system<seq2seq4repair_space>loader." ) , MSG_VERBOSE ) ; dc = Class . forName ( driver ) ; } driverInstance = ( ( Driver ) ( dc . newInstance ( ) ) ) ; } catch ( ClassNotFoundException e ) { throw new BuildException ( ( ( "Class<seq2seq4repair_space>Not<seq2seq4repair_space>Found:<seq2seq4repair_space>JDBC<seq2seq4repair_space>driver<seq2seq4repair_space>" + ( driver ) ) + "<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>loaded" ) , location ) ; } catch ( IllegalAccessException e ) { throw new BuildException ( ( ( "Illegal<seq2seq4repair_space>Access:<seq2seq4repair_space>JDBC<seq2seq4repair_space>driver<seq2seq4repair_space>" + ( driver ) ) + "<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>loaded" ) , location ) ; } catch ( InstantiationException e ) { throw new BuildException ( ( ( "Instantiation<seq2seq4repair_space>Exception:<seq2seq4repair_space>JDBC<seq2seq4repair_space>driver<seq2seq4repair_space>" + ( driver ) ) + "<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>loaded" ) , location ) ; } try { log ( ( "connecting<seq2seq4repair_space>to<seq2seq4repair_space>" + ( url ) ) , MSG_VERBOSE ) ; Properties info = new Properties ( ) ; info . put ( "user" , userId ) ; info . put ( "password" , password ) ; conn = driverInstance . connect ( url , info ) ; if ( ( conn ) == null ) { throw new SQLException ( ( "No<seq2seq4repair_space>suitable<seq2seq4repair_space>Driver<seq2seq4repair_space>for<seq2seq4repair_space>" + ( url ) ) ) ; } if ( ! ( isValidRdbms ( conn ) ) ) return ; conn . setAutoCommit ( autocommit ) ; statement = conn . createStatement ( ) ; PrintStream out = System . out ; try { if ( ( output ) != null ) { log ( ( "Opening<seq2seq4repair_space>PrintStream<seq2seq4repair_space>to<seq2seq4repair_space>output<seq2seq4repair_space>file<seq2seq4repair_space>" + ( output ) ) , MSG_VERBOSE ) ; out = new PrintStream ( new BufferedOutputStream ( new FileOutputStream ( output ) ) ) ; } for ( Enumeration e = transactions . elements ( ) ; e . hasMoreElements ( ) ; ) { ( ( SQLExec . Transaction ) ( e . nextElement ( ) ) ) . runTransaction ( out ) ; if ( ! ( autocommit ) ) { log ( "Commiting<seq2seq4repair_space>transaction" , MSG_VERBOSE ) ; conn . commit ( ) ; } } } finally { if ( ( out != null ) && ( out != ( System . out ) ) ) { out . close ( ) ; } } }

Fix:
loader = new AntClassLoader ( project , classpath ) ;