Program: 49933
Project: 49933
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   if (mapForQueue) {
    String queueShortName=name.substring(4);
    QueueConfig qConfig=node.getConfig().findMatchingQueueConfig(queueShortName);
    mapConfig=node.getConfig().findMatchingMapConfig(qConfig.getBackingMapRef());
  }
 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) {
    nearCache=null;
  }
 else {
    NearCache nearCache=new NearCache(this,SortedHashMap.getOrderingTypeByName(nearCacheConfig.getEvictionPolicy()),nearCacheConfig.getMaxSize(),nearCacheConfig.getTimeToLiveSeconds() * 1000L,nearCacheConfig.getMaxIdleSeconds() * 1000L,nearCacheConfig.isInvalidateOnChange());
    final NearCache anotherNearCache=concurrentMapManager.mapCaches.putIfAbsent(name,nearCache);
    if (anotherNearCache != null) {
      nearCache=anotherNearCache;
    }
    this.nearCache=nearCache;
  }
  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.getBackingMapRef());
  }
 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 {
      MapStoreFactory factory=(MapStoreFactory)mapStoreConfig.getFactoryImplementation();
      if (factory == null) {
        String factoryClassName=mapStoreConfig.getFactoryClassName();
        if (factoryClassName != null && !"String_Node_Str".equals(factoryClassName)) {
          factory=(MapStoreFactory)Serializer.classForName(node.getConfig().getClassLoader(),factoryClassName).newInstance();
        }
      }
      Object storeInstance=factory == null ? mapStoreConfig.getImplementation() : factory.newMapStore(name,mapStoreConfig.getProperties());
      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) {
    nearCache=null;
  }
 else {
    NearCache nearCache=new NearCache(this,SortedHashMap.getOrderingTypeByName(nearCacheConfig.getEvictionPolicy()),nearCacheConfig.getMaxSize(),nearCacheConfig.getTimeToLiveSeconds() * 1000L,nearCacheConfig.getMaxIdleSeconds() * 1000L,nearCacheConfig.isInvalidateOnChange());
    final NearCache anotherNearCache=concurrentMapManager.mapCaches.putIfAbsent(name,nearCache);
    if (anotherNearCache != null) {
      nearCache=anotherNearCache;
    }
    this.nearCache=nearCache;
  }
  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();
}