Buggy code:
public abstract class Question { protected int id ; public static class LoadException extends Exception { private static final long serialVersionUID = 1L ; public LoadException ( ) { } public LoadException ( String s ) { } } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static Question loadQuestion ( Element xmlNode ) throws Question . LoadException , SQLException { } public static Question loadQuestion ( int id ) throws Question . LoadException , SQLException { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static Question loadQuestionFromSQLRow ( ResultSet rs ) throws Question . LoadException , SQLException { } public static int getQuestionTypeId ( ) { } public static String getQuestionTypeTag ( ) { } public static String generateCreateQuestionHtml ( ) { } public static Question createQuestion ( HttpServletRequest req ) throws SQLException { } protected abstract String toDataString ( ) { } public void addQuestionToQuiz ( Quiz q ) throws SQLException { Statement s = SQL . getStatement ( ) ; int questionType = - 1 ; try { questionType = ( ( int ) ( this . getClass ( ) . getMethod ( "getQuestionTypeId" ) . invoke ( null ) ) ) ; } catch ( Exception e ) { System . err . println ( ( ( "Class<seq2seq4repair_space>[" + ( this . getClass ( ) . getName ( ) ) ) + "]<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>implement<seq2seq4repair_space>getQuestionTypeId." ) ) ; System . exit ( ( - 1 ) ) ; } <START_BUG> s . executeUpdate ( String . format ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>Questions<seq2seq4repair_space>(QuizID,<seq2seq4repair_space>QuestionType,<seq2seq4repair_space>" + "QuestionNumber,<seq2seq4repair_space>Question)<seq2seq4repair_space>VALUES<seq2seq4repair_space>(%d,<seq2seq4repair_space>%d,<seq2seq4repair_space>%d,<seq2seq4repair_space>'%s');" ) , q . getId ( ) , questionType , q . getTotalQuestions ( ) , toDataString ( ) ) ) ; <END_BUG> ResultSet rs = s . executeQuery ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>Questions<seq2seq4repair_space>WHERE<seq2seq4repair_space>ID<seq2seq4repair_space>=<seq2seq4repair_space>LAST_INSERT_ID();" ) ; rs . next ( ) ; id = rs . getInt ( "ID" ) ; } public int getQuestionId ( ) { } public abstract String generatePromptHtml ( ) { } public abstract String generateAnswerAreaHtml ( ) { } public abstract int getCorrectPoints ( QuizSession session ) throws SQLException { } public abstract String getCorrectResults ( QuizSession session ) throws SQLException { } public abstract int getTotalPointsPossible ( ) { } public abstract String generateChangeQuestionHtml ( ) { } public abstract void changeQuestion ( HttpServletRequest req ) throws SQLException { } protected abstract void parseFromXml ( Element xmlNode ) throws Question . LoadException , SQLException { } protected abstract void loadQuestionFromDB ( String data ) throws Question . LoadException { } }

Fix:
s . executeUpdate ( String . format ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>Questions<seq2seq4repair_space>(QuizID,<seq2seq4repair_space>QuestionType,<seq2seq4repair_space>" + "QuestionNumber,<seq2seq4repair_space>Question)<seq2seq4repair_space>VALUES<seq2seq4repair_space>(%d,<seq2seq4repair_space>%d,<seq2seq4repair_space>%d,<seq2seq4repair_space>'%s');" ) , q . getId ( ) , questionType , q . updateTotalQuestions ( ) , toDataString ( ) ) ) ;