Program: 17280
Project: 17280
Buggy source:
/** 
 * Handles the   {@link Cache#get(Object)} and {@link Cache#put(Object,Object)} logic as specified for the{@link CacheResult} annotation
 * @param cacheContextSource The intercepted invocation
 * @param invocation The intercepted invocation
 * @return The result from {@link #proceed(Object)}
 * @throws Throwable if {@link #proceed(Object)} threw
 */
public final Object cacheResult(CacheContextSource<I> cacheContextSource,I invocation) throws Throwable {
  final InternalCacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext=cacheContextSource.getCacheKeyInvocationContext(invocation);
  final CacheResultMethodDetails methodDetails=this.getStaticCacheKeyInvocationContext(cacheKeyInvocationContext,InterceptorType.CACHE_RESULT);
  final CacheResolver cacheResolver=methodDetails.getCacheResolver();
  final Cache<Object,Object> cache=cacheResolver.resolveCache(cacheKeyInvocationContext);
  final Cache<Object,Throwable> exceptionCache=getExceptionCache(cacheKeyInvocationContext,methodDetails);
  final CacheKeyGenerator cacheKeyGenerator=methodDetails.getCacheKeyGenerator();
  final CacheKey cacheKey=cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);
  final CacheResult cacheResultAnnotation=methodDetails.getCacheAnnotation();
  Object result;
  if (!cacheResultAnnotation.skipGet()) {
    result=cache.get(cacheKey);
    if (cacheResultAnnotation.cacheNull() && CacheContextSource.NULL_PLACEHOLDER.equals(result)) {
      return null;
    }
 else     if (result != null) {
      return result;
    }
    checkForCachedException(exceptionCache,cacheKey);
  }
  try {
    result=this.proceed(invocation);
    if (result != null) {
      cache.put(cacheKey,result);
    }
 else     if (cacheResultAnnotation.cacheNull()) {
      cache.put(cacheKey,CacheContextSource.NULL_PLACEHOLDER);
    }
    return result;
  }
 catch (  Throwable t) {
    cacheException(exceptionCache,cacheKey,cacheResultAnnotation,t);
    throw t;
  }
}

Fixed version (ground truth):
/** 
 * Handles the   {@link Cache#get(Object)} and {@link Cache#put(Object,Object)} logic as specified for the{@link CacheResult} annotation
 * @param cacheContextSource The intercepted invocation
 * @param invocation The intercepted invocation
 * @return The result from {@link #proceed(Object)}
 * @throws Throwable if {@link #proceed(Object)} threw
 */
public final Object cacheResult(CacheContextSource<I> cacheContextSource,I invocation) throws Throwable {
  final InternalCacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext=cacheContextSource.getCacheKeyInvocationContext(invocation);
  final CacheResultMethodDetails methodDetails=this.getStaticCacheKeyInvocationContext(cacheKeyInvocationContext,InterceptorType.CACHE_RESULT);
  final CacheResolver cacheResolver=methodDetails.getCacheResolver();
  final Cache<Object,Object> cache=cacheResolver.resolveCache(cacheKeyInvocationContext);
  final Cache<Object,Throwable> exceptionCache=getExceptionCache(cacheKeyInvocationContext,methodDetails);
  final CacheKeyGenerator cacheKeyGenerator=methodDetails.getCacheKeyGenerator();
  final GeneratedCacheKey cacheKey=cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);
  final CacheResult cacheResultAnnotation=methodDetails.getCacheAnnotation();
  Object result;
  if (!cacheResultAnnotation.skipGet()) {
    result=cache.get(cacheKey);
    if (cacheResultAnnotation.cacheNull() && CacheContextSource.NULL_PLACEHOLDER.equals(result)) {
      return null;
    }
 else     if (result != null) {
      return result;
    }
    checkForCachedException(exceptionCache,cacheKey);
  }
  try {
    result=this.proceed(invocation);
    if (result != null) {
      cache.put(cacheKey,result);
    }
 else     if (cacheResultAnnotation.cacheNull()) {
      cache.put(cacheKey,CacheContextSource.NULL_PLACEHOLDER);
    }
    return result;
  }
 catch (  Throwable t) {
    cacheException(exceptionCache,cacheKey,cacheResultAnnotation,t);
    throw t;
  }
}