Program: 62832
Project: 62832
Buggy source:
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertPostParamNotNull(Const.ParamsNames.COURSE_ID,courseId);
  String studentEmail=getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL);
  Assumption.assertPostParamNotNull(Const.ParamsNames.STUDENT_EMAIL,studentEmail);
  boolean isFromCommentsPage=getRequestParamAsBoolean(Const.ParamsNames.FROM_COMMENTS_PAGE);
  boolean isFromStudentDetailsPage=getRequestParamAsBoolean(Const.ParamsNames.FROM_STUDENT_DETAILS_PAGE);
  boolean isFromCourseDetailsPage=getRequestParamAsBoolean(Const.ParamsNames.FROM_COURSE_DETAILS_PAGE);
  String commentText=getRequestParamValue(Const.ParamsNames.COMMENT_TEXT);
  Assumption.assertPostParamNotNull(Const.ParamsNames.COMMENT_TEXT,commentText);
  Assumption.assertNotEmpty(commentText);
  verifyAccessibleByInstructor(courseId);
  CommentAttributes comment=extractCommentData();
  try {
    CommentAttributes createdComment=logic.createComment(comment);
    logic.putDocument(createdComment);
    statusToUser.add(Const.StatusMessages.COMMENT_ADDED);
    statusToAdmin="String_Node_Str" + comment.recipients + "String_Node_Str"+ comment.courseId+ "String_Node_Str"+ "String_Node_Str"+ comment.commentText;
  }
 catch (  EntityAlreadyExistsException e) {
    Assumption.fail("String_Node_Str");
  }
catch (  InvalidParametersException e) {
    statusToUser.add(e.getMessage());
    statusToAdmin=e.getMessage();
    isError=true;
  }
  if (isFromCommentsPage) {
    return createRedirectResult((new PageData(account).getInstructorCommentsLink()) + "String_Node_Str" + Const.ParamsNames.COURSE_ID+ "String_Node_Str"+ courseId);
  }
 else   if (isFromStudentDetailsPage) {
    return createRedirectResult(getCourseStudentDetailsLink(courseId,studentEmail));
  }
 else   if (isFromCourseDetailsPage) {
    return createRedirectResult(new PageData(account).getInstructorCourseDetailsLink(courseId));
  }
 else {
    return createRedirectResult(new PageData(account).getInstructorStudentRecordsLink(courseId,studentEmail));
  }
}

Fixed version (ground truth):
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertPostParamNotNull(Const.ParamsNames.COURSE_ID,courseId);
  String studentEmail=getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL);
  boolean isFromCommentsPage=getRequestParamAsBoolean(Const.ParamsNames.FROM_COMMENTS_PAGE);
  boolean isFromStudentDetailsPage=getRequestParamAsBoolean(Const.ParamsNames.FROM_STUDENT_DETAILS_PAGE);
  boolean isFromCourseDetailsPage=getRequestParamAsBoolean(Const.ParamsNames.FROM_COURSE_DETAILS_PAGE);
  boolean isFromStudentRecordsPage=!isFromCommentsPage && !isFromStudentDetailsPage && !isFromCourseDetailsPage;
  if (isFromStudentDetailsPage || isFromStudentRecordsPage) {
    Assumption.assertPostParamNotNull(Const.ParamsNames.STUDENT_EMAIL,studentEmail);
  }
  String commentText=getRequestParamValue(Const.ParamsNames.COMMENT_TEXT);
  Assumption.assertPostParamNotNull(Const.ParamsNames.COMMENT_TEXT,commentText);
  Assumption.assertNotEmpty(commentText);
  verifyAccessibleByInstructor(courseId);
  CommentAttributes comment=extractCommentData();
  try {
    CommentAttributes createdComment=logic.createComment(comment);
    logic.putDocument(createdComment);
    statusToUser.add(Const.StatusMessages.COMMENT_ADDED);
    statusToAdmin="String_Node_Str" + comment.recipients + "String_Node_Str"+ comment.courseId+ "String_Node_Str"+ "String_Node_Str"+ comment.commentText;
  }
 catch (  EntityAlreadyExistsException e) {
    Assumption.fail("String_Node_Str");
  }
catch (  InvalidParametersException e) {
    statusToUser.add(e.getMessage());
    statusToAdmin=e.getMessage();
    isError=true;
  }
  if (isFromCommentsPage) {
    return createRedirectResult((new PageData(account).getInstructorCommentsLink()) + "String_Node_Str" + Const.ParamsNames.COURSE_ID+ "String_Node_Str"+ courseId);
  }
 else   if (isFromStudentDetailsPage) {
    return createRedirectResult(getCourseStudentDetailsLink(courseId,studentEmail));
  }
 else   if (isFromCourseDetailsPage) {
    return createRedirectResult(new PageData(account).getInstructorCourseDetailsLink(courseId));
  }
 else {
    return createRedirectResult(new PageData(account).getInstructorStudentRecordsLink(courseId,studentEmail));
  }
}