Program: 50536
Project: 50536
Buggy source:
@Test public void addListenerWithTwoMemberClusterAndKillOne() throws InterruptedException, IOException {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(null);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(null);
  HazelcastInstance h3=Hazelcast.newHazelcastInstance(null);
  Map realMap=h3.getMap("String_Node_Str");
  Map<Integer,HazelcastInstance> memberMap=getMapOfClustorMembers(h1,h2);
  client=getHazelcastClient(h1,h2);
  IMap<String,String> map=client.getMap("String_Node_Str");
  final CountDownLatch entryAddLatch=new CountDownLatch(2);
  final CountDownLatch entryUpdatedLatch=new CountDownLatch(2);
  final CountDownLatch entryRemovedLatch=new CountDownLatch(2);
  map.addEntryListener(new EntryListener(){
    public void entryAdded(    EntryEvent event){
      System.out.println("String_Node_Str" + event.getValue());
      assertEquals("String_Node_Str",event.getKey());
      entryAddLatch.countDown();
    }
    public void entryRemoved(    EntryEvent event){
      System.out.println("String_Node_Str" + event.getValue());
      entryRemovedLatch.countDown();
      assertEquals("String_Node_Str",event.getKey());
      assertEquals("String_Node_Str",event.getValue());
    }
    public void entryUpdated(    EntryEvent event){
      System.out.println("String_Node_Str" + event.getValue());
      assertEquals("String_Node_Str",event.getValue());
      assertEquals("String_Node_Str",event.getKey());
      entryUpdatedLatch.countDown();
    }
    public void entryEvicted(    EntryEvent event){
      entryRemoved(event);
    }
  }
,true);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  realMap.remove("String_Node_Str");
  memberMap.remove(client.getConnectionManager().getConnection().getAddress().getPort()).shutdown();
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  realMap.remove("String_Node_Str");
  assertTrue(entryAddLatch.await(10,TimeUnit.MILLISECONDS));
  assertTrue(entryUpdatedLatch.await(10,TimeUnit.MILLISECONDS));
  assertTrue(entryRemovedLatch.await(10,TimeUnit.MILLISECONDS));
}

Fixed version (ground truth):
@Test public void addListenerWithTwoMemberClusterAndKillOne() throws InterruptedException, IOException {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(null);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(null);
  HazelcastInstance h3=Hazelcast.newHazelcastInstance(null);
  Map realMap=h3.getMap("String_Node_Str");
  Map<Integer,HazelcastInstance> memberMap=getMapOfClusterMembers(h1,h2);
  client=getHazelcastClient(h1,h2);
  IMap<String,String> map=client.getMap("String_Node_Str");
  final CountDownLatch entryAddLatch=new CountDownLatch(2);
  final CountDownLatch entryUpdatedLatch=new CountDownLatch(2);
  final CountDownLatch entryRemovedLatch=new CountDownLatch(2);
  map.addEntryListener(new EntryListener(){
    public void entryAdded(    EntryEvent event){
      System.out.println("String_Node_Str" + event.getValue());
      assertEquals("String_Node_Str",event.getKey());
      entryAddLatch.countDown();
    }
    public void entryRemoved(    EntryEvent event){
      System.out.println("String_Node_Str" + event.getValue());
      entryRemovedLatch.countDown();
      assertEquals("String_Node_Str",event.getKey());
      assertEquals("String_Node_Str",event.getValue());
    }
    public void entryUpdated(    EntryEvent event){
      System.out.println("String_Node_Str" + event.getValue());
      assertEquals("String_Node_Str",event.getValue());
      assertEquals("String_Node_Str",event.getKey());
      entryUpdatedLatch.countDown();
    }
    public void entryEvicted(    EntryEvent event){
      entryRemoved(event);
    }
  }
,true);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  realMap.remove("String_Node_Str");
  memberMap.remove(client.getConnectionManager().getConnection().getAddress().getPort()).shutdown();
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  realMap.remove("String_Node_Str");
  assertTrue(entryAddLatch.await(10,TimeUnit.MILLISECONDS));
  assertTrue(entryUpdatedLatch.await(10,TimeUnit.MILLISECONDS));
  assertTrue(entryRemovedLatch.await(10,TimeUnit.MILLISECONDS));
}