Program: 63038
Project: 63038
Buggy source:
@Test public void testStudentConstructor() throws TeammatesException {
  verifyExceptionForStudentCreation("String_Node_Str",null,"String_Node_Str",Common.ERRORCODE_NULL_PARAMETER);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str",null,Common.ERRORCODE_NULL_PARAMETER);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  Student expected;
  expected=generateTypicalStudentObject();
  String enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INVALID_CHARS);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INCORRECTLY_FORMATTED_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INCORRECTLY_FORMATTED_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INCORRECTLY_FORMATTED_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  String longTeamName=Common.generateStringOfLength(Common.TEAM_NAME_MAX_LENGTH + 1);
  verifyExceptionForStudentCreation("String_Node_Str",longTeamName + "String_Node_Str","String_Node_Str",Common.ERRORCODE_STRING_TOO_LONG);
  String longStudentName=Common.generateStringOfLength(Common.STUDENT_NAME_MAX_LENGTH + 1);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str" + longStudentName + "String_Node_Str","String_Node_Str",Common.ERRORCODE_STRING_TOO_LONG);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INVALID_EMAIL);
  String longComment=Common.generateStringOfLength(Common.COMMENT_MAX_LENGTH + 1);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str" + longComment,"String_Node_Str",Common.ERRORCODE_STRING_TOO_LONG);
  expected=generateTypicalStudentObject();
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  expected=generateTypicalStudentObject();
  expected.setComments("String_Node_Str");
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  expected=generateTypicalStudentObject();
  expected.setTeamName("String_Node_Str");
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testStudentConstructor() throws TeammatesException {
  verifyExceptionForStudentCreation("String_Node_Str",null,"String_Node_Str",Common.ERRORCODE_NULL_PARAMETER);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str",null,Common.ERRORCODE_NULL_PARAMETER);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  Student expected;
  expected=generateTypicalStudentObject();
  String enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INVALID_CHARS);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INCORRECTLY_FORMATTED_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INCORRECTLY_FORMATTED_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INCORRECTLY_FORMATTED_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_EMPTY_STRING);
  String longTeamName=Common.generateStringOfLength(Common.TEAM_NAME_MAX_LENGTH + 1);
  verifyExceptionForStudentCreation("String_Node_Str",longTeamName + "String_Node_Str","String_Node_Str",Common.ERRORCODE_STRING_TOO_LONG);
  String longStudentName=Common.generateStringOfLength(Common.STUDENT_NAME_MAX_LENGTH + 1);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str" + longStudentName + "String_Node_Str","String_Node_Str",Common.ERRORCODE_STRING_TOO_LONG);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str","String_Node_Str",Common.ERRORCODE_INVALID_EMAIL);
  String longComment=Common.generateStringOfLength(Common.COMMENT_MAX_LENGTH + 1);
  verifyExceptionForStudentCreation("String_Node_Str","String_Node_Str" + longComment,"String_Node_Str",Common.ERRORCODE_STRING_TOO_LONG);
  expected=generateTypicalStudentObject();
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  expected=generateTypicalStudentObject();
  expected.setComments(null);
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
  expected=generateTypicalStudentObject();
  expected.setTeamName(null);
  enrollmentLine="String_Node_Str";
  verifyStudentContent(expected,new Student(enrollmentLine,"String_Node_Str"));
}