Buggy code:
public class StudentProblemHistory { private static Logger logger = Logger . getLogger ( StudentProblemHistory . class ) ; private List < StudentProblemData > history ; private StudentProblemData curProb ; public StudentProblemHistory ( ) { } public StudentProblemHistory ( Connection conn , int studId ) throws SQLException { } public StudentProblemData beginProblem ( SessionManager smgr , BeginProblemEvent e ) throws SQLException { StudentState state = smgr . getStudentState ( ) ; long now = System . currentTimeMillis ( ) ; int topicId = ( ( state . getStudentSelectedTopic ( ) ) != ( - 1 ) ) ? state . getStudentSelectedTopic ( ) : state . getCurTopic ( ) ; if ( topicId < 0 ) { StudentProblemHistory . logger . error ( ( ( "StudentProblemHistory.beginProblem:<seq2seq4repair_space>ILLEGAL<seq2seq4repair_space>TOPIC<seq2seq4repair_space>ID<seq2seq4repair_space>" + topicId ) + "<seq2seq4repair_space>passed<seq2seq4repair_space>from<seq2seq4repair_space>client.<seq2seq4repair_space>Replacing<seq2seq4repair_space>with<seq2seq4repair_space>dummy<seq2seq4repair_space>value." ) ) ; topicId = DbTopics . getDummyTopic ( smgr . getConnection ( ) ) ; state . setCurTopic ( topicId ) ; } String params = "" ; Problem p = ProblemMgr . getProblem ( state . getCurProblem ( ) ) ; if ( ( p != null ) && ( p . isParametrized ( ) ) ) { params = state . getProblemBinding ( ) ; } <START_BUG> DbStudentProblemHistory . beginProblem ( smgr . getConnection ( ) , e . getSessionId ( ) , smgr . getStudentId ( ) , state . getCurProblem ( ) , topicId , now , smgr . getTimeInSession ( ) , ( now - ( state . getTutorEntryTime ( ) ) ) , state . getCurProblemMode ( ) , params , smgr . getCollaboratingWithStudId ( ) ) ; <END_BUG> curProb = new StudentProblemData ( state . getCurProblem ( ) , state . getCurTopic ( ) , e . getSessionId ( ) , now , smgr . getTimeInSession ( ) , ( now - ( state . getTutorEntryTime ( ) ) ) , state . getCurProblemMode ( ) ) ; addProblem ( curProb ) ; return curProb ; } public StudentEffort getEffort ( int thisSessionId ) { } public void endProblem ( SessionManager smgr , StudentProblemData curProbData , int topicId ) throws Exception { } public void attempt ( SessionManager smgr , boolean isCorrect , long probElapsedTime ) throws SQLException { } public void hint ( SessionManager smgr , long probElapsedTime , boolean givesSolution ) throws SQLException { } public void updateEmotions ( SessionManager smgr , String emotion , int level ) throws SQLException { } public void addProblem ( StudentProblemData d ) { } public StudentProblemData getCurProblem ( ) { } public List < StudentProblemData > getHistory ( ) { } public List < StudentProblemData > getReverseHistory ( ) { } public int getTimesEncountered ( int probId ) { } public List < StudentProblemData > getTopicHistory ( int topicID , int withinNDays ) { } public List < StudentProblemData > getTopicHistoryMostRecentEncounters ( int topicID ) { } public List < StudentProblemData > getTopicHistory ( int topicID ) { } public List < String > getTopicProblemsSeen ( int topicId ) { } public List < String > getTopicProblemsSolved ( int topicId ) { } public int getNumPracticeProbsSeenInTopicAcrossSessions ( int topicID ) { } }

Fix:
DbStudentProblemHistory . beginProblem ( smgr . getConnection ( ) , e . getSessionId ( ) , smgr . getStudentId ( ) , state . getCurProblem ( ) , topicId , now , smgr . getTimeInSession ( ) , ( now - ( state . getTutorEntryTime ( ) ) ) , state . getCurProblemMode ( ) , params , smgr . getCollaboratingWith ( ) ) ;