Program: 62893
Project: 62893
Buggy source:
@Test public void testAdjustFeedbackResponseForEnrollments() throws Exception {
  restoreTypicalDataInDatastore();
  ______TS("String_Node_Str");
  String course1Id=dataBundle.courses.get("String_Node_Str").id;
  StudentAttributes student1InCourse1=dataBundle.students.get("String_Node_Str");
  StudentAttributes student2InCourse1=dataBundle.students.get("String_Node_Str");
  ArrayList<StudentEnrollDetails> enrollmentList=new ArrayList<StudentEnrollDetails>();
  StudentEnrollDetails studentDetails1=new StudentEnrollDetails(StudentAttributes.UpdateStatus.MODIFIED,course1Id,student1InCourse1.email,student1InCourse1.team,student1InCourse1.team + "String_Node_Str");
  enrollmentList.add(studentDetails1);
  FeedbackResponseAttributes feedbackResponse1InBundle=dataBundle.feedbackResponses.get("String_Node_Str");
  FeedbackResponsesLogic frLogic=FeedbackResponsesLogic.inst();
  FeedbackQuestionsLogic fqLogic=FeedbackQuestionsLogic.inst();
  FeedbackQuestionAttributes feedbackQuestionInDb=fqLogic.getFeedbackQuestion(feedbackResponse1InBundle.feedbackSessionName,feedbackResponse1InBundle.courseId,Integer.parseInt(feedbackResponse1InBundle.feedbackQuestionId));
  FeedbackResponseAttributes responseBefore=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  studentsLogic.adjustFeedbackResponseForEnrollments(enrollmentList,responseBefore);
  FeedbackResponseAttributes responseAfter=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  assertEquals(responseBefore.getId(),responseAfter.getId());
  ______TS("String_Node_Str");
  studentDetails1=new StudentEnrollDetails(StudentAttributes.UpdateStatus.MODIFIED,course1Id,student2InCourse1.email,student1InCourse1.team,student1InCourse1.team + "String_Node_Str");
  enrollmentList=new ArrayList<StudentEnrollDetails>();
  enrollmentList.add(studentDetails1);
  feedbackQuestionInDb=fqLogic.getFeedbackQuestion(feedbackResponse1InBundle.feedbackSessionName,feedbackResponse1InBundle.courseId,Integer.parseInt(feedbackResponse1InBundle.feedbackQuestionId));
  responseBefore=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  studentsLogic.adjustFeedbackResponseForEnrollments(enrollmentList,responseBefore);
  responseAfter=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  assertEquals(null,responseAfter);
}

Fixed version (ground truth):
@Test public void testAdjustFeedbackResponseForEnrollments() throws Exception {
  restoreTypicalDataInDatastore();
  ______TS("String_Node_Str");
  String course1Id=dataBundle.courses.get("String_Node_Str").id;
  StudentAttributes student1InCourse1=dataBundle.students.get("String_Node_Str");
  StudentAttributes student2InCourse1=dataBundle.students.get("String_Node_Str");
  ArrayList<StudentEnrollDetails> enrollmentList=new ArrayList<StudentEnrollDetails>();
  StudentEnrollDetails studentDetails1=new StudentEnrollDetails(StudentAttributes.UpdateStatus.MODIFIED,course1Id,student1InCourse1.email,student1InCourse1.team,student1InCourse1.team + "String_Node_Str");
  enrollmentList.add(studentDetails1);
  FeedbackResponseAttributes feedbackResponse1InBundle=dataBundle.feedbackResponses.get("String_Node_Str");
  FeedbackResponsesLogic frLogic=FeedbackResponsesLogic.inst();
  FeedbackQuestionsLogic fqLogic=FeedbackQuestionsLogic.inst();
  FeedbackQuestionAttributes feedbackQuestionInDb=fqLogic.getFeedbackQuestion(feedbackResponse1InBundle.feedbackSessionName,feedbackResponse1InBundle.courseId,Integer.parseInt(feedbackResponse1InBundle.feedbackQuestionId));
  FeedbackResponseAttributes responseBefore=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  studentsLogic.adjustFeedbackResponseForEnrollments(enrollmentList,responseBefore);
  FeedbackResponseAttributes responseAfter=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  assertEquals(responseBefore.getId(),responseAfter.getId());
  ______TS("String_Node_Str");
  enrollmentList=new ArrayList<StudentEnrollDetails>();
  studentDetails1=new StudentEnrollDetails(StudentAttributes.UpdateStatus.UNMODIFIED,course1Id,student1InCourse1.email,student1InCourse1.team,student1InCourse1.team + "String_Node_Str");
  enrollmentList.add(studentDetails1);
  feedbackQuestionInDb=fqLogic.getFeedbackQuestion(feedbackResponse1InBundle.feedbackSessionName,feedbackResponse1InBundle.courseId,Integer.parseInt(feedbackResponse1InBundle.feedbackQuestionId));
  responseBefore=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  studentsLogic.adjustFeedbackResponseForEnrollments(enrollmentList,responseBefore);
  responseAfter=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  assertEquals(responseBefore.getId(),responseAfter.getId());
  ______TS("String_Node_Str");
  studentDetails1=new StudentEnrollDetails(StudentAttributes.UpdateStatus.MODIFIED,course1Id,student2InCourse1.email,student1InCourse1.team,student1InCourse1.team + "String_Node_Str");
  enrollmentList=new ArrayList<StudentEnrollDetails>();
  enrollmentList.add(studentDetails1);
  feedbackQuestionInDb=fqLogic.getFeedbackQuestion(feedbackResponse1InBundle.feedbackSessionName,feedbackResponse1InBundle.courseId,Integer.parseInt(feedbackResponse1InBundle.feedbackQuestionId));
  responseBefore=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  studentsLogic.adjustFeedbackResponseForEnrollments(enrollmentList,responseBefore);
  responseAfter=frLogic.getFeedbackResponse(feedbackQuestionInDb.getId(),feedbackResponse1InBundle.giverEmail,feedbackResponse1InBundle.recipientEmail);
  assertEquals(null,responseAfter);
}