Program: 63002
Project: 63002
Buggy source:
@Test public void testEditSubmission() throws Exception {
  restoreTypicalDataInDatastore();
  String methodName="String_Node_Str";
  Class<?>[] paramTypes=new Class<?>[]{SubmissionData.class};
  SubmissionData s=new SubmissionData();
  s.course="String_Node_Str";
  s.evaluation="String_Node_Str";
  s.reviewer="String_Node_Str";
  Object[] params=new Object[]{s};
  loginAsAdmin("String_Node_Str");
  EvaluationData evaluation=logic.getEvaluation(s.course,s.evaluation);
  assertEquals(EvalStatus.OPEN,evaluation.getStatus());
  logoutUser();
  verifyCannotAccess(USER_TYPE_NOT_LOGGED_IN,methodName,"String_Node_Str",paramTypes,params);
  verifyCannotAccess(USER_TYPE_UNREGISTERED,methodName,"String_Node_Str",paramTypes,params);
  verifyCannotAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCannotAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  loginAsAdmin("String_Node_Str");
  evaluation.endTime=Common.getDateOffsetToCurrentTime(-1);
  assertEquals(EvalStatus.CLOSED,evaluation.getStatus());
  logic.editEvaluation(evaluation);
  logoutUser();
  verifyCannotAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  ______TS("String_Node_Str");
  restoreTypicalDataInDatastore();
  SubmissionData sub1=dataBundle.submissions.get("String_Node_Str");
  alterSubmission(sub1);
  invokeEditSubmission(sub1);
  verifyPresentInDatastore(sub1);
  ______TS("String_Node_Str");
  try {
    invokeEditSubmission(null);
  }
 catch (  Exception e) {
    assertEquals(NullPointerException.class,e.getCause().getClass());
  }
  ______TS("String_Node_Str");
  sub1.evaluation="String_Node_Str";
  try {
    invokeEditSubmission(sub1);
  }
 catch (  Exception e) {
    assertEquals(EntityDoesNotExistException.class,e.getCause().getClass());
  }
}

Fixed version (ground truth):
@Test public void testEditSubmission() throws Exception {
  restoreTypicalDataInDatastore();
  String methodName="String_Node_Str";
  Class<?>[] paramTypes=new Class<?>[]{SubmissionData.class};
  SubmissionData s=new SubmissionData();
  s.course="String_Node_Str";
  s.evaluation="String_Node_Str";
  s.reviewer="String_Node_Str";
  Object[] params=new Object[]{s};
  loginAsAdmin("String_Node_Str");
  EvaluationData evaluation=logic.getEvaluation(s.course,s.evaluation);
  assertEquals(EvalStatus.OPEN,evaluation.getStatus());
  logoutUser();
  verifyCannotAccess(USER_TYPE_NOT_LOGGED_IN,methodName,"String_Node_Str",paramTypes,params);
  verifyCannotAccess(USER_TYPE_UNREGISTERED,methodName,"String_Node_Str",paramTypes,params);
  verifyCannotAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCannotAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  loginAsAdmin("String_Node_Str");
  evaluation.endTime=Common.getDateOffsetToCurrentTime(-1);
  assertEquals(EvalStatus.CLOSED,evaluation.getStatus());
  BackDoorLogic backDoorLogic=new BackDoorLogic();
  backDoorLogic.editEvaluation(evaluation);
  logoutUser();
  verifyCannotAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  ______TS("String_Node_Str");
  restoreTypicalDataInDatastore();
  SubmissionData sub1=dataBundle.submissions.get("String_Node_Str");
  alterSubmission(sub1);
  invokeEditSubmission(sub1);
  verifyPresentInDatastore(sub1);
  ______TS("String_Node_Str");
  try {
    invokeEditSubmission(null);
  }
 catch (  Exception e) {
    assertEquals(NullPointerException.class,e.getCause().getClass());
  }
  ______TS("String_Node_Str");
  sub1.evaluation="String_Node_Str";
  try {
    invokeEditSubmission(sub1);
  }
 catch (  Exception e) {
    assertEquals(EntityDoesNotExistException.class,e.getCause().getClass());
  }
}