Program: 50030
Project: 50030
Buggy source:
CMap(ConcurrentMapManager concurrentMapManager,String name){
  this.concurrentMapManager=concurrentMapManager;
  this.logger=concurrentMapManager.node.getLogger(CMap.class.getName());
  this.PARTITION_COUNT=concurrentMapManager.PARTITION_COUNT;
  this.blocks=concurrentMapManager.blocks;
  this.node=concurrentMapManager.node;
  this.thisAddress=concurrentMapManager.thisAddress;
  this.name=name;
  mapForQueue=name.startsWith("String_Node_Str");
  instanceType=ConcurrentMapManager.getInstanceType(name);
  MapConfig mapConfig=null;
  String mapConfigName=name.substring(2);
  if (isMultiMap() || mapConfigName.startsWith("String_Node_Str") || mapConfigName.startsWith(AS_LIST)|| mapConfigName.startsWith(AS_SET)) {
    mapConfig=new MapConfig();
  }
 else {
    mapConfig=node.getConfig().getMapConfig(mapConfigName);
  }
  this.mapIndexService=new MapIndexService(mapConfig.isValueIndexed());
  this.backupCount=mapConfig.getBackupCount();
  ttl=mapConfig.getTimeToLiveSeconds() * 1000L;
  evictionDelayMillis=mapConfig.getEvictionDelaySeconds() * 1000L;
  maxIdle=mapConfig.getMaxIdleSeconds() * 1000L;
  evictionPolicy=EvictionPolicy.valueOf(mapConfig.getEvictionPolicy());
  readBackupData=mapConfig.isReadBackupData();
  cacheValue=mapConfig.isCacheValue();
  if (evictionPolicy == EvictionPolicy.NONE) {
    maxSize=Integer.MAX_VALUE;
    evictionComparator=null;
  }
 else {
    maxSize=(mapConfig.getMaxSize() == 0) ? MapConfig.DEFAULT_MAX_SIZE : mapConfig.getMaxSize();
    if (evictionPolicy == EvictionPolicy.LRU) {
      evictionComparator=new ComparatorWrapper(LRU_COMPARATOR);
    }
 else {
      evictionComparator=new ComparatorWrapper(LFU_COMPARATOR);
    }
  }
  evictionRate=mapConfig.getEvictionPercentage() / 100f;
  MapStoreConfig mapStoreConfig=mapConfig.getMapStoreConfig();
  MapStoreWrapper mapStoreWrapper=null;
  int writeDelaySeconds=-1;
  if (!node.isSuperClient() && mapStoreConfig != null && mapStoreConfig.isEnabled()) {
    try {
      Object storeInstance=mapStoreConfig.getImplementation();
      if (storeInstance == null) {
        String mapStoreClassName=mapStoreConfig.getClassName();
        storeInstance=Serializer.classForName(node.getConfig().getClassLoader(),mapStoreClassName).newInstance();
      }
      mapStoreWrapper=new MapStoreWrapper(storeInstance,node.factory.getHazelcastInstanceProxy(),mapStoreConfig.getProperties(),mapConfigName);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
    }
    writeDelaySeconds=mapStoreConfig.getWriteDelaySeconds();
  }
  writeDelayMillis=(writeDelaySeconds == -1) ? -1L : writeDelaySeconds * 1000L;
  if (writeDelaySeconds > 0) {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS + writeDelaySeconds;
  }
 else {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS;
  }
  loader=(mapStoreWrapper == null || !mapStoreWrapper.isMapLoader()) ? null : mapStoreWrapper;
  store=(mapStoreWrapper == null || !mapStoreWrapper.isMapStore()) ? null : mapStoreWrapper;
  NearCacheConfig nearCacheConfig=mapConfig.getNearCacheConfig();
  if (nearCacheConfig == null) {
    mapNearCache=null;
  }
 else {
    MapNearCache mapNearCache=new MapNearCache(this,SortedHashMap.getOrderingTypeByName(nearCacheConfig.getEvictionPolicy()),nearCacheConfig.getMaxSize(),nearCacheConfig.getTimeToLiveSeconds() * 1000L,nearCacheConfig.getMaxIdleSeconds() * 1000L,nearCacheConfig.isInvalidateOnChange());
    final MapNearCache anotherMapNearCache=concurrentMapManager.mapCaches.putIfAbsent(name,mapNearCache);
    if (anotherMapNearCache != null) {
      mapNearCache=anotherMapNearCache;
    }
    this.mapNearCache=mapNearCache;
  }
  MergePolicy mergePolicyTemp=null;
  String mergePolicyName=mapConfig.getMergePolicy();
  if (mergePolicyName != null && !"String_Node_Str".equalsIgnoreCase(mergePolicyName)) {
    MergePolicyConfig mergePolicyConfig=node.getConfig().getMergePolicyConfig(mapConfig.getMergePolicy());
    if (mergePolicyConfig != null) {
      mergePolicyTemp=mergePolicyConfig.getImplementation();
      if (mergePolicyTemp == null) {
        String mergeClassName=mergePolicyConfig.getClassName();
        try {
          mergePolicyTemp=(MergePolicy)Serializer.classForName(node.getConfig().getClassLoader(),mergeClassName).newInstance();
        }
 catch (        Exception e) {
          logger.log(Level.SEVERE,e.getMessage(),e);
        }
      }
    }
  }
  this.mergePolicy=mergePolicyTemp;
  this.creationTime=System.currentTimeMillis();
}

Fixed version (ground truth):
CMap(ConcurrentMapManager concurrentMapManager,String name){
  this.concurrentMapManager=concurrentMapManager;
  this.logger=concurrentMapManager.node.getLogger(CMap.class.getName());
  this.PARTITION_COUNT=concurrentMapManager.PARTITION_COUNT;
  this.blocks=concurrentMapManager.blocks;
  this.node=concurrentMapManager.node;
  this.thisAddress=concurrentMapManager.thisAddress;
  this.name=name;
  mapForQueue=name.startsWith("String_Node_Str");
  instanceType=ConcurrentMapManager.getInstanceType(name);
  MapConfig mapConfig=null;
  String mapConfigName=name.substring(2);
  if (isMultiMap() || mapConfigName.startsWith("String_Node_Str") || mapConfigName.startsWith(AS_LIST)|| mapConfigName.startsWith(AS_SET)|| mapForQueue) {
    mapConfig=new MapConfig();
  }
 else {
    mapConfig=node.getConfig().getMapConfig(mapConfigName);
  }
  this.mapIndexService=new MapIndexService(mapConfig.isValueIndexed());
  this.backupCount=mapConfig.getBackupCount();
  ttl=mapConfig.getTimeToLiveSeconds() * 1000L;
  evictionDelayMillis=mapConfig.getEvictionDelaySeconds() * 1000L;
  maxIdle=mapConfig.getMaxIdleSeconds() * 1000L;
  evictionPolicy=EvictionPolicy.valueOf(mapConfig.getEvictionPolicy());
  readBackupData=mapConfig.isReadBackupData();
  cacheValue=mapConfig.isCacheValue();
  if (evictionPolicy == EvictionPolicy.NONE) {
    maxSize=Integer.MAX_VALUE;
    evictionComparator=null;
  }
 else {
    maxSize=(mapConfig.getMaxSize() == 0) ? MapConfig.DEFAULT_MAX_SIZE : mapConfig.getMaxSize();
    if (evictionPolicy == EvictionPolicy.LRU) {
      evictionComparator=new ComparatorWrapper(LRU_COMPARATOR);
    }
 else {
      evictionComparator=new ComparatorWrapper(LFU_COMPARATOR);
    }
  }
  evictionRate=mapConfig.getEvictionPercentage() / 100f;
  MapStoreConfig mapStoreConfig=mapConfig.getMapStoreConfig();
  MapStoreWrapper mapStoreWrapper=null;
  int writeDelaySeconds=-1;
  if (!node.isSuperClient() && mapStoreConfig != null && mapStoreConfig.isEnabled()) {
    try {
      Object storeInstance=mapStoreConfig.getImplementation();
      if (storeInstance == null) {
        String mapStoreClassName=mapStoreConfig.getClassName();
        storeInstance=Serializer.classForName(node.getConfig().getClassLoader(),mapStoreClassName).newInstance();
      }
      mapStoreWrapper=new MapStoreWrapper(storeInstance,node.factory.getHazelcastInstanceProxy(),mapStoreConfig.getProperties(),mapConfigName);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
    }
    writeDelaySeconds=mapStoreConfig.getWriteDelaySeconds();
  }
  writeDelayMillis=(writeDelaySeconds == -1) ? -1L : writeDelaySeconds * 1000L;
  if (writeDelaySeconds > 0) {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS + writeDelaySeconds;
  }
 else {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS;
  }
  loader=(mapStoreWrapper == null || !mapStoreWrapper.isMapLoader()) ? null : mapStoreWrapper;
  store=(mapStoreWrapper == null || !mapStoreWrapper.isMapStore()) ? null : mapStoreWrapper;
  NearCacheConfig nearCacheConfig=mapConfig.getNearCacheConfig();
  if (nearCacheConfig == null) {
    mapNearCache=null;
  }
 else {
    MapNearCache mapNearCache=new MapNearCache(this,SortedHashMap.getOrderingTypeByName(nearCacheConfig.getEvictionPolicy()),nearCacheConfig.getMaxSize(),nearCacheConfig.getTimeToLiveSeconds() * 1000L,nearCacheConfig.getMaxIdleSeconds() * 1000L,nearCacheConfig.isInvalidateOnChange());
    final MapNearCache anotherMapNearCache=concurrentMapManager.mapCaches.putIfAbsent(name,mapNearCache);
    if (anotherMapNearCache != null) {
      mapNearCache=anotherMapNearCache;
    }
    this.mapNearCache=mapNearCache;
  }
  MergePolicy mergePolicyTemp=null;
  String mergePolicyName=mapConfig.getMergePolicy();
  if (mergePolicyName != null && !"String_Node_Str".equalsIgnoreCase(mergePolicyName)) {
    MergePolicyConfig mergePolicyConfig=node.getConfig().getMergePolicyConfig(mapConfig.getMergePolicy());
    if (mergePolicyConfig != null) {
      mergePolicyTemp=mergePolicyConfig.getImplementation();
      if (mergePolicyTemp == null) {
        String mergeClassName=mergePolicyConfig.getClassName();
        try {
          mergePolicyTemp=(MergePolicy)Serializer.classForName(node.getConfig().getClassLoader(),mergeClassName).newInstance();
        }
 catch (        Exception e) {
          logger.log(Level.SEVERE,e.getMessage(),e);
        }
      }
    }
  }
  this.mergePolicy=mergePolicyTemp;
  this.creationTime=System.currentTimeMillis();
}