Program: 19323
Project: 19323
Buggy source:
@Test public void invokeAllSetValueShouldCallGetExpiry(){
  CountingExpiryPolicy expiryPolicy=new CountingExpiryPolicy();
  expiryPolicyServer.setExpiryPolicy(expiryPolicy);
  MutableConfiguration<Integer,Integer> config=new MutableConfiguration<>();
  config.setExpiryPolicyFactory(FactoryBuilder.factoryOf(expiryPolicyClient));
  Cache<Integer,Integer> cache=getCacheManager().createCache(getTestCacheName(),config);
  final Integer INITIAL_KEY=123;
  final Integer MAX_KEY_VALUE=INITIAL_KEY + 4;
  final Integer setValue=456;
  final Integer modifySetValue=789;
  Set<Integer> keys=new HashSet<>();
  int createdCount=0;
  for (int key=INITIAL_KEY; key <= MAX_KEY_VALUE; key++) {
    keys.add(key);
    if (key <= MAX_KEY_VALUE - 2) {
      cache.put(key,setValue);
      createdCount++;
    }
  }
  assertThat(expiryPolicy.getCreationCount(),greaterThanOrEqualTo(createdCount));
  assertThat(expiryPolicy.getAccessCount(),is(0));
  assertThat(expiryPolicy.getUpdatedCount(),is(0));
  expiryPolicy.resetCount();
  Map<Integer,Integer> resultMap=cache.invokeAll(keys,new SetEntryProcessor<Integer,Integer,Integer>(setValue));
  assertThat(expiryPolicy.getCreationCount(),greaterThanOrEqualTo(keys.size() - createdCount));
  assertThat(expiryPolicy.getAccessCount(),is(0));
  assertThat(expiryPolicy.getUpdatedCount(),greaterThanOrEqualTo(createdCount));
  expiryPolicy.resetCount();
  cache.invokeAll(keys,new GetEntryProcessor<Integer,Integer,Integer>());
  assertThat(expiryPolicy.getCreationCount(),is(0));
  assertThat(expiryPolicy.getAccessCount(),greaterThanOrEqualTo(keys.size()));
  assertThat(expiryPolicy.getUpdatedCount(),is(0));
}

Fixed version (ground truth):
@Test public void invokeAllSetValueShouldCallGetExpiry(){
  CountingExpiryPolicy expiryPolicy=new CountingExpiryPolicy();
  expiryPolicyServer.setExpiryPolicy(expiryPolicy);
  MutableConfiguration<Integer,Integer> config=new MutableConfiguration<>();
  config.setExpiryPolicyFactory(FactoryBuilder.factoryOf(expiryPolicyClient));
  Cache<Integer,Integer> cache=getCacheManager().createCache(getTestCacheName(),config);
  final Integer INITIAL_KEY=123;
  final Integer MAX_KEY_VALUE=INITIAL_KEY + 4;
  final Integer setValue=456;
  final Integer modifySetValue=789;
  Set<Integer> keys=new HashSet<>();
  int createdCount=0;
  for (int key=INITIAL_KEY; key <= MAX_KEY_VALUE; key++) {
    keys.add(key);
    if (key <= MAX_KEY_VALUE - 2) {
      cache.put(key,setValue);
      createdCount++;
    }
  }
  assertThat(expiryPolicy.getCreationCount(),greaterThanOrEqualTo(createdCount));
  assertThat(expiryPolicy.getAccessCount(),is(0));
  assertThat(expiryPolicy.getUpdatedCount(),is(0));
  expiryPolicy.resetCount();
  Map<Integer,Integer> resultMap=cache.invokeAll(keys,new SetEntryProcessor<Integer,Integer>(setValue));
  assertThat(expiryPolicy.getCreationCount(),greaterThanOrEqualTo(keys.size() - createdCount));
  assertThat(expiryPolicy.getAccessCount(),is(0));
  assertThat(expiryPolicy.getUpdatedCount(),greaterThanOrEqualTo(createdCount));
  expiryPolicy.resetCount();
  cache.invokeAll(keys,new GetEntryProcessor<Integer,Integer>());
  assertThat(expiryPolicy.getCreationCount(),is(0));
  assertThat(expiryPolicy.getAccessCount(),greaterThanOrEqualTo(keys.size()));
  assertThat(expiryPolicy.getUpdatedCount(),is(0));
}