Program: 50446
Project: 50446
Buggy source:
public 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;
  MapConfig mapConfig=null;
  String mapConfigName=name.substring(2);
  if (mapConfigName.startsWith("String_Node_Str") || mapConfigName.startsWith("String_Node_Str") || mapConfigName.startsWith("String_Node_Str")) {
    mapConfig=new MapConfig();
  }
 else {
    mapConfig=node.getConfig().getMapConfig(mapConfigName);
  }
  this.backupCount=mapConfig.getBackupCount();
  ttl=mapConfig.getTimeToLiveSeconds() * 1000L;
  evictionDelayMillis=mapConfig.getEvictionDelaySeconds() * 1000L;
  maxIdle=mapConfig.getMaxIdleSeconds() * 1000L;
  evictionPolicy=EvictionPolicy.valueOf(mapConfig.getEvictionPolicy());
  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=LRU_COMPARATOR;
    }
 else {
      evictionComparator=LFU_COMPARATOR;
    }
  }
  evictionRate=mapConfig.getEvictionPercentage() / 100f;
  instanceType=ConcurrentMapManager.getInstanceType(name);
  MapStoreConfig mapStoreConfig=mapConfig.getMapStoreConfig();
  MapStore storeTemp=null;
  MapLoader loaderTemp=null;
  int writeDelaySeconds=-1;
  if (mapStoreConfig != null && mapStoreConfig.isEnabled()) {
    try {
      Object storeInstance=mapStoreConfig.getImplementation();
      if (storeInstance == null) {
        String mapStoreClassName=mapStoreConfig.getClassName();
        storeInstance=Serializer.classForName(node.getConfig().getClassLoader(),mapStoreClassName).newInstance();
      }
      if (storeInstance instanceof MapLoader) {
        loaderTemp=(MapLoader)storeInstance;
      }
      if (storeInstance instanceof MapStore) {
        storeTemp=(MapStore)storeInstance;
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    writeDelaySeconds=mapStoreConfig.getWriteDelaySeconds();
  }
  loader=loaderTemp;
  store=storeTemp;
  writeDelayMillis=(writeDelaySeconds == -1) ? -1L : writeDelaySeconds * 1000L;
  if (writeDelaySeconds > 0) {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS + writeDelaySeconds;
  }
 else {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS;
  }
  if (evictionPolicy == EvictionPolicy.NONE && instanceType == Instance.InstanceType.MAP) {
    locallyOwnedMap=new LocallyOwnedMap(localMapStats);
    concurrentMapManager.mapLocallyOwnedMaps.put(name,locallyOwnedMap);
  }
 else {
    locallyOwnedMap=null;
  }
  NearCacheConfig nearCacheConfig=mapConfig.getNearCacheConfig();
  if (nearCacheConfig == null) {
    mapNearCache=null;
  }
 else {
    mapNearCache=new MapNearCache(this,SortedHashMap.getOrderingTypeByName(mapConfig.getEvictionPolicy()),nearCacheConfig.getMaxSize(),nearCacheConfig.getTimeToLiveSeconds() * 1000L,nearCacheConfig.getMaxIdleSeconds() * 1000L,nearCacheConfig.isInvalidateOnChange());
    concurrentMapManager.mapCaches.put(name,mapNearCache);
  }
  this.creationTime=System.currentTimeMillis();
}

Fixed version (ground truth):
public 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;
  MapConfig mapConfig=null;
  String mapConfigName=name.substring(2);
  if (mapConfigName.startsWith("String_Node_Str") || mapConfigName.startsWith("String_Node_Str") || mapConfigName.startsWith("String_Node_Str")) {
    mapConfig=new MapConfig();
  }
 else {
    mapConfig=node.getConfig().getMapConfig(mapConfigName);
  }
  this.backupCount=mapConfig.getBackupCount();
  ttl=mapConfig.getTimeToLiveSeconds() * 1000L;
  evictionDelayMillis=mapConfig.getEvictionDelaySeconds() * 1000L;
  maxIdle=mapConfig.getMaxIdleSeconds() * 1000L;
  evictionPolicy=EvictionPolicy.valueOf(mapConfig.getEvictionPolicy());
  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=LRU_COMPARATOR;
    }
 else {
      evictionComparator=LFU_COMPARATOR;
    }
  }
  evictionRate=mapConfig.getEvictionPercentage() / 100f;
  instanceType=ConcurrentMapManager.getInstanceType(name);
  MapStoreConfig mapStoreConfig=mapConfig.getMapStoreConfig();
  MapStore storeTemp=null;
  MapLoader loaderTemp=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();
      }
      if (storeInstance instanceof MapLoader) {
        loaderTemp=(MapLoader)storeInstance;
      }
      if (storeInstance instanceof MapStore) {
        storeTemp=(MapStore)storeInstance;
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    writeDelaySeconds=mapStoreConfig.getWriteDelaySeconds();
  }
  if (!node.isSuperClient() && evictionPolicy == EvictionPolicy.NONE && instanceType == Instance.InstanceType.MAP) {
    locallyOwnedMap=new LocallyOwnedMap(localMapStats);
    concurrentMapManager.mapLocallyOwnedMaps.put(name,locallyOwnedMap);
  }
 else {
    locallyOwnedMap=null;
  }
  writeDelayMillis=(writeDelaySeconds == -1) ? -1L : writeDelaySeconds * 1000L;
  if (writeDelaySeconds > 0) {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS + writeDelaySeconds;
  }
 else {
    removeDelayMillis=concurrentMapManager.GLOBAL_REMOVE_DELAY_MILLIS;
  }
  loader=loaderTemp;
  store=storeTemp;
  NearCacheConfig nearCacheConfig=mapConfig.getNearCacheConfig();
  if (nearCacheConfig == null) {
    mapNearCache=null;
  }
 else {
    mapNearCache=new MapNearCache(this,SortedHashMap.getOrderingTypeByName(mapConfig.getEvictionPolicy()),nearCacheConfig.getMaxSize(),nearCacheConfig.getTimeToLiveSeconds() * 1000L,nearCacheConfig.getMaxIdleSeconds() * 1000L,nearCacheConfig.isInvalidateOnChange());
    concurrentMapManager.mapCaches.put(name,mapNearCache);
  }
  this.creationTime=System.currentTimeMillis();
}