Buggy code:
public URL getURL ( ) { } public CacheConfigurationBuilder < Object , Object > newCacheConfigurationBuilderFromTemplate ( final String name ) throws ClassNotFoundException , IllegalAccessException , InstantiationException { } @ SuppressWarnings ( "unchecked" ) public < K , V > CacheConfigurationBuilder < K , V > newCacheConfigurationBuilderFromTemplate ( final String name , final Class < K > keyType , final Class < V > valueType ) throws ClassNotFoundException , IllegalAccessException , InstantiationException { final ConfigurationParser . CacheTemplate cacheTemplate = templates . get ( name ) ; if ( cacheTemplate == null ) { return null ; } final ClassLoader defaultClassLoader = ClassLoading . getDefaultClassLoader ( ) ; Class keyClass = XmlConfiguration . getClassForName ( cacheTemplate . keyType ( ) , defaultClassLoader ) ; Class valueClass = XmlConfiguration . getClassForName ( cacheTemplate . valueType ( ) , defaultClassLoader ) ; if ( ( ( keyType != null ) && ( ( cacheTemplate . keyType ( ) ) != null ) ) && ( ! ( keyClass . isAssignableFrom ( keyType ) ) ) ) { throw new IllegalArgumentException ( ( ( ( "CacheTemplate<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>declares<seq2seq4repair_space>key<seq2seq4repair_space>type<seq2seq4repair_space>of<seq2seq4repair_space>" ) + ( cacheTemplate . keyType ( ) ) ) ) ; } if ( ( ( valueType != null ) && ( ( cacheTemplate . valueType ( ) ) != null ) ) && ( ! ( valueClass . isAssignableFrom ( valueType ) ) ) ) { throw new IllegalArgumentException ( ( ( ( "CacheTemplate<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>declares<seq2seq4repair_space>value<seq2seq4repair_space>type<seq2seq4repair_space>of<seq2seq4repair_space>" ) + ( cacheTemplate . valueType ( ) ) ) ) ; } CacheConfigurationBuilder < K , V > builder = CacheConfigurationBuilder . newCacheConfigurationBuilder ( ) ; final ConfigurationParser . Expiry parsedExpiry = cacheTemplate . expiry ( ) ; builder = builder . usingEvictionPrioritizer ( XmlConfiguration . getInstanceOfName ( cacheTemplate . evictionPrioritizer ( ) , defaultClassLoader , EvictionPrioritizer . class , Prioritizer . class ) ) . evictionVeto ( XmlConfiguration . getInstanceOfName ( cacheTemplate . evictionVeto ( ) , defaultClassLoader , EvictionVeto . class ) ) . withExpiry ( getExpiry ( defaultClassLoader , parsedExpiry ) ) ; if ( ( cacheTemplate . keySerializer ( ) ) != null ) { final Class < Serializer < ? > > keySerializer = ( ( Class < Serializer < ? > > ) ( XmlConfiguration . getClassForName ( cacheTemplate . keySerializer ( ) , defaultClassLoader ) ) ) ; builder = builder . add ( new org . ehcache . config . serializer . DefaultSerializationProviderConfiguration ( keySerializer , Type . KEY ) ) ; } if ( ( cacheTemplate . valueSerializer ( ) ) != null ) { final Class < Serializer < ? > > valueSerializer = ( ( Class < Serializer < ? > > ) ( XmlConfiguration . getClassForName ( cacheTemplate . valueSerializer ( ) , defaultClassLoader ) ) ) ; builder = builder . add ( new org . ehcache . config . serializer . DefaultSerializationProviderConfiguration ( valueSerializer , Type . VALUE ) ) ; } final String loaderWriter = cacheTemplate . loaderWriter ( ) ; if ( loaderWriter != null ) { final Class < CacheLoaderWriter < ? , ? > > cacheLoaderWriterClass = ( ( Class < CacheLoaderWriter < ? , ? > > ) ( XmlConfiguration . getClassForName ( loaderWriter , defaultClassLoader ) ) ) ; builder = builder . add ( new org . ehcache . config . loaderwriter . DefaultCacheLoaderWriterConfiguration ( cacheLoaderWriterClass ) ) ; if ( ( cacheTemplate . writeBehind ( ) ) != null ) { WriteBehind writeBehind = cacheTemplate . writeBehind ( ) ; WriteBehindConfigurationBuilder writeBehindConfigurationBuilder = WriteBehindConfigurationBuilder . newWriteBehindConfiguration ( ) . concurrencyLevel ( writeBehind . concurrency ( ) ) . queueSize ( writeBehind . maxQueueSize ( ) ) . rateLimit ( writeBehind . rateLimitPerSecond ( ) ) . retry ( writeBehind . retryAttempts ( ) , writeBehind . retryAttemptsDelay ( ) ) . delay ( writeBehind . minWriteDelay ( ) , writeBehind . maxWriteDelay ( ) ) ; if ( writeBehind . isBatched ( ) ) { writeBehindConfigurationBuilder = writeBehindConfigurationBuilder . batchSize ( writeBehind . batchSize ( ) ) ; } if ( writeBehind . isCoalesced ( ) ) { writeBehindConfigurationBuilder = writeBehindConfigurationBuilder . enableCoalescing ( ) ; } builder = builder . add ( writeBehindConfigurationBuilder ) ; } } if ( ( cacheTemplate . listeners ( ) ) != null ) { for ( ConfigurationParser . Listener listener : cacheTemplate . listeners ( ) ) { <START_BUG> final Class < CacheEventListener < ? , ? > > cacheEventListenerClass = ( ( Class < CacheEventListener < ? , ? > > ) ( XmlConfiguration . getClassForName ( listener . toString ( ) , defaultClassLoader ) ) ) ; <END_BUG> final List < EventType > eventListToFireOn = listener . fireOn ( ) ; Set < org . ehcache . event . EventType > eventSetToFireOn = new HashSet < org . ehcache . event . EventType > ( ) ; for ( EventType events : eventListToFireOn ) { switch ( events ) { case CREATED : eventSetToFireOn . add ( org . ehcache . event . EventType ) ; break ; case EVICTED : eventSetToFireOn . add ( org . ehcache . event . EventType ) ; break ; case EXPIRED : eventSetToFireOn . add ( org . ehcache . event . EventType ) ; break ; case UPDATED : eventSetToFireOn . add ( org . ehcache . event . EventType ) ; break ; case REMOVED : eventSetToFireOn . add ( org . ehcache . event . EventType ) ; break ; default : throw new IllegalArgumentException ( "Invalid<seq2seq4repair_space>Event<seq2seq4repair_space>Type<seq2seq4repair_space>provided" ) ; } } CacheEventListenerConfigurationBuilder listenerBuilder = CacheEventListenerConfigurationBuilder . newEventListenerConfiguration ( cacheEventListenerClass , eventSetToFireOn ) . firingMode ( EventFiring . valueOf ( listener . eventFiring ( ) . value ( ) ) ) . eventOrdering ( EventOrdering . valueOf ( listener . eventOrdering ( ) . value ( ) ) ) ; builder = builder . add ( listenerBuilder ) ;

Fix:
final Class < CacheEventListener < ? , ? > > cacheEventListenerClass = ( ( Class < CacheEventListener < ? , ? > > ) ( XmlConfiguration . getClassForName ( listener . className ( ) , defaultClassLoader ) ) ) ;