Program: 49608
Project: 49608
Buggy source:
@Test public void issue587CallMapLoaderDuringRemoval(){
  final AtomicInteger loadCount=new AtomicInteger(0);
  final AtomicInteger storeCount=new AtomicInteger(0);
  final AtomicInteger deleteCount=new AtomicInteger(0);
class SimpleMapStore<K,V> implements MapStore<K,V> {
    SimpleMapStore(    ConcurrentMap<K,V> store){
      this.store=store;
    }
    public V load(    K key){
      V value=store.get(key);
      loadCount.incrementAndGet();
      return value;
    }
    public Map<K,V> loadAll(    Collection<K> keys){
      Map<K,V> result=new HashMap<K,V>();
      for (      K key : keys) {
        V value=load(key);
        if (value != null) {
          result.put(key,value);
        }
      }
      return result;
    }
    public Set<K> loadAllKeys(){
      Set<K> keys=store.keySet();
      return keys;
    }
    public void store(    K key,    V value){
      storeCount.incrementAndGet();
      store.put(key,value);
    }
    public void delete(    K key){
      deleteCount.incrementAndGet();
      store.remove(key);
    }
    public void storeAll(    Map<K,V> map){
      store.putAll(map);
    }
    public void deleteAll(    Collection<K> keys){
      for (      K key : keys) {
        store.remove(key);
      }
    }
    private final ConcurrentMap<K,V> store;
  }
  final ConcurrentMap<String,Long> store=new ConcurrentHashMap<String,Long>();
  final MapStore<String,Long> myMapStore=new SimpleMapStore<String,Long>(store);
  Config config=new Config();
  config.getMapConfig("String_Node_Str").setMapStoreConfig(new MapStoreConfig().setImplementation(myMapStore));
  HazelcastInstance hc=Hazelcast.newHazelcastInstance(config);
  try {
    store.put("String_Node_Str",1l);
    store.put("String_Node_Str",2l);
    assertEquals(0,loadCount.get());
    assertEquals(0,storeCount.get());
    assertEquals(0,deleteCount.get());
    IMap<String,Long> myMap=hc.getMap("String_Node_Str");
    assertEquals(1l,myMap.get("String_Node_Str").longValue());
    assertEquals(2l,myMap.get("String_Node_Str").longValue());
    assertEquals(2,loadCount.get());
    assertEquals(0,storeCount.get());
    assertEquals(0,deleteCount.get());
    assertNull(myMap.remove("String_Node_Str"));
    assertEquals(3,loadCount.get());
    assertEquals(0,storeCount.get());
    assertEquals(0,deleteCount.get());
    myMap.put("String_Node_Str",3L);
    myMap.put("String_Node_Str",4L);
    assertEquals(5,loadCount.get());
    assertEquals(2,storeCount.get());
    assertEquals(0,deleteCount.get());
    myMap.remove("String_Node_Str");
    assertEquals(2,storeCount.get());
    assertEquals(1,deleteCount.get());
    assertEquals(5,loadCount.get());
  }
  finally {
    Hazelcast.shutdownAll();
  }
}

Fixed version (ground truth):
@Test public void issue587CallMapLoaderDuringRemoval(){
  final AtomicInteger loadCount=new AtomicInteger(0);
  final AtomicInteger storeCount=new AtomicInteger(0);
  final AtomicInteger deleteCount=new AtomicInteger(0);
class SimpleMapStore<K,V> implements MapStore<K,V> {
    SimpleMapStore(    ConcurrentMap<K,V> store){
      this.store=store;
    }
    public V load(    K key){
      V value=store.get(key);
      loadCount.incrementAndGet();
      return value;
    }
    public Map<K,V> loadAll(    Collection<K> keys){
      Map<K,V> result=new HashMap<K,V>();
      for (      K key : keys) {
        V value=load(key);
        if (value != null) {
          result.put(key,value);
        }
      }
      return result;
    }
    public Set<K> loadAllKeys(){
      Set<K> keys=store.keySet();
      return keys;
    }
    public void store(    K key,    V value){
      storeCount.incrementAndGet();
      store.put(key,value);
    }
    public void delete(    K key){
      deleteCount.incrementAndGet();
      store.remove(key);
    }
    public void storeAll(    Map<K,V> map){
      store.putAll(map);
    }
    public void deleteAll(    Collection<K> keys){
      for (      K key : keys) {
        store.remove(key);
      }
    }
    private final ConcurrentMap<K,V> store;
  }
  final ConcurrentMap<String,Long> store=new ConcurrentHashMap<String,Long>();
  final MapStore<String,Long> myMapStore=new SimpleMapStore<String,Long>(store);
  Config config=new Config();
  config.getMapConfig("String_Node_Str").setMapStoreConfig(new MapStoreConfig().setImplementation(myMapStore));
  HazelcastInstance hc=Hazelcast.newHazelcastInstance(config);
  store.put("String_Node_Str",1l);
  store.put("String_Node_Str",2l);
  assertEquals(0,loadCount.get());
  assertEquals(0,storeCount.get());
  assertEquals(0,deleteCount.get());
  IMap<String,Long> myMap=hc.getMap("String_Node_Str");
  assertEquals(1l,myMap.get("String_Node_Str").longValue());
  assertEquals(2l,myMap.get("String_Node_Str").longValue());
  assertEquals(2,loadCount.get());
  assertEquals(0,storeCount.get());
  assertEquals(0,deleteCount.get());
  assertNull(myMap.remove("String_Node_Str"));
  assertEquals(3,loadCount.get());
  assertEquals(0,storeCount.get());
  assertEquals(0,deleteCount.get());
  myMap.put("String_Node_Str",3L);
  myMap.put("String_Node_Str",4L);
  assertEquals(5,loadCount.get());
  assertEquals(2,storeCount.get());
  assertEquals(0,deleteCount.get());
  myMap.remove("String_Node_Str");
  assertEquals(2,storeCount.get());
  assertEquals(1,deleteCount.get());
  assertEquals(5,loadCount.get());
}