Program: 48116
Project: 48116
Buggy source:
@Test public void testGracefulShutdown3() throws Exception {
  Config config=new Config();
  config.getMapConfig(MAP_NAME).setBackupCount(1);
  config.setProperty(GroupProperties.PROP_PARTITION_COUNT,"String_Node_Str");
  TestHazelcastInstanceFactory f=createHazelcastInstanceFactory(6);
  final HazelcastInstance hz=f.newHazelcastInstance(config);
  final IMap<Object,Object> map=hz.getMap(MAP_NAME);
  final int size=200000;
  for (int i=0; i < size; i++) {
    map.put(i,i);
  }
  final HazelcastInstance hz2=f.newHazelcastInstance(config);
  final IMap<Object,Object> map2=hz2.getMap(MAP_NAME);
  final HazelcastInstance hz3=f.newHazelcastInstance(config);
  final IMap<Object,Object> map3=hz3.getMap(MAP_NAME);
  final HazelcastInstance hz4=f.newHazelcastInstance(config);
  final IMap<Object,Object> map4=hz4.getMap(MAP_NAME);
  final HazelcastInstance hz5=f.newHazelcastInstance(config);
  final IMap<Object,Object> map5=hz5.getMap(MAP_NAME);
  final HazelcastInstance hz6=f.newHazelcastInstance(config);
  final IMap<Object,Object> map6=hz6.getMap(MAP_NAME);
  assertEquals(size,map2.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  assertEquals(size,map5.size());
  assertEquals(size,map6.size());
  hz6.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map2.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  assertEquals(size,map5.size());
  hz2.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  assertEquals(size,map5.size());
  hz5.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  hz3.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map4.size());
  hz4.shutdown();
  assertEquals(size,map.size());
}

Fixed version (ground truth):
@Test public void testGracefulShutdown3() throws Exception {
  Config config=new Config();
  config.getMapConfig(MAP_NAME).setBackupCount(1);
  TestHazelcastInstanceFactory f=createHazelcastInstanceFactory(6);
  final HazelcastInstance hz=f.newHazelcastInstance(config);
  final IMap<Object,Object> map=hz.getMap(MAP_NAME);
  final int size=50000;
  for (int i=0; i < size; i++) {
    map.put(i,i);
  }
  final HazelcastInstance hz2=f.newHazelcastInstance(config);
  final IMap<Object,Object> map2=hz2.getMap(MAP_NAME);
  final HazelcastInstance hz3=f.newHazelcastInstance(config);
  final IMap<Object,Object> map3=hz3.getMap(MAP_NAME);
  final HazelcastInstance hz4=f.newHazelcastInstance(config);
  final IMap<Object,Object> map4=hz4.getMap(MAP_NAME);
  final HazelcastInstance hz5=f.newHazelcastInstance(config);
  final IMap<Object,Object> map5=hz5.getMap(MAP_NAME);
  final HazelcastInstance hz6=f.newHazelcastInstance(config);
  final IMap<Object,Object> map6=hz6.getMap(MAP_NAME);
  assertEquals(size,map2.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  assertEquals(size,map5.size());
  assertEquals(size,map6.size());
  hz6.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map2.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  assertEquals(size,map5.size());
  hz2.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  assertEquals(size,map5.size());
  hz5.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map3.size());
  assertEquals(size,map4.size());
  hz3.shutdown();
  assertEquals(size,map.size());
  assertEquals(size,map4.size());
  hz4.shutdown();
  assertEquals(size,map.size());
}