Program: 49995
Project: 49995
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().findMatchingMapConfig(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();
  MaxSizeConfig maxSizeConfig=mapConfig.getMaxSizeConfig();
  if (MaxSizeConfig.POLICY_MAP_SIZE_PER_JVM.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizePerJVMPolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_CLUSTER_WIDE_MAP_SIZE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizeClusterWidePolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_PARTITIONS_WIDE_MAP_SIZE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizePartitionsWidePolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_USED_HEAP_SIZE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizeHeapPolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_USED_HEAP_PERCENTAGE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizeHeapPercentagePolicy(maxSizeConfig);
  }
 else {
    maxSizePolicy=null;
  }
  if (evictionPolicy == EvictionPolicy.NONE) {
    evictionComparator=null;
  }
 else {
    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)) {
    mapConfig=new MapConfig();
  }
 else   if (mapForQueue) {
    String queueShortName=name.substring(4);
    QueueConfig qConfig=node.getConfig().findMatchingQueueConfig(queueShortName);
    mapConfig=node.getConfig().findMatchingMapConfig(qConfig.getBackingMapName());
  }
 else {
    mapConfig=node.getConfig().findMatchingMapConfig(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();
  MaxSizeConfig maxSizeConfig=mapConfig.getMaxSizeConfig();
  if (MaxSizeConfig.POLICY_MAP_SIZE_PER_JVM.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizePerJVMPolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_CLUSTER_WIDE_MAP_SIZE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizeClusterWidePolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_PARTITIONS_WIDE_MAP_SIZE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizePartitionsWidePolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_USED_HEAP_SIZE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizeHeapPolicy(maxSizeConfig);
  }
 else   if (MaxSizeConfig.POLICY_USED_HEAP_PERCENTAGE.equals(maxSizeConfig.getMaxSizePolicy())) {
    maxSizePolicy=new MaxSizeHeapPercentagePolicy(maxSizeConfig);
  }
 else {
    maxSizePolicy=null;
  }
  if (evictionPolicy == EvictionPolicy.NONE) {
    evictionComparator=null;
  }
 else {
    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);
      if (!mapStoreWrapper.isMapLoader() && !mapStoreWrapper.isMapStore()) {
        throw new Exception("String_Node_Str" + storeInstance.getClass().getName() + "String_Node_Str");
      }
    }
 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();
}