Buggy code:
public class LegacyConfigurationAdaptor { public Configuration adapt ( org . infinispan . configuration . cache . Configuration config ) { if ( config == null ) return null ; FluentConfiguration legacy = new Configuration ( ) . fluent ( ) ; legacy . clustering ( ) . mode ( CacheMode . valueOf ( config . clustering ( ) . cacheMode ( ) . name ( ) ) ) ; if ( ! ( config . clustering ( ) . cacheMode ( ) . isSynchronous ( ) ) ) { legacy . clustering ( ) . async ( ) . asyncMarshalling ( config . clustering ( ) . async ( ) . asyncMarshalling ( ) ) . replQueueClass ( config . clustering ( ) . async ( ) . replQueue ( ) . getClass ( ) ) . replQueueInterval ( config . clustering ( ) . async ( ) . replQueueInterval ( ) ) . replQueueMaxElements ( config . clustering ( ) . async ( ) . replQueueMaxElements ( ) ) ; } if ( ( config . clustering ( ) . hash ( ) . consistentHash ( ) ) != null ) { legacy . clustering ( ) . hash ( ) . consistentHashClass ( config . clustering ( ) . hash ( ) . consistentHash ( ) . getClass ( ) ) ; } if ( ( config . clustering ( ) . hash ( ) . hash ( ) ) != null ) { legacy . clustering ( ) . hash ( ) . hashFunctionClass ( config . clustering ( ) . hash ( ) . hash ( ) . getClass ( ) ) ; } legacy . clustering ( ) . hash ( ) . numOwners ( config . clustering ( ) . hash ( ) . numOwners ( ) ) . numVirtualNodes ( config . clustering ( ) . hash ( ) . numVirtualNodes ( ) ) . rehashEnabled ( config . clustering ( ) . hash ( ) . isRehashEnabled ( ) ) . rehashRpcTimeout ( config . clustering ( ) . hash ( ) . rehashRpcTimeout ( ) ) . rehashWait ( config . clustering ( ) . hash ( ) . rehashWait ( ) ) . groups ( ) . enabled ( config . clustering ( ) . hash ( ) . groupsConfiguration ( ) . enabled ( ) ) . groupers ( config . clustering ( ) . hash ( ) . groupsConfiguration ( ) . groupers ( ) ) ; if ( config . clustering ( ) . l1 ( ) . isEnabled ( ) ) { legacy . clustering ( ) . l1 ( ) . invalidationThreshold ( config . clustering ( ) . l1 ( ) . invalidationThreshold ( ) ) . lifespan ( config . clustering ( ) . l1 ( ) . lifespan ( ) ) . onRehash ( config . clustering ( ) . l1 ( ) . onRehash ( ) ) ; } else { legacy . clustering ( ) . l1 ( ) . disable ( ) ; } <START_BUG> legacy . clustering ( ) . stateRetrieval ( ) . alwaysProvideInMemoryState ( config . clustering ( ) . stateRetrieval ( ) . alwaysProvideInMemoryState ( ) ) . fetchInMemoryState ( config . clustering ( ) . stateRetrieval ( ) . fetchInMemoryState ( ) ) . initialRetryWaitTime ( config . clustering ( ) . stateRetrieval ( ) . initialRetryWaitTime ( ) ) . logFlushTimeout ( config . clustering ( ) . stateRetrieval ( ) . logFlushTimeout ( ) ) . maxNonProgressingLogWrites ( config . clustering ( ) . stateRetrieval ( ) . maxNonPorgressingLogWrites ( ) ) . numRetries ( config . clustering ( ) . stateRetrieval ( ) . numRetries ( ) ) . retryWaitTimeIncreaseFactor ( config . clustering ( ) . stateRetrieval ( ) . retryWaitTimeIncreaseFactor ( ) ) . timeout ( config . clustering ( ) . stateRetrieval ( ) . timeout ( ) ) ; <END_BUG> if ( config . clustering ( ) . cacheMode ( ) . isSynchronous ( ) ) { legacy . clustering ( ) . sync ( ) . replTimeout ( config . clustering ( ) . sync ( ) . replTimeout ( ) ) ; } for ( CommandInterceptor interceptor : config . customInterceptors ( ) . interceptors ( ) ) { legacy . clustering ( ) . customInterceptors ( ) . add ( interceptor ) ; } legacy . dataContainer ( ) . dataContainer ( config . dataContainer ( ) . dataContainer ( ) ) . withProperties ( config . dataContainer ( ) . properties ( ) ) ; if ( config . deadlockDetection ( ) . enabled ( ) ) { legacy . deadlockDetection ( ) . spinDuration ( config . deadlockDetection ( ) . spinDuration ( ) ) ; } else { legacy . deadlockDetection ( ) . disable ( ) ; } legacy . eviction ( ) . maxEntries ( config . eviction ( ) . maxEntries ( ) ) . strategy ( config . eviction ( ) . strategy ( ) ) . threadPolicy ( config . eviction ( ) . threadPolicy ( ) ) ; legacy . expiration ( ) . lifespan ( config . expiration ( ) . lifespan ( ) ) . maxIdle ( config . expiration ( ) . maxIdle ( ) ) . reaperEnabled ( config . expiration ( ) . reaperEnabled ( ) ) . wakeUpInterval ( config . expiration ( ) . wakeUpInterval ( ) ) ; if ( config . indexing ( ) . enabled ( ) ) legacy . indexing ( ) . indexLocalOnly ( config . indexing ( ) . indexLocalOnly ( ) ) ; else legacy . indexing ( ) . disable ( ) ; if ( config . invocationBatching ( ) . enabled ( ) ) legacy . invocationBatching ( ) ; if ( config . jmxStatistics ( ) . enabled ( ) ) legacy . jmxStatistics ( ) ;

Fix:
legacy . clustering ( ) . stateRetrieval ( ) . alwaysProvideInMemoryState ( config . clustering ( ) . stateRetrieval ( ) . alwaysProvideInMemoryState ( ) ) . fetchInMemoryState ( config . clustering ( ) . stateRetrieval ( ) . fetchInMemoryState ( ) ) . initialRetryWaitTime ( config . clustering ( ) . stateRetrieval ( ) . initialRetryWaitTime ( ) ) . logFlushTimeout ( config . clustering ( ) . stateRetrieval ( ) . logFlushTimeout ( ) ) . maxNonProgressingLogWrites ( config . clustering ( ) . stateRetrieval ( ) . maxNonProgressingLogWrites ( ) ) . numRetries ( config . clustering ( ) . stateRetrieval ( ) . numRetries ( ) ) . retryWaitTimeIncreaseFactor ( config . clustering ( ) . stateRetrieval ( ) . retryWaitTimeIncreaseFactor ( ) ) . timeout ( config . clustering ( ) . stateRetrieval ( ) . timeout ( ) ) ;