Source:
public void execute() { String courseId = getRequestParamValue(ParamsNames.COURSE_ID); Assumption.assertPostParamNotNull(ParamsNames.COURSE_ID, courseId); String sessionName = getRequestParamValue(ParamsNames.FEEDBACK_SESSION_NAME); Assumption.assertPostParamNotNull(ParamsNames.COURSE_ID, sessionName); String enrollmentDetails = getRequestParamValue(ParamsNames.ENROLLMENT_DETAILS); Assumption.assertPostParamNotNull(ParamsNames.ENROLLMENT_DETAILS, enrollmentDetails); log.info("Adjusting submissions for feedback session :" + sessionName + "in course : " + courseId); FeedbackSessionAttributes feedbackSession = logic.getFeedbackSession(sessionName, courseId); String errorString = "Error encountered while adjusting feedback session responses of %s in course %s: %s%n%s"; if (feedbackSession == null) { log.severe(String.format(errorString, sessionName, courseId, "feedback session is null", "")); setForRetry(); return; } List<FeedbackResponseAttributes> allResponses = logic.getFeedbackResponsesForSession(feedbackSession.getFeedbackSessionName(), feedbackSession.getCourseId()); List<StudentEnrollDetails> enrollmentList = JsonUtils.fromJson(enrollmentDetails, new TypeToken<List<StudentEnrollDetails>>(){}.getType()); for (FeedbackResponseAttributes response : allResponses) { try { logic.adjustFeedbackResponseForEnrollments(enrollmentList, response); } catch (Exception e) { UserType userType = new GateKeeper().getCurrentUser(); log.severe(String.format(errorString, sessionName, courseId, e.getMessage(), ActivityLogEntry.generateServletActionFailureLogMessage(request, e, userType))); setForRetry(); return; } } }

Target:
public void execute() { String courseId = getRequestParamValue(ParamsNames.COURSE_ID); Assumption.assertPostParamNotNull(ParamsNames.COURSE_ID, courseId); String sessionName = getRequestParamValue(ParamsNames.FEEDBACK_SESSION_NAME); Assumption.assertPostParamNotNull(ParamsNames.FEEDBACK_SESSION_NAME, sessionName); String enrollmentDetails = getRequestParamValue(ParamsNames.ENROLLMENT_DETAILS); Assumption.assertPostParamNotNull(ParamsNames.ENROLLMENT_DETAILS, enrollmentDetails); log.info("Adjusting submissions for feedback session :" + sessionName + "in course : " + courseId); FeedbackSessionAttributes feedbackSession = logic.getFeedbackSession(sessionName, courseId); String errorString = "Error encountered while adjusting feedback session responses of %s in course %s: %s%n%s"; if (feedbackSession == null) { log.severe(String.format(errorString, sessionName, courseId, "feedback session is null", "")); setForRetry(); return; } List<FeedbackResponseAttributes> allResponses = logic.getFeedbackResponsesForSession(feedbackSession.getFeedbackSessionName(), feedbackSession.getCourseId()); List<StudentEnrollDetails> enrollmentList = JsonUtils.fromJson(enrollmentDetails, new TypeToken<List<StudentEnrollDetails>>(){}.getType()); for (FeedbackResponseAttributes response : allResponses) { try { logic.adjustFeedbackResponseForEnrollments(enrollmentList, response); } catch (Exception e) { String url = HttpRequestHelper.getRequestedUrl(request); Map<String, String[]> params = HttpRequestHelper.getParameterMap(request); String logMessage = new LogMessageGenerator().generateActionFailureLogMessage(url, params, e, null); log.severe(String.format(errorString, sessionName, courseId, e.getMessage(), logMessage)); setForRetry(); return; } } }