Program: 49637
Project: 49637
Buggy source:
private void callListener(final ListenerItem listenerItem,final DataAwareEntryEvent event){
  if (listenerItem.localListener && !event.firedLocally) {
    return;
  }
  final Object listener=listenerItem.listener;
  final EntryEventType entryEventType=event.getEventType();
  if (listenerItem.instanceType == Instance.InstanceType.MAP) {
    if (!listenerItem.name.startsWith(Prefix.MAP_HAZELCAST)) {
      Object proxy=node.factory.getOrCreateProxyByName(listenerItem.name);
      if (proxy instanceof MProxy) {
        MProxy mProxy=(MProxy)proxy;
        mProxy.getMapOperationCounter().incrementReceivedEvents();
      }
    }
  }
 else   if (listenerItem.instanceType == Instance.InstanceType.QUEUE) {
    if (!listenerItem.name.startsWith(Prefix.QUEUE_HAZELCAST)) {
      Object proxy=node.factory.getOrCreateProxyByName(listenerItem.name);
      if (proxy instanceof QProxy) {
        QProxy qProxy=(QProxy)proxy;
        qProxy.getQueueOperationCounter().incrementReceivedEvents();
      }
    }
  }
 else   if (listenerItem.instanceType == Instance.InstanceType.TOPIC) {
    if (!listenerItem.name.startsWith(Prefix.TOPIC_HAZELCAST)) {
      Object proxy=node.factory.getOrCreateProxyByName(listenerItem.name);
      if (proxy instanceof TopicProxy) {
        TopicProxy tProxy=(TopicProxy)proxy;
        tProxy.getTopicOperationCounter().incrementReceivedMessages();
      }
    }
  }
  final EntryEvent event2=listenerItem.includeValue ? event : (event.getValue() != null ? new DataAwareEntryEvent(event.getMember(),event.getEventType().getType(),event.getLongName(),event.getKeyData(),null,null,event.firedLocally) : event);
switch (listenerItem.instanceType) {
case MAP:
case MULTIMAP:
    EntryListener entryListener=(EntryListener)listener;
switch (entryEventType) {
case ADDED:
    entryListener.entryAdded(event2);
  break;
case REMOVED:
entryListener.entryRemoved(event2);
break;
case UPDATED:
entryListener.entryUpdated(event2);
break;
case EVICTED:
entryListener.entryEvicted(event2);
break;
}
break;
case SET:
case LIST:
ItemListener itemListener=(ItemListener)listener;
switch (entryEventType) {
case ADDED:
itemListener.itemAdded(new DataAwareItemEvent(listenerItem.name,ItemEventType.ADDED,event.getKeyData()));
break;
case REMOVED:
itemListener.itemRemoved(new DataAwareItemEvent(listenerItem.name,ItemEventType.REMOVED,event.getKeyData()));
break;
}
break;
case TOPIC:
MessageListener messageListener=(MessageListener)listener;
messageListener.onMessage(new DataMessage(listenerItem.name,event.getNewValueData()));
break;
case QUEUE:
ItemListener queueItemListener=(ItemListener)listener;
switch (entryEventType) {
case ADDED:
queueItemListener.itemAdded(new DataAwareItemEvent(listenerItem.name,ItemEventType.ADDED,event.getNewValueData()));
break;
case REMOVED:
queueItemListener.itemRemoved(new DataAwareItemEvent(listenerItem.name,ItemEventType.REMOVED,event.getNewValueData()));
break;
}
break;
}
}

Fixed version (ground truth):
private void callListener(final ListenerItem listenerItem,final DataAwareEntryEvent event){
  if (listenerItem.localListener && !event.firedLocally) {
    return;
  }
  final Object listener=listenerItem.listener;
  final EntryEventType entryEventType=event.getEventType();
  if (listenerItem.instanceType == Instance.InstanceType.MAP) {
    if (!listenerItem.name.startsWith(Prefix.MAP_HAZELCAST)) {
      Object proxy=node.factory.getOrCreateProxyByName(listenerItem.name);
      if (proxy instanceof MProxy) {
        MProxy mProxy=(MProxy)proxy;
        mProxy.getMapOperationCounter().incrementReceivedEvents();
      }
    }
  }
 else   if (listenerItem.instanceType == Instance.InstanceType.QUEUE) {
    if (!listenerItem.name.startsWith(Prefix.QUEUE_HAZELCAST)) {
      Object proxy=node.factory.getOrCreateProxyByName(listenerItem.name);
      if (proxy instanceof QProxy) {
        QProxy qProxy=(QProxy)proxy;
        qProxy.getQueueOperationCounter().incrementReceivedEvents();
      }
    }
  }
 else   if (listenerItem.instanceType == Instance.InstanceType.TOPIC) {
    if (!listenerItem.name.startsWith(Prefix.TOPIC_HAZELCAST)) {
      Object proxy=node.factory.getOrCreateProxyByName(listenerItem.name);
      if (proxy instanceof TopicProxy) {
        TopicProxy tProxy=(TopicProxy)proxy;
        tProxy.getTopicOperationCounter().incrementReceivedMessages();
      }
    }
  }
  final EntryEvent event2=listenerItem.includeValue ? event : (event.getNewValueData() != null ? new DataAwareEntryEvent(event.getMember(),event.getEventType().getType(),event.getLongName(),event.getKeyData(),null,null,event.firedLocally) : event);
switch (listenerItem.instanceType) {
case MAP:
case MULTIMAP:
    EntryListener entryListener=(EntryListener)listener;
switch (entryEventType) {
case ADDED:
    entryListener.entryAdded(event2);
  break;
case REMOVED:
entryListener.entryRemoved(event2);
break;
case UPDATED:
entryListener.entryUpdated(event2);
break;
case EVICTED:
entryListener.entryEvicted(event2);
break;
}
break;
case SET:
case LIST:
ItemListener itemListener=(ItemListener)listener;
switch (entryEventType) {
case ADDED:
itemListener.itemAdded(new DataAwareItemEvent(listenerItem.name,ItemEventType.ADDED,event.getKeyData()));
break;
case REMOVED:
itemListener.itemRemoved(new DataAwareItemEvent(listenerItem.name,ItemEventType.REMOVED,event.getKeyData()));
break;
}
break;
case TOPIC:
MessageListener messageListener=(MessageListener)listener;
messageListener.onMessage(new DataMessage(listenerItem.name,event.getNewValueData()));
break;
case QUEUE:
ItemListener queueItemListener=(ItemListener)listener;
switch (entryEventType) {
case ADDED:
queueItemListener.itemAdded(new DataAwareItemEvent(listenerItem.name,ItemEventType.ADDED,event.getNewValueData()));
break;
case REMOVED:
queueItemListener.itemRemoved(new DataAwareItemEvent(listenerItem.name,ItemEventType.REMOVED,event.getNewValueData()));
break;
}
break;
}
}