Program: 62985
Project: 62985
Buggy source:
@Test public void testGetEvalListForCoord() throws Exception {
  restoreTypicalDataInDatastore();
  ______TS("String_Node_Str");
  String methodName="String_Node_Str";
  Class<?>[] paramTypes=new Class<?>[]{String.class};
  Object[] params=new Object[]{"String_Node_Str"};
  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);
  verifyCannotAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,new Object[]{"String_Node_Str"});
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  ______TS("String_Node_Str");
  CoordData coord1=dataBundle.coords.get("String_Node_Str");
  ArrayList<EvaluationData> evalList=logic.getEvaluationsListForCoord(coord1.id);
  assertEquals(3,evalList.size());
  for (  EvaluationData ed : evalList) {
    assertTrue(ed.course.contains("String_Node_Str"));
  }
  ______TS("String_Node_Str");
  loginAsAdmin("String_Node_Str");
  CoordData coord2=dataBundle.coords.get("String_Node_Str");
  evalList=logic.getEvaluationsListForCoord(coord2.id);
  assertEquals(1,evalList.size());
  for (  EvaluationData ed : evalList) {
    assertTrue(ed.course.contains("String_Node_Str"));
  }
  ______TS("String_Node_Str");
  CoordData coord3=dataBundle.coords.get("String_Node_Str");
  evalList=logic.getEvaluationsListForCoord(coord3.id);
  assertEquals(0,evalList.size());
  ______TS("String_Node_Str");
  verifyNullPointerException(methodName,"String_Node_Str",paramTypes,new Object[]{null});
  ______TS("String_Node_Str");
  verifyEntityDoesNotExistException(methodName,paramTypes,new Object[]{"String_Node_Str"});
}

Fixed version (ground truth):
@Test public void testGetEvalListForCoord() throws Exception {
  restoreTypicalDataInDatastore();
  ______TS("String_Node_Str");
  String methodName="String_Node_Str";
  Class<?>[] paramTypes=new Class<?>[]{String.class};
  Object[] params=new Object[]{"String_Node_Str"};
  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);
  verifyCannotAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,new Object[]{"String_Node_Str"});
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  ______TS("String_Node_Str");
  CoordData coord1=dataBundle.coords.get("String_Node_Str");
  ArrayList<EvaluationData> evalList=logic.getEvaluationsListForCoord(coord1.id);
  assertEquals(3,evalList.size());
  EvaluationData evaluation=dataBundle.evaluations.get("String_Node_Str");
  for (  EvaluationData ed : evalList) {
    assertTrue(ed.course.contains("String_Node_Str"));
    if (ed.name.equals(evaluation.name)) {
      assertEquals(5,ed.expectedTotal);
      assertEquals(3,ed.submittedTotal);
    }
  }
  ______TS("String_Node_Str");
  StudentData student=dataBundle.students.get("String_Node_Str");
  student.team="String_Node_Str";
  logic.editStudent(student.email,student);
  evalList=logic.getEvaluationsListForCoord(coord1.id);
  assertEquals(3,evalList.size());
  for (  EvaluationData ed : evalList) {
    if (ed.name.equals(evaluation.name)) {
      assertEquals(5,ed.expectedTotal);
      assertEquals(2,ed.submittedTotal);
    }
  }
  ______TS("String_Node_Str");
  loginAsAdmin("String_Node_Str");
  CoordData coord2=dataBundle.coords.get("String_Node_Str");
  evalList=logic.getEvaluationsListForCoord(coord2.id);
  assertEquals(1,evalList.size());
  for (  EvaluationData ed : evalList) {
    assertTrue(ed.course.contains("String_Node_Str"));
  }
  ______TS("String_Node_Str");
  CoordData coord3=dataBundle.coords.get("String_Node_Str");
  evalList=logic.getEvaluationsListForCoord(coord3.id);
  assertEquals(0,evalList.size());
  ______TS("String_Node_Str");
  verifyNullPointerException(methodName,"String_Node_Str",paramTypes,new Object[]{null});
  ______TS("String_Node_Str");
  verifyEntityDoesNotExistException(methodName,paramTypes,new Object[]{"String_Node_Str"});
}