Program: 45724
Project: 45724
Buggy source:
@Test public void testCacheService(){
  Node node=HazelcastStarter.getNode(hz);
  NodeEngineImpl nodeEngine=node.getNodeEngine();
  HazelcastInstanceImpl hazelcastInstance=HazelcastStarter.getHazelcastInstanceImpl(hz);
  SerializationService serializationService=nodeEngine.getSerializationService();
  String key=randomString();
  Data keyData=serializationService.toData(key);
  int partitionId=hz.getPartitionService().getPartition(key).getPartitionId();
  CachingProvider provider=HazelcastServerCachingProvider.createCachingProvider(hazelcastInstance);
  HazelcastCacheManager cacheManager=(HazelcastServerCacheManager)provider.getCacheManager();
  Cache<String,Integer> cache=cacheManager.getCache("String_Node_Str");
  assertNull("String_Node_Str",cache);
  CacheConfig<String,Integer> cacheConfig=new CacheConfig<String,Integer>("String_Node_Str");
  cache=cacheManager.createCache("String_Node_Str",cacheConfig);
  assertNotNull("String_Node_Str",cache);
  cacheManager.getCache("String_Node_Str");
  assertNotNull("String_Node_Str",cache);
  cache.put(key,23);
  CacheService cacheService=nodeEngine.getService(CacheService.SERVICE_NAME);
  String cacheNameWithPrefix=cacheManager.getCacheNameWithPrefix("String_Node_Str");
  ICacheRecordStore recordStore=cacheService.getRecordStore(cacheNameWithPrefix,partitionId);
  assertNotNull("String_Node_Str",recordStore);
  assertEquals("String_Node_Str",1,recordStore.size());
  Object dataValue=recordStore.get(keyData,null);
  assertNotNull("String_Node_Str",dataValue);
  int value=serializationService.toObject(dataValue);
  assertEquals("String_Node_Str",23,value);
  Map<String,EntryProcessorResult<Integer>> resultMap;
  int result;
  result=cache.invoke(key,new IntegerValueEntryProcessor());
  assertEquals("String_Node_Str",-23,result);
  result=cache.invoke(key,new IntegerValueEntryProcessor(),42);
  assertEquals("String_Node_Str",42,result);
  resultMap=cache.invokeAll(Collections.singleton(key),new IntegerValueEntryProcessor());
  result=resultMap.get(key).get();
  assertEquals("String_Node_Str",-23,result);
  resultMap=cache.invokeAll(Collections.singleton(key),new IntegerValueEntryProcessor(),42);
  result=resultMap.get(key).get();
  assertEquals("String_Node_Str",42,result);
  assertTrue("String_Node_Str",cache.containsKey(key));
  cache.clear();
  assertFalse("String_Node_Str",cache.containsKey(key));
  cacheManager.destroyCache("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testCacheService(){
  Node node=HazelcastStarter.getNode(hz);
  NodeEngineImpl nodeEngine=node.getNodeEngine();
  HazelcastInstanceImpl hazelcastInstance=HazelcastStarter.getHazelcastInstanceImpl(hz);
  SerializationService serializationService=nodeEngine.getSerializationService();
  String key=randomString();
  Data keyData=serializationService.toData(key);
  int partitionId=hz.getPartitionService().getPartition(key).getPartitionId();
  CachingProvider provider=HazelcastServerCachingProvider.createCachingProvider(hazelcastInstance);
  HazelcastCacheManager cacheManager=(HazelcastServerCacheManager)provider.getCacheManager();
  Cache<String,Integer> cache=cacheManager.getCache("String_Node_Str");
  assertNull("String_Node_Str",cache);
  CacheConfig<String,Integer> cacheConfig=new CacheConfig<String,Integer>("String_Node_Str");
  cache=cacheManager.createCache("String_Node_Str",cacheConfig);
  assertNotNull("String_Node_Str",cache);
  cacheManager.getCache("String_Node_Str");
  assertNotNull("String_Node_Str",cache);
  cache.put(key,23);
  CacheService cacheService=nodeEngine.getService(CacheService.SERVICE_NAME);
  String cacheNameWithPrefix=cacheManager.getCacheNameWithPrefix("String_Node_Str");
  ICacheRecordStore recordStore=cacheService.getRecordStore(cacheNameWithPrefix,partitionId);
  assertNotNull("String_Node_Str",recordStore);
  assertEquals("String_Node_Str",1,recordStore.size());
  Object dataValue=recordStore.get(keyData,null);
  assertNotNull("String_Node_Str",dataValue);
  Integer value=serializationService.toObject(dataValue);
  assertNotNull("String_Node_Str",value);
  assertEquals("String_Node_Str",23,(int)value);
  Map<String,EntryProcessorResult<Integer>> resultMap;
  int result;
  result=cache.invoke(key,new IntegerValueEntryProcessor());
  assertEquals("String_Node_Str",-23,result);
  result=cache.invoke(key,new IntegerValueEntryProcessor(),42);
  assertEquals("String_Node_Str",42,result);
  resultMap=cache.invokeAll(Collections.singleton(key),new IntegerValueEntryProcessor());
  result=resultMap.get(key).get();
  assertEquals("String_Node_Str",-23,result);
  resultMap=cache.invokeAll(Collections.singleton(key),new IntegerValueEntryProcessor(),42);
  result=resultMap.get(key).get();
  assertEquals("String_Node_Str",42,result);
  assertTrue("String_Node_Str",cache.containsKey(key));
  cache.clear();
  assertFalse("String_Node_Str",cache.containsKey(key));
  cacheManager.destroyCache("String_Node_Str");
}