Buggy code:
public class BcelObjectType extends AbstractReferenceTypeDelegate { public JavaClass javaClass ; private LazyClassGen lazyClassGen = null ; private int modifiers ; private String className ; private String superclassSignature ; private String superclassName ; private String [ ] interfaceSignatures ; private ResolvedMember [ ] fields = null ; private ResolvedMember [ ] methods = null ; private ResolvedType [ ] annotationTypes = null ; private AnnotationX [ ] annotations = null ; private TypeVariable [ ] typeVars = null ; private String retentionPolicy ; private AnnotationTargetKind [ ] annotationTargetKinds ; private WeaverVersionInfo wvInfo = WeaverVersionInfo . UNKNOWN ; private ResolvedPointcutDefinition [ ] pointcuts = null ; private ResolvedMember [ ] privilegedAccess = null ; private WeaverStateInfo weaverState = null ; private PerClause perClause = null ; private List typeMungers = Collections . EMPTY_LIST ; private List declares = Collections . EMPTY_LIST ; private FormalTypeParameter [ ] formalsForResolution = null ; private ClassSignature cachedGenericClassTypeSignature ; private String declaredSignature = null ; private boolean hasBeenWoven = false ; private boolean isGenericType = false ; private boolean isInterface ; private boolean isEnum ; private boolean isAnnotation ; private boolean isAnonymous ; private boolean isNested ; private boolean isObject = false ; private boolean isAnnotationStyleAspect = false ; private boolean isCodeStyleAspect = false ; private int bitflag = 0 ; private static final int DISCOVERED_ANNOTATION_RETENTION_POLICY = 1 ; private static final int UNPACKED_GENERIC_SIGNATURE = 2 ; private static final int UNPACKED_AJATTRIBUTES = 4 ; private static final int DISCOVERED_ANNOTATION_TARGET_KINDS = 8 ; private static final int DISCOVERED_DECLARED_SIGNATURE = 16 ; private static final int DISCOVERED_WHETHER_ANNOTATION_STYLE = 32 ; private static final int DAMAGED = 64 ; BcelObjectType ( ReferenceType resolvedTypeX , JavaClass javaClass , boolean exposedToWeaver ) { } public void setJavaClass ( JavaClass newclass ) { } private void initializeFromJavaclass ( ) { } public boolean isInterface ( ) { } public boolean isEnum ( ) { } public boolean isAnnotation ( ) { } public boolean isAnonymous ( ) { } public boolean isNested ( ) { } public int getModifiers ( ) { } public ResolvedType getSuperclass ( ) { } public ResolvedType [ ] getDeclaredInterfaces ( ) { } public ResolvedMember [ ] getDeclaredMethods ( ) { } public ResolvedMember [ ] getDeclaredFields ( ) { } public TypeVariable [ ] getTypeVariables ( ) { } public Collection getTypeMungers ( ) { } public Collection getDeclares ( ) { } public Collection getPrivilegedAccesses ( ) { } public ResolvedMember [ ] getDeclaredPointcuts ( ) { } public boolean isAspect ( ) { } public boolean isAnnotationStyleAspect ( ) { } private void ensureAspectJAttributesUnpacked ( ) { } private Aspect processAttributes ( List attributeList , List pointcuts , boolean fromAnnotations ) { } private void resolveAnnotationDeclares ( List attributeList ) { } public PerClause getPerClause ( ) { } public JavaClass getJavaClass ( ) { } public void ensureDelegateConsistent ( ) { } public void resetState ( ) { } public void finishedWith ( ) { } public WeaverStateInfo getWeaverState ( ) { } void setWeaverState ( WeaverStateInfo weaverState ) { } public void printWackyStuff ( PrintStream out ) { } public LazyClassGen getLazyClassGen ( ) { } public boolean isSynthetic ( ) { } public WeaverVersionInfo getWeaverVersionAttribute ( ) { } public void addParent ( ResolvedType newParent ) { } public ResolvedType [ ] getAnnotationTypes ( ) { } public AnnotationX [ ] getAnnotations ( ) { } public boolean hasAnnotation ( UnresolvedType ofType ) { } public void addAnnotation ( AnnotationX annotation ) { } public boolean isAnnotationWithRuntimeRetention ( ) { } public String getRetentionPolicy ( ) { } public boolean canAnnotationTargetType ( ) { } public AnnotationTargetKind [ ] getAnnotationTargetKinds ( ) { } private void ensureAnnotationsUnpacked ( ) { if ( ( annotationTypes ) == null ) { Annotation [ ] annos = javaClass . getAnnotations ( ) ; if ( ( annos == null ) || ( ( annos . length ) == 0 ) ) { annotationTypes = ResolvedType . NONE ; annotations = AnnotationX . NONE ; } else { World w = getResolvedTypeX ( ) . getWorld ( ) ; annotationTypes = new ResolvedType [ annos . length ] ; annotations = new AnnotationX [ annos . length ] ; for ( int i = 0 ; i < ( annos . length ) ; i ++ ) { Annotation annotation = annos [ i ] ; <START_BUG> annotationTypes [ i ] = w . resolve ( UnresolvedType . forName ( annotation . getTypeName ( ) ) ) ; <END_BUG> annotations [ i ] = new AnnotationX ( annotation , w ) ; } } } } public String getDeclaredGenericSignature ( ) { } ClassSignature getGenericClassTypeSignature ( ) { } private void ensureGenericSignatureUnpacked ( ) { } public FormalTypeParameter [ ] getAllFormals ( ) { } private boolean isNestedClass ( ) { } private ReferenceType getOuterClass ( ) { } private FormalTypeParameter [ ] getFormalTypeParametersFromOuterClass ( ) { } private void ensureGenericInfoProcessed ( ) { } public boolean isGeneric ( ) { } public String toString ( ) { } public void evictWeavingState ( ) { } public void weavingCompleted ( ) { } public AjAttribute [ ] getAttributes ( String name ) { } public String [ ] getAttributeNames ( ) { } public void addPointcutDefinition ( ResolvedPointcutDefinition d ) { } public boolean hasBeenWoven ( ) { } }

Fix:
annotationTypes [ i ] = w . resolve ( UnresolvedType . forSignature ( annotation . getTypeSignature ( ) ) ) ;