Buggy code:
public abstract class AbstractHazelcastCacheManager implements HazelcastCacheManager { protected final ConcurrentMap < String , ICacheInternal < ? , ? > > caches = new ConcurrentHashMap < String , ICacheInternal < ? , ? > > ( ) ; protected final URI uri ; protected final WeakReference < ClassLoader > classLoaderReference ; protected final Properties properties ; protected final String cacheNamePrefix ; protected final boolean isDefaultURI ; protected final boolean isDefaultClassLoader ; protected final CachingProvider cachingProvider ; protected final HazelcastInstance hazelcastInstance ; private final AtomicBoolean isClosed = new AtomicBoolean ( false ) ; private final AtomicBoolean isDestroyed = new AtomicBoolean ( false ) ; private final String lifecycleListenerRegistrationId ; public AbstractHazelcastCacheManager ( CachingProvider cachingProvider , HazelcastInstance hazelcastInstance , URI uri , ClassLoader classLoader , Properties properties ) { } @ Override public < K , V , C extends Configuration < K , V > > ICache < K , V > createCache ( String cacheName , C configuration ) throws IllegalArgumentException { } private ICacheInternal < ? , ? > getOrPutIfAbsent ( String nameWithPrefix , ICacheInternal cacheProxy ) { } @ Override public CachingProvider getCachingProvider ( ) { } @ Override public URI getURI ( ) { } @ Override public ClassLoader getClassLoader ( ) { } @ Override public Properties getProperties ( ) { } @ Override public < K , V > ICache < K , V > getCache ( String cacheName , Class < K > keyType , Class < V > valueType ) { } @ Override public < K , V > ICache < K , V > getCache ( String cacheName ) { checkIfManagerNotClosed ( ) ; ICacheInternal < ? , ? > cache = getCacheUnchecked ( cacheName ) ; if ( cache != null ) { Configuration < ? , ? > configuration = cache . getConfiguration ( CacheConfig . class ) ; if ( ( Object . class . equals ( configuration . getKeyType ( ) ) ) && ( Object . class . equals ( configuration . getValueType ( ) ) ) ) { return ensureOpenIfAvailable ( ( ( ICacheInternal < K , V > ) ( cache ) ) ) ; } else { throw new IllegalArgumentException ( ( ( ( ( ( ( ( ( "Cache<seq2seq4repair_space>" + cacheName ) + "<seq2seq4repair_space>was<seq2seq4repair_space>" ) + "defined<seq2seq4repair_space>with<seq2seq4repair_space>specific<seq2seq4repair_space>types<seq2seq4repair_space>Cache<" ) + ( configuration . getKeyType ( ) ) ) + ",<seq2seq4repair_space>" ) + ( configuration . getValueType ( ) ) ) + "><seq2seq4repair_space>" ) + "in<seq2seq4repair_space>which<seq2seq4repair_space>case<seq2seq4repair_space>CacheManager.getCache(String,<seq2seq4repair_space>Class,<seq2seq4repair_space>Class)<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>used" ) ) ; } } <START_BUG> return ensureOpenIfAvailable ( ( ( ICacheInternal < K , V > ) ( cache ) ) ) ; <END_BUG> } protected < K , V > ICacheInternal < K , V > ensureOpenIfAvailable ( ICacheInternal < K , V > cache ) { } protected < K , V > ICacheInternal < ? , ? > getCacheUnchecked ( String cacheName ) { } @ Override public Iterable < String > getCacheNames ( ) { } @ Override public void destroyCache ( String cacheName ) { } protected void removeCacheConfigFromLocal ( String cacheName ) { } private String registerLifecycleListener ( ) { } private void deregisterLifecycleListener ( ) { } @ Override public void close ( ) { } @ Override public void destroy ( ) { } @ Override public boolean isClosed ( ) { } protected void checkIfManagerNotClosed ( ) { } protected String cacheNamePrefix ( ) { } protected String getCacheNameWithPrefix ( String name ) { } protected < K , V , C extends Configuration < K , V > > CacheConfig < K , V > createCacheConfig ( String cacheName , C configuration ) { } protected < K , V > void registerListeners ( CacheConfig < K , V > cacheConfig , ICacheInternal < K , V > source ) { } @ Override public String toString ( ) { } protected abstract < K , V > void addCacheConfigIfAbsent ( CacheConfig < K , V > cacheConfig ) { } protected abstract < K , V > ICacheInternal < K , V > createCacheProxy ( CacheConfig < K , V > cacheConfig ) { } protected abstract < K , V > CacheConfig < K , V > findConfig ( String cacheName , String simpleCacheName , boolean createAlsoOnOthers , boolean syncCreate ) { } protected abstract < K , V > CacheConfig < K , V > createConfig ( String cacheName , CacheConfig < K , V > config , boolean createAlsoOnOthers , boolean syncCreate ) { } protected abstract < K , V > CacheConfig < K , V > getCacheConfigLocal ( String cacheName ) { } protected abstract < K , V > CacheConfig < K , V > createConfigOnPartition ( CacheConfig < K , V > cacheConfig ) { } protected abstract < K , V > CacheConfig < K , V > getCacheConfigFromPartition ( String cacheName , String simpleCacheName ) { } protected abstract void postClose ( ) { } }

Fix:
return null ;