Program: 47378
Project: 47378
Buggy source:
public CacheConfig(CacheSimpleConfig simpleConfig) throws Exception {
  this.name=simpleConfig.getName();
  if (simpleConfig.getKeyType() != null) {
    this.keyType=(Class<K>)ClassLoaderUtil.loadClass(null,simpleConfig.getKeyType());
  }
  if (simpleConfig.getValueType() != null) {
    this.valueType=(Class<V>)ClassLoaderUtil.loadClass(null,simpleConfig.getValueType());
  }
  this.isStatisticsEnabled=simpleConfig.isStatisticsEnabled();
  this.isManagementEnabled=simpleConfig.isManagementEnabled();
  this.isReadThrough=simpleConfig.isReadThrough();
  this.isWriteThrough=simpleConfig.isWriteThrough();
  if (simpleConfig.getCacheLoaderFactory() != null) {
    this.cacheLoaderFactory=ClassLoaderUtil.newInstance(null,simpleConfig.getCacheLoaderFactory());
  }
  if (simpleConfig.getCacheWriterFactory() != null) {
    this.cacheWriterFactory=ClassLoaderUtil.newInstance(null,simpleConfig.getCacheWriterFactory());
  }
  if (simpleConfig.getExpiryPolicyFactory() != null) {
    this.expiryPolicyFactory=ClassLoaderUtil.newInstance(null,simpleConfig.getExpiryPolicyFactory());
  }
  this.asyncBackupCount=simpleConfig.getAsyncBackupCount();
  this.backupCount=simpleConfig.getBackupCount();
  this.inMemoryFormat=simpleConfig.getInMemoryFormat();
  if (simpleConfig.getEvictionConfig() != null) {
    this.evictionConfig=new EvictionConfig(simpleConfig.getEvictionConfig());
  }
  if (simpleConfig.getNearCacheConfig() != null) {
    this.nearCacheConfig=new NearCacheConfig(simpleConfig.getNearCacheConfig());
  }
  if (simpleConfig.getWanReplicationRef() != null) {
    this.wanReplicationRef=new WanReplicationRef(simpleConfig.getWanReplicationRef());
  }
  for (  CacheSimpleEntryListenerConfig simpleListener : simpleConfig.getCacheEntryListeners()) {
    Factory<? extends CacheEntryListener<? super K,? super V>> listenerFactory=null;
    Factory<? extends CacheEntryEventFilter<? super K,? super V>> filterFactory=null;
    if (simpleListener.getCacheEntryListenerFactory() != null) {
      listenerFactory=ClassLoaderUtil.newInstance(null,simpleListener.getCacheEntryListenerFactory());
    }
    if (simpleListener.getCacheEntryEventFilterFactory() != null) {
      filterFactory=ClassLoaderUtil.newInstance(null,simpleListener.getCacheEntryEventFilterFactory());
    }
    boolean isOldValueRequired=simpleListener.isOldValueRequired();
    boolean synchronous=simpleListener.isSynchronous();
    MutableCacheEntryListenerConfiguration<K,V> listenerConfiguration=new MutableCacheEntryListenerConfiguration<K,V>(listenerFactory,filterFactory,isOldValueRequired,synchronous);
    addCacheEntryListenerConfiguration(listenerConfiguration);
  }
}

Fixed version (ground truth):
public CacheConfig(CacheSimpleConfig simpleConfig) throws Exception {
  this.name=simpleConfig.getName();
  if (simpleConfig.getKeyType() != null) {
    this.keyType=(Class<K>)ClassLoaderUtil.loadClass(null,simpleConfig.getKeyType());
  }
  if (simpleConfig.getValueType() != null) {
    this.valueType=(Class<V>)ClassLoaderUtil.loadClass(null,simpleConfig.getValueType());
  }
  this.isStatisticsEnabled=simpleConfig.isStatisticsEnabled();
  this.isManagementEnabled=simpleConfig.isManagementEnabled();
  this.isReadThrough=simpleConfig.isReadThrough();
  this.isWriteThrough=simpleConfig.isWriteThrough();
  if (simpleConfig.getCacheLoaderFactory() != null) {
    this.cacheLoaderFactory=ClassLoaderUtil.newInstance(null,simpleConfig.getCacheLoaderFactory());
  }
  if (simpleConfig.getCacheWriterFactory() != null) {
    this.cacheWriterFactory=ClassLoaderUtil.newInstance(null,simpleConfig.getCacheWriterFactory());
  }
  if (simpleConfig.getExpiryPolicyFactory() != null) {
    this.expiryPolicyFactory=ClassLoaderUtil.newInstance(null,simpleConfig.getExpiryPolicyFactory());
  }
  this.asyncBackupCount=simpleConfig.getAsyncBackupCount();
  this.backupCount=simpleConfig.getBackupCount();
  this.inMemoryFormat=simpleConfig.getInMemoryFormat();
  if (simpleConfig.getEvictionConfig() != null) {
    this.evictionConfig=new CacheEvictionConfig(simpleConfig.getEvictionConfig());
  }
  if (simpleConfig.getNearCacheConfig() != null) {
    this.nearCacheConfig=new NearCacheConfig(simpleConfig.getNearCacheConfig());
  }
  if (simpleConfig.getWanReplicationRef() != null) {
    this.wanReplicationRef=new WanReplicationRef(simpleConfig.getWanReplicationRef());
  }
  for (  CacheSimpleEntryListenerConfig simpleListener : simpleConfig.getCacheEntryListeners()) {
    Factory<? extends CacheEntryListener<? super K,? super V>> listenerFactory=null;
    Factory<? extends CacheEntryEventFilter<? super K,? super V>> filterFactory=null;
    if (simpleListener.getCacheEntryListenerFactory() != null) {
      listenerFactory=ClassLoaderUtil.newInstance(null,simpleListener.getCacheEntryListenerFactory());
    }
    if (simpleListener.getCacheEntryEventFilterFactory() != null) {
      filterFactory=ClassLoaderUtil.newInstance(null,simpleListener.getCacheEntryEventFilterFactory());
    }
    boolean isOldValueRequired=simpleListener.isOldValueRequired();
    boolean synchronous=simpleListener.isSynchronous();
    MutableCacheEntryListenerConfiguration<K,V> listenerConfiguration=new MutableCacheEntryListenerConfiguration<K,V>(listenerFactory,filterFactory,isOldValueRequired,synchronous);
    addCacheEntryListenerConfiguration(listenerConfiguration);
  }
}