Program: 17255
Project: 17255
Buggy source:
/** 
 * Get detailed data about an annotated method for a specific targeted class
 * @param method The method that to get details for
 * @param targetClass The class that is being targeted with the invocation
 * @return The detailed method data
 * @throws AnnotationFormatError if an invalid combination of annotations exist on the method
 */
@Override public StaticCacheInvocationContext<? extends Annotation> getMethodDetails(Method method,Class<? extends Object> targetClass){
  final MethodKey methodKey=new MethodKey(method,targetClass);
  StaticCacheInvocationContext<? extends Annotation> staticCacheInvocationContext=this.methodDetailsCache.get(methodKey);
  if (staticCacheInvocationContext != null) {
    return staticCacheInvocationContext;
  }
  final CacheDefaults cacheDefaultsAnnotation=targetClass.getAnnotation(CacheDefaults.class);
  final CacheResult cacheResultAnnotation=getAnnotation(CacheResult.class,method,targetClass);
  final CachePut cachePutAnnotation=getAnnotation(CachePut.class,method,targetClass);
  final CacheRemoveEntry cacheRemoveEntryAnnotation=getAnnotation(CacheRemoveEntry.class,method,targetClass);
  final CacheRemoveAll cacheRemoveAllAnnotation=getAnnotation(CacheRemoveAll.class,method,targetClass);
  if (cacheResultAnnotation == null && cachePutAnnotation == null && cacheRemoveEntryAnnotation == null && cacheRemoveAllAnnotation == null) {
    return null;
  }
 else   if (!(cacheResultAnnotation != null ^ cachePutAnnotation != null ^ cacheRemoveEntryAnnotation != null ^ cacheRemoveAllAnnotation != null)) {
    throw new AnnotationFormatError("String_Node_Str" + method + "String_Node_Str");
  }
 else   if (cacheResultAnnotation != null) {
    staticCacheInvocationContext=this.createCacheResultMethodDetails(cacheResultAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else   if (cachePutAnnotation != null) {
    staticCacheInvocationContext=this.createCachePutMethodDetails(cachePutAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else   if (cacheRemoveEntryAnnotation != null) {
    staticCacheInvocationContext=this.createCacheRemoveEntryMethodDetails(cacheRemoveEntryAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else   if (cacheRemoveAllAnnotation != null) {
    staticCacheInvocationContext=this.createCacheRemoveAllMethodDetails(cacheRemoveAllAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else {
    return null;
  }
  final StaticCacheInvocationContext<? extends Annotation> existingMethodDetails=this.methodDetailsCache.putIfAbsent(methodKey,staticCacheInvocationContext);
  if (existingMethodDetails != null) {
    return existingMethodDetails;
  }
  return staticCacheInvocationContext;
}

Fixed version (ground truth):
/** 
 * Get detailed data about an annotated method for a specific targeted class
 * @param method The method that to get details for
 * @param targetClass The class that is being targeted with the invocation
 * @return The detailed method data
 * @throws AnnotationFormatError if an invalid combination of annotations exist on the method
 */
@Override public StaticCacheInvocationContext<? extends Annotation> getMethodDetails(Method method,Class<? extends Object> targetClass){
  final MethodKey methodKey=new MethodKey(method,targetClass);
  StaticCacheInvocationContext<? extends Annotation> staticCacheInvocationContext=this.methodDetailsCache.get(methodKey);
  if (staticCacheInvocationContext != null) {
    return staticCacheInvocationContext;
  }
  Class<?> clazz=targetClass;
  CacheDefaults annotation=null;
  while (annotation == null && clazz != null) {
    annotation=clazz.getAnnotation(CacheDefaults.class);
    if (annotation == null) {
      clazz=clazz.getSuperclass();
    }
  }
  final CacheDefaults cacheDefaultsAnnotation=annotation;
  final CacheResult cacheResultAnnotation=getAnnotation(CacheResult.class,method,targetClass);
  final CachePut cachePutAnnotation=getAnnotation(CachePut.class,method,targetClass);
  final CacheRemoveEntry cacheRemoveEntryAnnotation=getAnnotation(CacheRemoveEntry.class,method,targetClass);
  final CacheRemoveAll cacheRemoveAllAnnotation=getAnnotation(CacheRemoveAll.class,method,targetClass);
  if (cacheResultAnnotation == null && cachePutAnnotation == null && cacheRemoveEntryAnnotation == null && cacheRemoveAllAnnotation == null) {
    return null;
  }
 else   if (!(cacheResultAnnotation != null ^ cachePutAnnotation != null ^ cacheRemoveEntryAnnotation != null ^ cacheRemoveAllAnnotation != null)) {
    throw new AnnotationFormatError("String_Node_Str" + method + "String_Node_Str");
  }
 else   if (cacheResultAnnotation != null) {
    staticCacheInvocationContext=this.createCacheResultMethodDetails(cacheResultAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else   if (cachePutAnnotation != null) {
    staticCacheInvocationContext=this.createCachePutMethodDetails(cachePutAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else   if (cacheRemoveEntryAnnotation != null) {
    staticCacheInvocationContext=this.createCacheRemoveEntryMethodDetails(cacheRemoveEntryAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else   if (cacheRemoveAllAnnotation != null) {
    staticCacheInvocationContext=this.createCacheRemoveAllMethodDetails(cacheRemoveAllAnnotation,cacheDefaultsAnnotation,method,targetClass);
  }
 else {
    return null;
  }
  final StaticCacheInvocationContext<? extends Annotation> existingMethodDetails=this.methodDetailsCache.putIfAbsent(methodKey,staticCacheInvocationContext);
  if (existingMethodDetails != null) {
    return existingMethodDetails;
  }
  return staticCacheInvocationContext;
}