Program: 63003
Project: 63003
Buggy source:
@Test public void testGetEvauationResultForStudent() throws Exception {
  CourseData course=dataBundle.courses.get("String_Node_Str");
  EvaluationData evaluation=dataBundle.evaluations.get("String_Node_Str");
  String student1email="String_Node_Str";
  ______TS("String_Node_Str");
  restoreTypicalDataInDatastore();
  String methodName="String_Node_Str";
  Class<?>[] paramTypes=new Class<?>[]{String.class,String.class,String.class};
  Object[] params=new Object[]{course.id,evaluation.name,student1email};
  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",evaluation.name,student1email});
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  loginAsAdmin("String_Node_Str");
  evaluation.endTime=Common.getDateOffsetToCurrentTime(-1);
  evaluation.published=true;
  logic.editEvaluation(evaluation);
  logoutUser();
  verifyCannotAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  ______TS("String_Node_Str");
  restoreTypicalDataInDatastore();
  course=dataBundle.courses.get("String_Node_Str");
  evaluation=dataBundle.evaluations.get("String_Node_Str");
  student1email="String_Node_Str";
  loginAsAdmin("String_Node_Str");
  setPointsForSubmissions(new int[][]{{100,100,100,100},{110,110,NSU,110},{NSB,NSB,NSB,NSB},{70,80,110,120}});
  EvalResultData result=logic.getEvaluationResultForStudent(course.id,evaluation.name,student1email);
  assertEquals(student1email,result.getOwnerEmail());
  assertEquals(100,result.claimedFromStudent);
  assertEquals(100,result.claimedToCoord);
  assertEquals(90,result.perceivedToCoord);
  assertEquals(90,result.perceivedToStudent);
  int teamSize=4;
  assertEquals(teamSize,result.outgoing.size());
  assertEquals(teamSize,result.incoming.size());
  assertEquals(teamSize,result.selfEvaluations.size());
  assertEquals("String_Node_Str",result.outgoing.get(0).reviewee);
  assertEquals("String_Node_Str",result.outgoing.get(1).reviewee);
  assertEquals("String_Node_Str",result.outgoing.get(2).reviewee);
  assertEquals("String_Node_Str",result.outgoing.get(3).reviewee);
  String feedback1=result.incoming.get(0).p2pFeedback.getValue();
  String feedback2=result.incoming.get(1).p2pFeedback.getValue();
  String feedback3=result.incoming.get(2).p2pFeedback.getValue();
  String feedback4=result.incoming.get(3).p2pFeedback.getValue();
  assertTrue(0 > feedback1.compareTo(feedback2));
  assertTrue(0 > feedback2.compareTo(feedback3));
  assertTrue(0 > feedback3.compareTo(feedback4));
  assertEquals("String_Node_Str",result.incoming.get(0).reviewer);
  assertEquals("String_Node_Str",result.incoming.get(1).reviewer);
  assertEquals("String_Node_Str",result.incoming.get(2).reviewer);
  assertEquals("String_Node_Str",result.incoming.get(3).reviewer);
  assertEquals(100,result.outgoing.get(1).points);
  assertEquals(NSB,result.incoming.get(0).points);
  assertEquals(113,result.incoming.get(0).normalized);
  assertEquals("String_Node_Str",result.selfEvaluations.get(0).justification.getValue());
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent(null,"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  NullPointerException e) {
  }
  try {
    logic.getEvaluationResultForStudent("String_Node_Str",null,"String_Node_Str");
    fail();
  }
 catch (  NullPointerException e) {
  }
  try {
    logic.getEvaluationResultForStudent("String_Node_Str","String_Node_Str",null);
    fail();
  }
 catch (  NullPointerException e) {
  }
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent("String_Node_Str",evaluation.name,student1email);
    fail();
  }
 catch (  EntityDoesNotExistException e) {
    BaseTestCase.assertContains("String_Node_Str",e.getMessage().toLowerCase());
  }
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent(course.id,"String_Node_Str",student1email);
    fail();
  }
 catch (  EntityDoesNotExistException e) {
    BaseTestCase.assertContains("String_Node_Str",e.getMessage().toLowerCase());
  }
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent(course.id,evaluation.name,"String_Node_Str");
    fail();
  }
 catch (  EntityDoesNotExistException e) {
    BaseTestCase.assertContains("String_Node_Str",e.getMessage().toLowerCase());
  }
  ______TS("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testGetEvauationResultForStudent() throws Exception {
  CourseData course=dataBundle.courses.get("String_Node_Str");
  EvaluationData evaluation=dataBundle.evaluations.get("String_Node_Str");
  String student1email="String_Node_Str";
  ______TS("String_Node_Str");
  restoreTypicalDataInDatastore();
  String methodName="String_Node_Str";
  Class<?>[] paramTypes=new Class<?>[]{String.class,String.class,String.class};
  Object[] params=new Object[]{course.id,evaluation.name,student1email};
  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",evaluation.name,student1email});
  verifyCanAccess(USER_TYPE_COORD,methodName,"String_Node_Str",paramTypes,params);
  loginAsAdmin("String_Node_Str");
  evaluation.endTime=Common.getDateOffsetToCurrentTime(-1);
  evaluation.published=true;
  BackDoorLogic backDoorLogic=new BackDoorLogic();
  backDoorLogic.editEvaluation(evaluation);
  logoutUser();
  verifyCannotAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  verifyCanAccess(USER_TYPE_STUDENT,methodName,"String_Node_Str",paramTypes,params);
  ______TS("String_Node_Str");
  restoreTypicalDataInDatastore();
  course=dataBundle.courses.get("String_Node_Str");
  evaluation=dataBundle.evaluations.get("String_Node_Str");
  student1email="String_Node_Str";
  loginAsAdmin("String_Node_Str");
  setPointsForSubmissions(new int[][]{{100,100,100,100},{110,110,NSU,110},{NSB,NSB,NSB,NSB},{70,80,110,120}});
  EvalResultData result=logic.getEvaluationResultForStudent(course.id,evaluation.name,student1email);
  assertEquals(student1email,result.getOwnerEmail());
  assertEquals(100,result.claimedFromStudent);
  assertEquals(100,result.claimedToCoord);
  assertEquals(90,result.perceivedToCoord);
  assertEquals(90,result.perceivedToStudent);
  int teamSize=4;
  assertEquals(teamSize,result.outgoing.size());
  assertEquals(teamSize,result.incoming.size());
  assertEquals(teamSize,result.selfEvaluations.size());
  assertEquals("String_Node_Str",result.outgoing.get(0).reviewee);
  assertEquals("String_Node_Str",result.outgoing.get(1).reviewee);
  assertEquals("String_Node_Str",result.outgoing.get(2).reviewee);
  assertEquals("String_Node_Str",result.outgoing.get(3).reviewee);
  String feedback1=result.incoming.get(0).p2pFeedback.getValue();
  String feedback2=result.incoming.get(1).p2pFeedback.getValue();
  String feedback3=result.incoming.get(2).p2pFeedback.getValue();
  String feedback4=result.incoming.get(3).p2pFeedback.getValue();
  assertTrue(0 > feedback1.compareTo(feedback2));
  assertTrue(0 > feedback2.compareTo(feedback3));
  assertTrue(0 > feedback3.compareTo(feedback4));
  assertEquals("String_Node_Str",result.incoming.get(0).reviewer);
  assertEquals("String_Node_Str",result.incoming.get(1).reviewer);
  assertEquals("String_Node_Str",result.incoming.get(2).reviewer);
  assertEquals("String_Node_Str",result.incoming.get(3).reviewer);
  assertEquals(100,result.outgoing.get(1).points);
  assertEquals(NSB,result.incoming.get(0).points);
  assertEquals(113,result.incoming.get(0).normalized);
  assertEquals("String_Node_Str",result.selfEvaluations.get(0).justification.getValue());
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent(null,"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  NullPointerException e) {
  }
  try {
    logic.getEvaluationResultForStudent("String_Node_Str",null,"String_Node_Str");
    fail();
  }
 catch (  NullPointerException e) {
  }
  try {
    logic.getEvaluationResultForStudent("String_Node_Str","String_Node_Str",null);
    fail();
  }
 catch (  NullPointerException e) {
  }
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent("String_Node_Str",evaluation.name,student1email);
    fail();
  }
 catch (  EntityDoesNotExistException e) {
    BaseTestCase.assertContains("String_Node_Str",e.getMessage().toLowerCase());
  }
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent(course.id,"String_Node_Str",student1email);
    fail();
  }
 catch (  EntityDoesNotExistException e) {
    BaseTestCase.assertContains("String_Node_Str",e.getMessage().toLowerCase());
  }
  ______TS("String_Node_Str");
  try {
    logic.getEvaluationResultForStudent(course.id,evaluation.name,"String_Node_Str");
    fail();
  }
 catch (  EntityDoesNotExistException e) {
    BaseTestCase.assertContains("String_Node_Str",e.getMessage().toLowerCase());
  }
  ______TS("String_Node_Str");
}