Program: 62850
Project: 62850
Buggy source:
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  String feedbackSessionName=getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);
  String previewInstructorEmail=getRequestParamValue(Const.ParamsNames.PREVIEWAS);
  Assumption.assertNotNull(String.format(Const.StatusMessages.NULL_POST_PARAMETER_MESSAGE,Const.ParamsNames.COURSE_ID),courseId);
  Assumption.assertNotNull(String.format(Const.StatusMessages.NULL_POST_PARAMETER_MESSAGE,Const.ParamsNames.FEEDBACK_SESSION_NAME),feedbackSessionName);
  Assumption.assertNotNull(String.format(Const.StatusMessages.NULL_POST_PARAMETER_MESSAGE,Const.ParamsNames.PREVIEWAS),previewInstructorEmail);
  new GateKeeper().verifyAccessible(logic.getInstructorForGoogleId(courseId,account.googleId),logic.getFeedbackSession(feedbackSessionName,courseId),true);
  InstructorAttributes previewInstructor=logic.getInstructorForEmail(courseId,previewInstructorEmail);
  if (previewInstructor == null) {
    throw new EntityDoesNotExistException("String_Node_Str" + previewInstructorEmail + "String_Node_Str"+ courseId+ "String_Node_Str");
  }
  FeedbackSubmissionEditPageData data=new FeedbackSubmissionEditPageData(account,student);
  data.bundle=logic.getFeedbackSessionQuestionsBundleForInstructor(feedbackSessionName,courseId,previewInstructor.email);
  if (data.bundle == null) {
    throw new EntityDoesNotExistException("String_Node_Str" + feedbackSessionName + "String_Node_Str"+ courseId+ "String_Node_Str");
  }
  data.isSessionOpenForSubmission=true;
  data.isPreview=true;
  data.previewInstructor=previewInstructor;
  data.bundle.resetAllResponses();
  statusToAdmin="String_Node_Str" + previewInstructor.email + "String_Node_Str"+ "String_Node_Str"+ feedbackSessionName+ "String_Node_Str"+ "String_Node_Str"+ courseId;
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_SUBMISSION_EDIT,data);
}

Fixed version (ground truth):
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  String feedbackSessionName=getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);
  String previewInstructorEmail=getRequestParamValue(Const.ParamsNames.PREVIEWAS);
  Assumption.assertNotNull(String.format(Const.StatusMessages.NULL_POST_PARAMETER_MESSAGE,Const.ParamsNames.COURSE_ID),courseId);
  Assumption.assertNotNull(String.format(Const.StatusMessages.NULL_POST_PARAMETER_MESSAGE,Const.ParamsNames.FEEDBACK_SESSION_NAME),feedbackSessionName);
  Assumption.assertNotNull(String.format(Const.StatusMessages.NULL_POST_PARAMETER_MESSAGE,Const.ParamsNames.PREVIEWAS),previewInstructorEmail);
  new GateKeeper().verifyAccessible(logic.getInstructorForGoogleId(courseId,account.googleId),logic.getFeedbackSession(feedbackSessionName,courseId),false,Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION);
  InstructorAttributes previewInstructor=logic.getInstructorForEmail(courseId,previewInstructorEmail);
  if (previewInstructor == null) {
    throw new EntityDoesNotExistException("String_Node_Str" + previewInstructorEmail + "String_Node_Str"+ courseId+ "String_Node_Str");
  }
  FeedbackSubmissionEditPageData data=new FeedbackSubmissionEditPageData(account,student);
  data.bundle=logic.getFeedbackSessionQuestionsBundleForInstructor(feedbackSessionName,courseId,previewInstructor.email);
  if (data.bundle == null) {
    throw new EntityDoesNotExistException("String_Node_Str" + feedbackSessionName + "String_Node_Str"+ courseId+ "String_Node_Str");
  }
  data.isSessionOpenForSubmission=true;
  data.isPreview=true;
  data.previewInstructor=previewInstructor;
  data.bundle.resetAllResponses();
  statusToAdmin="String_Node_Str" + previewInstructor.email + "String_Node_Str"+ "String_Node_Str"+ feedbackSessionName+ "String_Node_Str"+ "String_Node_Str"+ courseId;
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_SUBMISSION_EDIT,data);
}