Program: 189397
Project: 189397
Buggy source:
/** 
 * Test that action logs are generated appropriately.
 * @throws InterruptedException 
 */
@Test public void testActionLogGeneration() throws InterruptedException {
  Submission sub=subRepo.createSubmission(person).save();
  sub.setCommitteeContactEmail("String_Node_Str");
  Date now=new Date();
  State initialState=stateManager.getInitialState();
  State nextState=initialState.getTransitions(sub).get(0);
  sub.setState(nextState);
  sub.save();
  sub.setStudentFirstName("String_Node_Str");
  sub.setStudentLastName("String_Node_Str");
  sub.setStudentMiddleName("String_Node_Str");
  sub.setStudentBirthYear(2002);
  sub.setDocumentTitle("String_Node_Str");
  sub.setDocumentAbstract("String_Node_Str");
  sub.setDocumentKeywords("String_Node_Str");
  sub.setDocumentLanguage("String_Node_Str");
  sub.setPublishedMaterial("String_Node_Str");
  sub.setCommitteeContactEmail("String_Node_Str");
  sub.setCommitteeEmailHash("String_Node_Str");
  sub.setCommitteeApprovalDate(now);
  sub.setCommitteeEmbargoApprovalDate(now);
  sub.setSubmissionDate(now);
  sub.setApprovalDate(now);
  sub.setLicenseAgreementDate(now);
  sub.setDegree("String_Node_Str");
  sub.setDegreeLevel(DegreeLevel.UNDERGRADUATE);
  sub.setDepartment("String_Node_Str");
  sub.setProgram("String_Node_Str");
  sub.setCollege("String_Node_Str");
  sub.setMajor("String_Node_Str");
  sub.setDocumentType("String_Node_Str");
  sub.setGraduationMonth(0);
  sub.setGraduationYear(2002);
  sub.setUMIRelease(false);
  sub.setDepositId("String_Node_Str");
  sub.setReviewerNotes("String_Node_Str");
  sub.setDocumentTitle(null);
  sub.setDocumentAbstract(null);
  sub.setDocumentKeywords(null);
  sub.setDocumentLanguage(null);
  sub.setPublishedMaterial(null);
  sub.setCommitteeContactEmail(null);
  sub.setCommitteeEmailHash(null);
  sub.setCommitteeApprovalDate(null);
  sub.setCommitteeEmbargoApprovalDate(null);
  sub.setSubmissionDate(null);
  sub.setApprovalDate(null);
  sub.setLicenseAgreementDate(null);
  sub.setDegree(null);
  sub.setDegreeLevel(null);
  sub.setDepartment(null);
  sub.setProgram(null);
  sub.setCollege(null);
  sub.setMajor(null);
  sub.setDocumentType(null);
  sub.setGraduationMonth(null);
  sub.setGraduationYear(null);
  sub.setUMIRelease(null);
  sub.setDepositId(null);
  sub.setReviewerNotes(null);
  sub.save();
  List<ActionLog> logs=subRepo.findActionLog(sub);
  Iterator<ActionLog> logItr=logs.iterator();
  sub.delete();
  DateFormat format=new SimpleDateFormat("String_Node_Str");
  String formattedDate=format.format(now);
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str" + formattedDate,logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertFalse(logItr.hasNext());
  assertEquals("String_Node_Str",sub.getLastLogEntry());
}

Fixed version (ground truth):
/** 
 * Test that action logs are generated appropriately.
 * @throws InterruptedException 
 */
@Test public void testActionLogGeneration() throws InterruptedException {
  Submission sub=subRepo.createSubmission(person).save();
  sub.setCommitteeContactEmail("String_Node_Str");
  Date now=new Date();
  State initialState=stateManager.getInitialState();
  State nextState=initialState.getTransitions(sub).get(0);
  sub.setState(nextState);
  sub.save();
  sub.setStudentFirstName("String_Node_Str");
  sub.setStudentLastName("String_Node_Str");
  sub.setStudentMiddleName("String_Node_Str");
  sub.setStudentBirthYear(2002);
  sub.setDocumentTitle("String_Node_Str");
  sub.setDocumentAbstract("String_Node_Str");
  sub.setDocumentKeywords("String_Node_Str");
  sub.setDocumentLanguage("String_Node_Str");
  sub.addDocumentSubject("String_Node_Str");
  sub.setPublishedMaterial("String_Node_Str");
  sub.setCommitteeContactEmail("String_Node_Str");
  sub.setCommitteeEmailHash("String_Node_Str");
  sub.setCommitteeApprovalDate(now);
  sub.setCommitteeEmbargoApprovalDate(now);
  sub.setSubmissionDate(now);
  sub.setApprovalDate(now);
  sub.setLicenseAgreementDate(now);
  sub.setDegree("String_Node_Str");
  sub.setDegreeLevel(DegreeLevel.UNDERGRADUATE);
  sub.setDepartment("String_Node_Str");
  sub.setProgram("String_Node_Str");
  sub.setCollege("String_Node_Str");
  sub.setMajor("String_Node_Str");
  sub.setDocumentType("String_Node_Str");
  sub.setGraduationMonth(0);
  sub.setGraduationYear(2002);
  sub.setUMIRelease(false);
  sub.setDepositId("String_Node_Str");
  sub.setReviewerNotes("String_Node_Str");
  sub.save();
  sub.setDocumentTitle(null);
  sub.setDocumentAbstract(null);
  sub.setDocumentKeywords(null);
  sub.setDocumentLanguage(null);
  sub.removeDocumentSubject("String_Node_Str");
  sub.setPublishedMaterial(null);
  sub.setCommitteeContactEmail(null);
  sub.setCommitteeEmailHash(null);
  sub.setCommitteeApprovalDate(null);
  sub.setCommitteeEmbargoApprovalDate(null);
  sub.setSubmissionDate(null);
  sub.setApprovalDate(null);
  sub.setLicenseAgreementDate(null);
  sub.setDegree(null);
  sub.setDegreeLevel(null);
  sub.setDepartment(null);
  sub.setProgram(null);
  sub.setCollege(null);
  sub.setMajor(null);
  sub.setDocumentType(null);
  sub.setGraduationMonth(null);
  sub.setGraduationYear(null);
  sub.setUMIRelease(null);
  sub.setDepositId(null);
  sub.setReviewerNotes(null);
  sub.save();
  List<ActionLog> logs=subRepo.findActionLog(sub);
  Iterator<ActionLog> logItr=logs.iterator();
  sub.delete();
  DateFormat format=new SimpleDateFormat("String_Node_Str");
  String formattedDate=format.format(now);
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str" + formattedDate,logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertEquals("String_Node_Str",logItr.next().getEntry());
  assertFalse(logItr.hasNext());
  assertEquals("String_Node_Str",sub.getLastLogEntry());
}