Buggy code:
public abstract class CacheAspectSupport implements InitializingBean { public interface Invoker { Object invoke ( ) { } } protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private CacheManager cacheManager ; private CacheOperationSource cacheOperationSource ; private final ExpressionEvaluator evaluator = new ExpressionEvaluator ( ) ; private KeyGenerator keyGenerator = new DefaultKeyGenerator ( ) ; private boolean initialized = false ; private static final String CACHEABLE = "cacheable" ; private static final String UPDATE = "cacheupdate" ; private static final String EVICT = "cacheevict" ; public void setCacheManager ( CacheManager cacheManager ) { } public CacheManager getCacheManager ( ) { } public void setCacheOperationSources ( CacheOperationSource ... cacheDefinitionSources ) { } public void setCacheOperationSource ( CacheOperationSource cacheOperationSource ) { } public CacheOperationSource getCacheOperationSource ( ) { } public void setKeyGenerator ( KeyGenerator keyGenerator ) { } public KeyGenerator getKeyGenerator ( ) { } public void afterPropertiesSet ( ) { } protected String methodIdentification ( Method method , Class < ? > targetClass ) { } protected Collection < Cache > getCaches ( CacheOperation operation ) { } protected CacheAspectSupport . CacheOperationContext getOperationContext ( CacheOperation operation , Method method , Object [ ] args , Object target , Class < ? > targetClass ) { } protected Object execute ( CacheAspectSupport . Invoker invoker , Object target , Method method , Object [ ] args ) { } private void inspectCacheEvicts ( Collection < CacheAspectSupport . CacheOperationContext > evictions ) { } private CacheAspectSupport . CacheStatus inspectCacheables ( Collection < CacheAspectSupport . CacheOperationContext > cacheables ) { } private static class CacheStatus { final Map < CacheAspectSupport . CacheOperationContext , Object > cUpdates ; final boolean updateRequired ; final Object retVal ; CacheStatus ( Map < CacheAspectSupport . CacheOperationContext , Object > cUpdates , boolean updateRequired , Object retVal ) { } } private Map < CacheAspectSupport . CacheOperationContext , Object > inspectCacheUpdates ( Collection < CacheAspectSupport . CacheOperationContext > updates ) { } private void update ( Map < CacheAspectSupport . CacheOperationContext , Object > updates , Object retVal ) { } private Map < String , Collection < CacheAspectSupport . CacheOperationContext > > createOperationContext ( Collection < CacheOperation > cacheOp , Method method , Object [ ] args , Object target , Class < ? > targetClass ) { Map < String , Collection < CacheAspectSupport . CacheOperationContext > > map = new LinkedHashMap < String , Collection < CacheAspectSupport . CacheOperationContext > > ( 3 ) ; Collection < CacheAspectSupport . CacheOperationContext > cacheables = new ArrayList < CacheAspectSupport . CacheOperationContext > ( ) ; Collection < CacheAspectSupport . CacheOperationContext > evicts = new ArrayList < CacheAspectSupport . CacheOperationContext > ( ) ; Collection < CacheAspectSupport . CacheOperationContext > updates = new ArrayList < CacheAspectSupport . CacheOperationContext > ( ) ; for ( CacheOperation cacheOperation : cacheOp ) { CacheAspectSupport . CacheOperationContext opContext = getOperationContext ( cacheOperation , method , args , target , targetClass ) ; if ( cacheOperation instanceof CacheableOperation ) { cacheables . add ( opContext ) ; } if ( cacheOperation instanceof CacheEvictOperation ) { evicts . add ( opContext ) ; } <START_BUG> if ( cacheOperation instanceof CacheUpdateOperation ) { <END_BUG> updates . add ( opContext ) ; } } map . put ( CacheAspectSupport . CACHEABLE , cacheables ) ; map . put ( CacheAspectSupport . EVICT , evicts ) ; map . put ( CacheAspectSupport . UPDATE , updates ) ; return map ; } protected class CacheOperationContext { private final CacheOperation operation ; private final Collection < Cache > caches ; private final Object target ; private final Method method ; private final Object [ ] args ; private final EvaluationContext evalContext ; public CacheOperationContext ( CacheOperation operation , Method method , Object [ ] args , Object target , Class < ? > targetClass ) { } protected boolean isConditionPassing ( ) { } protected Object generateKey ( ) { } protected Collection < Cache > getCaches ( ) { } } }

Fix:
if ( cacheOperation instanceof CachePutOperation ) {