Source:
protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); statusToAdmin = "Show instructor feedback result page<br>" + "Session Name: " + feedbackSessionName + "<br>" + "Course ID: " + courseId; if(courseId == null || feedbackSessionName == null) { return createRedirectResult(Const.ActionURIs.INSTRUCTOR_HOME_PAGE); } InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, account.googleId); FeedbackSessionAttributes session = logic.getFeedbackSession(feedbackSessionName, courseId); boolean isCreatorOnly = true; new GateKeeper().verifyAccessible( instructor, session, !isCreatorOnly); InstructorFeedbackResultsPageData data = new InstructorFeedbackResultsPageData(account); data.instructor = instructor; data.bundle = logic.getFeedbackSessionResultsForInstructor(feedbackSessionName, courseId, data.instructor.email); if(data.bundle == null) { throw new EntityDoesNotExistException( "Feedback session " + feedbackSessionName + " does not exist in " + courseId + "."); } data.sortType = getRequestParamValue(Const.ParamsNames.FEEDBACK_RESULTS_SORTTYPE); if (data.sortType != null && data.sortType.equals("table")){ return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_TABLE, data); } else if (data.sortType != null && data.sortType.equals("giver")) { return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_GIVER, data); } else { return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_RECIPIENT, data); } }

Target:
protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); Assumption.assertNotNull(courseId); Assumption.assertNotNull(feedbackSessionName); statusToAdmin = "Show instructor feedback result page<br>" + "Session Name: " + feedbackSessionName + "<br>" + "Course ID: " + courseId; InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, account.googleId); FeedbackSessionAttributes session = logic.getFeedbackSession(feedbackSessionName, courseId); boolean isCreatorOnly = true; new GateKeeper().verifyAccessible( instructor, session, !isCreatorOnly); InstructorFeedbackResultsPageData data = new InstructorFeedbackResultsPageData(account); data.instructor = instructor; data.bundle = logic.getFeedbackSessionResultsForInstructor(feedbackSessionName, courseId, data.instructor.email); if(data.bundle == null) { throw new EntityDoesNotExistException( "Feedback session " + feedbackSessionName + " does not exist in " + courseId + "."); } data.sortType = getRequestParamValue(Const.ParamsNames.FEEDBACK_RESULTS_SORTTYPE); if (data.sortType == null) { return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_RECIPIENT, data); } if (data.sortType.equals("table")){ return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_TABLE, data); } else if (data.sortType.equals("recipient")) { return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_RECIPIENT, data); } else if (data.sortType.equals("giver")) { return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_GIVER, data); } else { return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESULTS_BY_RECIPIENT, data); } }