Buggy code:
public class RockPaperScissorsPage { public static final String MyID = "RPS" ; public static Pattern Regex = Pattern . compile ( "//RPS" ) ; private static Map < Long , RPSManager > RPSGames = new HashMap < > ( ) ; private static RPSMoveSet RPSRules = RPSMoveSet . ClassicRockPaperScissors ; public static Route DummyGetPage ( HttpServletRequest request ) { } public static Route getPage ( long roomID , HttpServletRequest request , String URI , UserModel userM ) { <START_BUG> Route toReturn = Route . RedirectToUrl ( ( ( request . getContextPath ( ) ) + "//login" ) ) ; <END_BUG> RPSManager rpsGame = new RPSManager ( ) ; if ( RockPaperScissorsPage . RPSGames . containsKey ( roomID ) ) { rpsGame = RockPaperScissorsPage . RPSGames . get ( roomID ) ; } if ( ( rpsGame . getP1 ( ) ) == null ) { rpsGame . setP1 ( userM ) ; RockPaperScissorsPage . updateGames ( roomID , rpsGame ) ; } else if ( ( ( rpsGame . getP2 ( ) ) == null ) && ( ( rpsGame . getP1 ( ) . getUser ( ) . getID ( ) ) != ( userM . getID ( ) ) ) ) { rpsGame . setP2 ( userM ) ; RockPaperScissorsPage . updateGames ( roomID , rpsGame ) ; } boolean userIsPlayer1 = ( userM . getID ( ) ) == ( rpsGame . getP1 ( ) . getUser ( ) . getID ( ) ) ; RPSManager . RPSUser player = ( userIsPlayer1 ) ? rpsGame . getP1 ( ) : rpsGame . getP2 ( ) ; if ( ( ( rpsGame . getP2 ( ) ) != null ) && ( ( rpsGame . getP2 ( ) . getIndex ( ) ) > 0 ) ) { String doneWithGame = request . getParameter ( "DoneWithGame" ) ; rpsGame . getP1 ( ) . setDoneWithGame ( ( doneWithGame != null ) ) ; rpsGame . getP2 ( ) . setDoneWithGame ( ( doneWithGame != null ) ) ; if ( ( rpsGame . getP1 ( ) . isReadyToStartNewGame ( ) ) && ( rpsGame . getP2 ( ) . isReadyToStartNewGame ( ) ) ) { rpsGame . setCurrentMove ( new utils . Tuple ( ) ) ; } } if ( player . isDoneWithGame ( ) ) { RockPaperScissorsPage . updateGames ( roomID , rpsGame ) ; toReturn = Route . RedirectToUrl ( ( ( ( request . getContextPath ( ) ) + "//accountInformation//" ) + ( userM . getID ( ) ) ) ) ; } else if ( player . isReadyToStartNewGame ( ) ) { player . setReadyToStartNewGame ( false ) ; RPSStartModel startModel ; if ( ( ( rpsGame . getP1 ( ) ) != null ) && ( ( rpsGame . getP2 ( ) ) != null ) ) { startModel = new RPSStartModel ( player . getUser ( ) , ( userIsPlayer1 ? rpsGame . getP2 ( ) : rpsGame . getP1 ( ) ) . getUser ( ) ) ; } else { startModel = new RPSStartModel ( player . getUser ( ) , new UserModel ( "dummy" , "dummy" , "dummy" , "dummy" , "dummy" ) ) ; } toReturn = Route . ForwardToUrl ( "//WEB-INF//RPSStart.jsp" , startModel ) ; } else { String rpsMoveStr = request . getParameter ( "RPSMove" ) ; if ( ( rpsMoveStr == null ) || ( rpsMoveStr . isEmpty ( ) ) ) { if ( ( ( rpsGame . getCurrentMove ( ) . getFirst ( ) ) != null ) && ( ( rpsGame . getCurrentMove ( ) . getSecond ( ) ) != null ) ) { rpsGame . addMove ( rpsGame . getCurrentMove ( ) ) ; RockPaperScissorsPage . updateGames ( roomID , rpsGame ) ; MoveResponse moveResponse = RockPaperScissorsPage . RPSRules . getResponse ( rpsGame . getCurrentMove ( ) . getFirst ( ) , rpsGame . getCurrentMove ( ) . getSecond ( ) ) ; RPSResultsModel resultsModel = new RPSResultsModel ( rpsGame , moveResponse , userIsPlayer1 ) ; player . setReadyToStartNewGame ( true ) ; toReturn = Route . ForwardToUrl ( "//WEB-INF//RPSResults.jsp" , resultsModel ) ; } else if ( ( userIsPlayer1 && ( ( rpsGame . getP1 ( ) . getLastSavedMove ( ) ) != null ) ) || ( ( ! userIsPlayer1 ) && ( ( rpsGame . getP2 ( ) . getLastSavedMove ( ) ) != null ) ) ) { toReturn = Route . ForwardToUrl ( "//WEB-INF//RPSWaitForOtherPlayerDecision.jsp" ) ; } } else { toReturn = Route . ForwardToUrl ( "//WEB-INF//RPSWaitForOtherPlayerDecision.jsp" ) ; RockPaperScissorsPage . updateGames ( roomID , rpsGame ) ; RPSMove rpsMove = RPSMove . fromString ( rpsMoveStr ) ; if ( ( ( rpsGame . getP1 ( ) ) != null ) && ( ( rpsGame . getP2 ( ) ) != null ) ) { if ( ( ( rpsGame . getCurrentMove ( ) . getFirst ( ) ) == null ) || ( ( rpsGame . getCurrentMove ( ) . getSecond ( ) ) == null ) ) { if ( userIsPlayer1 ) { if ( ( rpsGame . getP1 ( ) . getIndex ( ) ) <= ( rpsGame . getP2 ( ) . getIndex ( ) ) ) { rpsGame . getCurrentMove ( ) . setFirst ( rpsMove ) ; rpsGame . getP1 ( ) . setIndex ( ( ( rpsGame . getP1 ( ) . getIndex ( ) ) + 1 ) ) ; rpsGame . getP1 ( ) . setLastSavedMove ( rpsMove ) ; RockPaperScissorsPage . updateGames ( roomID , rpsGame ) ; } } else { if ( ( rpsGame . getP2 ( ) . getIndex ( ) ) <= ( rpsGame . getP1 ( ) . getIndex ( ) ) ) { rpsGame . getCurrentMove ( ) . setSecond ( rpsMove ) ;

Fix:
Route toReturn = Route . ForwardToUrl ( "//WEB-INF//RPSStart.jsp" , new UserModel ( "dummy" , "dummy" , "dummy" , "dummy" , "dummy" ) ) ;