Buggy code:
public class MPPTutorHandler { private ServletInfo info ; private SessionManager smgr ; private boolean showMPP ; public MPPTutorHandler ( ServletInfo servletInfo , SessionManager smgr ) throws SQLException { } public void handleRequest ( MPPTopicEvent e ) throws Exception { StudentState state = smgr . getStudentState ( ) ; if ( e instanceof MPPReturnToHutEvent ) { String lastProbType = state . getCurProbType ( ) ; if ( lastProbType != null ) { if ( ( lastProbType . equalsIgnoreCase ( FLASH_PROB_TYPE ) ) || ( lastProbType . equalsIgnoreCase ( HTML_PROB_TYPE ) ) ) { Problem p = ProblemMgr . getProblem ( Integer . parseInt ( ( ( MPPReturnToHutEvent ) ( e ) ) . getProbId ( ) ) ) ; ProblemResponse r = new ProblemResponse ( p ) ; if ( ( ! ( p . isIntro ( ) ) ) && ( ! ( state . isProblemSolved ( ) ) ) ) { <START_BUG> new edu . umass . ckc . wo . html . tutor . TutorPage ( info , smgr ) . createTutorPageForResumingPreviousProblem ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) , r , "practice" , state . getCurProbType ( ) , true , null , null , false , p . getId ( ) , this . showMPP ) ; <END_BUG> new edu . umass . ckc . wo . log . TutorLogger ( smgr ) . logMPPEvent ( e , p . getId ( ) ) ; return ; } } } PedagogicalModel pedMod = smgr . getPedagogicalModel ( ) ; NextProblemEvent npe = new NextProblemEvent ( e . getElapsedTime ( ) , 0 ) ; Response r = pedMod . processNextProblemRequest ( npe ) ; if ( r instanceof ProblemResponse ) new edu . umass . ckc . wo . html . tutor . TutorPage ( info , smgr ) . createTutorPageFromState ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) , ( ( ProblemResponse ) ( r ) ) , "practice" , state . getCurProbType ( ) , true , ( ( ProblemResponse ) ( r ) ) . getProblem ( ) . getResource ( ) , null , false , state . getCurProblem ( ) , this . showMPP ) ; else if ( r instanceof InterventionResponse ) new edu . umass . ckc . wo . html . tutor . TutorPage ( info , smgr ) . createTutorPageFromState ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) , ( ( InterventionResponse ) ( r ) ) , "practice" , state . getCurProbType ( ) , true , null , null , false , state . getCurProblem ( ) , this . showMPP ) ; new edu . umass . ckc . wo . log . TutorLogger ( smgr ) . logMPPEvent ( e , state . getCurProblem ( ) ) ; } else if ( e instanceof MPPContinueTopicEvent ) { smgr . getStudentState ( ) . setInReviewMode ( false ) ; smgr . getStudentState ( ) . setInChallengeMode ( false ) ; PedagogicalModel pedMod = smgr . getPedagogicalModel ( ) ; NextProblemEvent npe = new NextProblemEvent ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) ) ; e . setUserInput ( Integer . toString ( e . getTopicId ( ) ) ) ; String typ = smgr . getStudentState ( ) . getCurProbType ( ) ; int lastProbId = smgr . getStudentState ( ) . getCurProblem ( ) ; ProblemResponse r = pedMod . getProblemInTopicSelectedByStudent ( npe ) ; Problem p = r . getProblem ( ) ; smgr . getStudentModel ( ) . newProblem ( state , p ) ; smgr . getStudentState ( ) . setCurProblem ( lastProbId ) ; smgr . getStudentModel ( ) . save ( ) ; int temp = smgr . getStudentState ( ) . getCurProblem ( ) ; new edu . umass . ckc . wo . html . tutor . TutorPage ( info , smgr ) . createTutorPageFromState ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) , r , "practice" , typ , true , p . getResource ( ) , null , false , lastProbId , this . showMPP ) ; new edu . umass . ckc . wo . log . TutorLogger ( smgr ) . logMPPEvent ( e , lastProbId ) ; } else if ( e instanceof MPPReviewTopicEvent ) { smgr . getStudentState ( ) . setInChallengeMode ( false ) ; PedagogicalModel pedMod = smgr . getPedagogicalModel ( ) ; NextProblemEvent npe = new NextProblemEvent ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) ) ; npe . setMode ( REVIEW_MODE ) ; int lastProbId = smgr . getStudentState ( ) . getCurProblem ( ) ; String typ = smgr . getStudentState ( ) . getCurProbType ( ) ; ProblemResponse r = pedMod . getReviewProblem ( npe ) ; Problem p = r . getProblem ( ) ; if ( ( e . getTopicId ( ) ) != ( smgr . getStudentState ( ) . getCurTopic ( ) ) ) smgr . getStudentState ( ) . newTopic ( ) ; e . setUserInput ( Integer . toString ( e . getTopicId ( ) ) ) ; smgr . getStudentModel ( ) . newProblem ( state , p ) ; smgr . getStudentModel ( ) . save ( ) ; new edu . umass . ckc . wo . html . tutor . TutorPage ( info , smgr ) . createTutorPageFromState ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) , r , "practice" , typ , true , p . getResource ( ) , null , false , lastProbId , this . showMPP ) ; new edu . umass . ckc . wo . log . TutorLogger ( smgr ) . logMPPEvent ( e , lastProbId ) ; }

Fix:
new edu . umass . ckc . wo . html . tutor . TutorPage ( info , smgr ) . createTutorPageForResumingPreviousProblem ( e . getElapsedTime ( ) , 0 , e . getTopicId ( ) , r , "practice" , state . getCurProbType ( ) , true , p . getResource ( ) , null , false , p . getId ( ) , this . showMPP ) ;