Buggy code:
public class QuizManager { private Connection con ; public QuizManager ( Connection con ) { } public void addQuiz ( String name , String description , int author , String category , String tags , boolean random , boolean pages , boolean correction , int points ) { } public void updateQuiz ( String name , String description , String category , String tags , boolean random , boolean pages , boolean correction , int quiz_id ) { } public int getIDByName ( String name ) { } public String getQuizNameByID ( int id ) { } public Quiz getQuizByID ( int quiz_id ) { } public ArrayList < Quiz > getQuizzes ( ) { } public int numTimesTaken ( int quiz_id ) { } public double avgQuizScore ( int quiz_id ) { } public int quizRange ( int quiz_id ) { } public ArrayList < Quiz > getPopularQuizzes ( ) { } public void updateQuizPoints ( int quiz_id , int points ) { } public int getQuizPoints ( int quiz_id ) { } public String convertToPercStr ( double score , double total ) { } public double calculateRating ( int quiz_id ) { } public void addQuizResult ( int quiz_id , int user_id , int score , int total , int rating , String review , String name , Timestamp time_taken ) { } public ArrayList < QuizHistory > getQuizHistory ( int quiz_id , int user_id , String type ) { } public boolean checkQuizReported ( int quiz_id ) { } public void reportQuiz ( int quiz_id ) { } public void unreportQuiz ( int quiz_id ) { } public boolean authorAchievement ( int user_id ) { } public boolean quizTakerAchievement ( int user_id ) { } public boolean practiceMakesPerfect ( int user_id ) { boolean achievementAdded = false ; try { Statement selectStmt = con . createStatement ( ) ; <START_BUG> ResultSet rs = selectStmt . executeQuery ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>achievements<seq2seq4repair_space>WHERE<seq2seq4repair_space>user_id<seq2seq4repair_space>=<seq2seq4repair_space>\"" + user_id ) + "\"<seq2seq4repair_space>AND<seq2seq4repair_space>description<seq2seq4repair_space>=<seq2seq4repair_space>Practice<seq2seq4repair_space>Makes<seq2seq4repair_space>Perfect" ) ) ; <END_BUG> if ( rs == null ) { PreparedStatement insertStmt = con . prepareStatement ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>achievements<seq2seq4repair_space>(user_id,<seq2seq4repair_space>description)<seq2seq4repair_space>VALUES<seq2seq4repair_space>(?,<seq2seq4repair_space>?)" ) ; insertStmt . setInt ( 1 , user_id ) ; insertStmt . setString ( 2 , "Practice<seq2seq4repair_space>Makes<seq2seq4repair_space>Perfect" ) ; insertStmt . executeUpdate ( ) ; achievementAdded = true ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; } return achievementAdded ; } public boolean iAmGreatestAchievement ( int user_id , int quiz_id , int score ) { } public ArrayList < String > getAchievements ( int user_id ) { } public ArrayList < Quiz > getMostRecentlyCreatedQuizzes ( ) { } }

Fix:
ResultSet rs = selectStmt . executeQuery ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>achievements<seq2seq4repair_space>WHERE<seq2seq4repair_space>user_id<seq2seq4repair_space>=<seq2seq4repair_space>\"" + user_id ) + "\"<seq2seq4repair_space>AND<seq2seq4repair_space>description<seq2seq4repair_space>=<seq2seq4repair_space>\"Practice<seq2seq4repair_space>Makes<seq2seq4repair_space>Perfect\"" ) ) ;