Buggy code:
public class SQLExec extends JDBCTask { 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 Connection conn = null ; private Vector filesets = new Vector ( ) ; private Statement statement = 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 onError = "abort" ; private String encoding = null ; private boolean append = false ; private boolean keepformat = false ; private boolean escapeProcessing = true ; public void setSrc ( File srcFile ) { } public void addText ( String sql ) { } public void addFileset ( FileSet set ) { } public SQLExec . Transaction createTransaction ( ) { } public void setEncoding ( String encoding ) { } 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 setAppend ( boolean append ) { } public void setOnerror ( SQLExec . OnError action ) { } public void setKeepformat ( boolean keepformat ) { } public void setEscapeProcessing ( boolean enable ) { } public void execute ( ) throws BuildException { } protected void runStatements ( Reader reader , PrintStream out ) throws IOException , SQLException { } protected void execSQL ( String sql , PrintStream out ) throws SQLException { if ( "" . equals ( sql . trim ( ) ) ) { return ; } try { ( totalSql ) ++ ; log ( ( "SQL:<seq2seq4repair_space>" + sql ) , MSG_VERBOSE ) ; boolean ret ; int updateCount = 0 ; int updateCountTotal = 0 ; ResultSet resultSet = null ; ret = statement . execute ( sql ) ; updateCount = statement . getUpdateCount ( ) ; resultSet = statement . getResultSet ( ) ; do { if ( ! ret ) { if ( updateCount != ( - 1 ) ) { updateCountTotal += updateCount ; } } else { if ( print ) { printResults ( out ) ; } } ret = statement . getMoreResults ( ) ; updateCount = statement . getUpdateCount ( ) ; resultSet = statement . getResultSet ( ) ; <START_BUG> } while ( ( resultSet != null ) || ( updateCount != ( - 1 ) ) ) ; <END_BUG> log ( ( updateCountTotal + "<seq2seq4repair_space>rows<seq2seq4repair_space>affected" ) , MSG_VERBOSE ) ; if ( print ) { StringBuffer line = new StringBuffer ( ) ; line . append ( ( updateCountTotal + "<seq2seq4repair_space>rows<seq2seq4repair_space>affected" ) ) ; out . println ( line ) ; } SQLWarning warning = conn . getWarnings ( ) ; while ( warning != null ) { log ( ( warning + "<seq2seq4repair_space>sql<seq2seq4repair_space>warning" ) , MSG_VERBOSE ) ; warning = warning . getNextWarning ( ) ; } conn . clearWarnings ( ) ; ( goodSql ) ++ ; } catch ( SQLException e ) { log ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>execute:<seq2seq4repair_space>" + sql ) , MSG_ERR ) ; if ( ! ( onError . equals ( "continue" ) ) ) { throw e ; } log ( e . toString ( ) , MSG_ERR ) ; } } protected void printResults ( PrintStream out ) throws SQLException { } public static class OnError extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public class Transaction { private File tSrcFile = null ; private String tSqlCommand = "" ; public void setSrc ( File src ) { } public void addText ( String sql ) { } private void runTransaction ( PrintStream out ) throws IOException , SQLException { } } }

Fix:
} while ( ret ) ;