Program: 67420
Project: 67420
Buggy source:
public void addTests(){
  addTest(new CacheExpiryAPITest());
  TimeToLiveCacheInvalidationPolicy ttlPolicy=new TimeToLiveCacheInvalidationPolicy(0);
  AutoVerifyTestCase test=new CacheExpiryPolicyTest(ttlPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ttlPolicy=new TimeToLiveCacheInvalidationPolicy(100000);
  test=new CacheExpiryPolicyTest(ttlPolicy,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ttlPolicy=new TimeToLiveCacheInvalidationPolicy(-100000);
  test=new CacheExpiryPolicyTest(ttlPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  Calendar calendar=new GregorianCalendar();
  calendar.add(GregorianCalendar.MILLISECOND,-1);
  DailyCacheInvalidationPolicy dPolicy=new DailyCacheInvalidationPolicy(calendar.get(Calendar.HOUR_OF_DAY),calendar.get(Calendar.MINUTE),calendar.get(Calendar.SECOND),calendar.get(Calendar.MILLISECOND));
  test=new CacheExpiryPolicyTest(dPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  calendar=new GregorianCalendar();
  dPolicy=new DailyCacheInvalidationPolicy(calendar.get(Calendar.HOUR_OF_DAY),calendar.get(Calendar.MINUTE),calendar.get(Calendar.SECOND),calendar.get(Calendar.MILLISECOND));
  test=new CacheExpiryPolicyTest(dPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  calendar=new GregorianCalendar();
  calendar.add(GregorianCalendar.HOUR_OF_DAY,1);
  dPolicy=new DailyCacheInvalidationPolicy(calendar.get(Calendar.HOUR_OF_DAY),calendar.get(Calendar.MINUTE),calendar.get(Calendar.SECOND),calendar.get(Calendar.MILLISECOND));
  test=new CacheExpiryPolicyTest(dPolicy,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new CacheExpiryPolicyTest(new NoExpiryCacheInvalidationPolicy(),false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  long oneDay=1000 * 60 * 60* 24;
  long minusOneDay=-1 * oneDay;
  test=new DailyCacheExpiryTest(oneDay + 1000,0,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new DailyCacheExpiryTest(minusOneDay - 100,minusOneDay - 1000,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new DailyCacheExpiryTest(0,(3 * minusOneDay) - 1000,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new DailyCacheExpiryTest(3 * oneDay,0,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  addTest(new NoExpiryInvalidationTest());
  PopulationManager manager=PopulationManager.getDefaultManager();
  Employee employeeToRead=(Employee)manager.getObject(Employee.class,"String_Node_Str");
  ReadObjectQuery query=new ReadObjectQuery(employeeToRead);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  query=new ReadObjectQuery(employeeToRead);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  query=new ReadObjectQuery(Employee.class);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ExpressionBuilder exactPKBuilder=new ExpressionBuilder();
  Expression exactPK=exactPKBuilder.get("String_Node_Str").equal(employeeToRead.getId());
  query=new ReadObjectQuery(Employee.class,exactPK);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ExpressionBuilder inExactPKBuilder=new ExpressionBuilder();
  Expression inExactPK=inExactPKBuilder.get("String_Node_Str").equal(employeeToRead.getFirstName());
  inExactPK=inExactPK.and(inExactPKBuilder.get("String_Node_Str").equal(employeeToRead.getLastName()));
  inExactPK=inExactPK.and(inExactPKBuilder.get("String_Node_Str").equal(employeeToRead.getId()));
  query=new ReadObjectQuery(Employee.class,inExactPK);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new CacheExpiryReadAllQueryTest(true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new CacheExpiryReadAllQueryTest(false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  addTest(new ReadAllQueryCheckCacheOnlyExpiryTest());
  addTest(new ReadObjectCheckCacheOnlyExpiryTest());
  addTest(new RefreshQueryCacheExpiryTest());
  addTest(new RefreshIfNewerVersionTest());
  test=new UpdateQueryChangeExpiryTest(false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new UpdateQueryChangeExpiryTest(true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  addTest(new ReadAllQueryConformExpiryTest());
  addTest(new ReadObjectQueryConformExpiryTest());
  addTest(new CacheExpiryValueholderTest());
  addTest(new UnitOfWorkExpiredObjectTest());
  addTest(new CacheExpiryUnitOfWorkReadTest());
  addTest(new UnitOfWorkCreateObjectReadTimeTest());
  addTest(new SessionCreateObjectReadTimeTest());
  addTest(new InvalidateClassRecurseOptionTest(true));
  addTest(new InvalidateClassRecurseOptionTest(false));
  addTest(new InvalidateAllTest());
  addTest(new PrimaryKeyQueryInUOWTest());
}

Fixed version (ground truth):
public void addTests(){
  addTest(new CacheExpiryAPITest());
  TimeToLiveCacheInvalidationPolicy ttlPolicy=new TimeToLiveCacheInvalidationPolicy(0);
  AutoVerifyTestCase test=new CacheExpiryPolicyTest(ttlPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ttlPolicy=new TimeToLiveCacheInvalidationPolicy(100000);
  test=new CacheExpiryPolicyTest(ttlPolicy,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ttlPolicy=new TimeToLiveCacheInvalidationPolicy(-100000);
  test=new CacheExpiryPolicyTest(ttlPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  Calendar calendar=new GregorianCalendar();
  calendar.add(GregorianCalendar.MILLISECOND,-1);
  DailyCacheInvalidationPolicy dPolicy=new DailyCacheInvalidationPolicy(calendar.get(Calendar.HOUR_OF_DAY),calendar.get(Calendar.MINUTE),calendar.get(Calendar.SECOND),calendar.get(Calendar.MILLISECOND));
  test=new CacheExpiryPolicyTest(dPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  calendar=new GregorianCalendar();
  dPolicy=new DailyCacheInvalidationPolicy(calendar.get(Calendar.HOUR_OF_DAY),calendar.get(Calendar.MINUTE),calendar.get(Calendar.SECOND),calendar.get(Calendar.MILLISECOND));
  test=new CacheExpiryPolicyTest(dPolicy,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  calendar=new GregorianCalendar();
  calendar.add(GregorianCalendar.HOUR_OF_DAY,1);
  dPolicy=new DailyCacheInvalidationPolicy(calendar.get(Calendar.HOUR_OF_DAY),calendar.get(Calendar.MINUTE),calendar.get(Calendar.SECOND),calendar.get(Calendar.MILLISECOND));
  test=new CacheExpiryPolicyTest(dPolicy,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new CacheExpiryPolicyTest(new NoExpiryCacheInvalidationPolicy(),false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  long oneDay=1000 * 60 * 60* 24;
  long minusOneDay=-1 * oneDay;
  test=new DailyCacheExpiryTest(oneDay + 1000,0,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new DailyCacheExpiryTest(minusOneDay - 100,minusOneDay - 1000,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new DailyCacheExpiryTest(0,(3 * minusOneDay) - 1000,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new DailyCacheExpiryTest(3 * oneDay,0,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  addTest(new NoExpiryInvalidationTest());
  PopulationManager manager=PopulationManager.getDefaultManager();
  Employee employeeToRead=(Employee)manager.getObject(Employee.class,"String_Node_Str");
  ReadObjectQuery query=new ReadObjectQuery(employeeToRead);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  query=new ReadObjectQuery(employeeToRead);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  query=new ReadObjectQuery(Employee.class);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ExpressionBuilder exactPKBuilder=new ExpressionBuilder();
  Expression exactPK=exactPKBuilder.get("String_Node_Str").equal(employeeToRead.getId());
  query=new ReadObjectQuery(Employee.class,exactPK);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  ExpressionBuilder inExactPKBuilder=new ExpressionBuilder();
  Expression inExactPK=inExactPKBuilder.get("String_Node_Str").equal(employeeToRead.getFirstName());
  inExactPK=inExactPK.and(inExactPKBuilder.get("String_Node_Str").equal(employeeToRead.getLastName()));
  inExactPK=inExactPK.and(inExactPKBuilder.get("String_Node_Str").equal(employeeToRead.getId()));
  query=new ReadObjectQuery(Employee.class,inExactPK);
  query.checkCacheThenDatabase();
  test=new CacheExpiryReadObjectQueryTest(employeeToRead,query,false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new CacheExpiryReadAllQueryTest(true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new CacheExpiryReadAllQueryTest(false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  addTest(new ReadAllQueryCheckCacheOnlyExpiryTest());
  addTest(new ReadObjectCheckCacheOnlyExpiryTest());
  addTest(new RefreshQueryCacheExpiryTest());
  addTest(new RefreshIfNewerVersionTest());
  test=new UpdateQueryChangeExpiryTest(false);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  test=new UpdateQueryChangeExpiryTest(true);
  test.setDescription("String_Node_Str");
  test.setName("String_Node_Str");
  addTest(test);
  addTest(new ReadAllQueryConformExpiryTest());
  addTest(new ReadObjectQueryConformExpiryTest());
  addTest(new CacheExpiryValueholderTest());
  addTest(new UnitOfWorkExpiredObjectTest());
  addTest(new CacheExpiryUnitOfWorkReadTest());
  addTest(new UnitOfWorkCreateObjectReadTimeTest());
  addTest(new SessionCreateObjectReadTimeTest());
  addTest(new InvalidateClassRecurseOptionTest(true));
  addTest(new InvalidateClassRecurseOptionTest(false));
  addTest(new InvalidateAllTest());
  addTest(new PrimaryKeyQueryInUOWTest());
  addTest(new UnitOfWorkRefreshAfterInvalidationTest());
}