Buggy code:
; public int modifiers = AccDefault ; public int modifiersSourceStart ; public Annotation [ ] annotations ; public char [ ] name ; public TypeReference superclass ; public TypeReference [ ] superInterfaces ; public FieldDeclaration [ ] fields ; public AbstractMethodDeclaration [ ] methods ; public TypeDeclaration [ ] memberTypes ; public SourceTypeBinding binding ; public ClassScope scope ; public MethodScope initializerScope ; public MethodScope staticInitializerScope ; public boolean ignoreFurtherInvestigation = false ; public int maxFieldCount ; public int declarationSourceStart ; public int declarationSourceEnd ; public int bodyStart ; public int bodyEnd ; protected boolean hasBeenGenerated = false ; public CompilationResult compilationResult ; public MethodDeclaration [ ] missingAbstractMethods ; public Javadoc javadoc ; public QualifiedAllocationExpression allocation ; public TypeDeclaration enclosingType ; public FieldBinding enumValuesSyntheticfield ; public TypeParameter [ ] typeParameters ; public TypeDeclaration ( CompilationResult compilationResult ) { } public void abort ( int abortLevel , IProblem problem ) { } public final void addClinit ( ) { } public MethodDeclaration addMissingAbstractMethodFor ( MethodBinding methodBinding ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void analyseCode ( ClassScope enclosingClassScope ) { } public void analyseCode ( ClassScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void analyseCode ( CompilationUnitScope unitScope ) { } public boolean checkConstructors ( Parser parser ) { } public CompilationResult compilationResult ( ) { } public ConstructorDeclaration createDefaultConstructor ( boolean needExplicitConstructorCall , boolean needToInsert ) { } public MethodBinding createDefaultConstructorWithBinding ( MethodBinding inheritedConstructorBinding ) { } public FieldDeclaration declarationOf ( FieldBinding fieldBinding ) { } public TypeDeclaration declarationOf ( MemberTypeBinding memberTypeBinding ) { } public AbstractMethodDeclaration declarationOf ( MethodBinding methodBinding ) { } public TypeDeclaration declarationOfType ( char [ ] [ ] typeName ) { } public void generateCode ( ClassFile enclosingClassFile ) { } public void generateCode ( BlockScope blockScope , CodeStream codeStream ) { } public void generateCode ( ClassScope classScope , ClassFile enclosingClassFile ) { } public void generateCode ( CompilationUnitScope unitScope ) { } public int getKind ( ) { } public boolean hasErrors ( ) { } public void internalAnalyseCode ( FlowContext flowContext , FlowInfo flowInfo ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageEnclosingInstanceAccessIfNecessary ( ClassScope currentScope , FlowInfo flowInfo ) { } public final boolean needClassInitMethod ( ) { } public void parseMethod ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printBody ( int indent , StringBuffer output ) { } public StringBuffer printHeader ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void resolve ( ) { SourceTypeBinding sourceType = this . binding ; if ( sourceType == null ) { this . ignoreFurtherInvestigation = true ; return ; } try { <START_BUG> ASTNode . resolveAnnotations ( this . annotations , scope ) ; <END_BUG> if ( ( ( this . bits ) & ( UndocumentedEmptyBlockMASK ) ) != 0 ) { this . scope . problemReporter ( ) . undocumentedEmptyBlock ( ( ( this . bodyStart ) - 1 ) , this . bodyEnd ) ; } boolean needSerialVersion = ( ( ( ( this . scope . environment ( ) . options . getSeverity ( CompilerOptions . MissingSerialVersion ) ) != ( ProblemSeverities . Ignore ) ) && ( sourceType . isClass ( ) ) ) && ( ! ( sourceType . isAbstract ( ) ) ) ) && ( ( sourceType . findSuperTypeErasingTo ( TypeIds . T_JavaIoSerializable , false ) ) != null ) ; if ( ( ( this . typeParameters ) != null ) && ( scope . getJavaLangThrowable ( ) . isSuperclassOf ( sourceType ) ) ) { this . scope . problemReporter ( ) . genericTypeCannotExtendThrowable ( this ) ; } this . maxFieldCount = 0 ; int lastVisibleFieldID = - 1 ; if ( ( this . fields ) != null ) { for ( int i = 0 , count = this . fields . length ; i < count ; i ++ ) { FieldDeclaration field = this . fields [ i ] ; switch ( field . getKind ( ) ) { case AbstractVariableDeclaration . FIELD : case AbstractVariableDeclaration . ENUM_CONSTANT : FieldBinding fieldBinding = field . binding ; if ( fieldBinding == null ) { if ( ( field . initialization ) != null ) field . initialization . resolve ( ( field . isStatic ( ) ? this . staticInitializerScope : this . initializerScope ) ) ; this . ignoreFurtherInvestigation = true ; continue ; } if ( ( ( needSerialVersion && ( ( ( fieldBinding . modifiers ) & ( ( AccStatic ) | ( AccFinal ) ) ) == ( ( AccStatic ) | ( AccFinal ) ) ) ) && ( CharOperation . equals ( TypeConstants . SERIALVERSIONUID , fieldBinding . name ) ) ) && ( ( BaseTypes . LongBinding ) == ( fieldBinding . type ) ) ) { needSerialVersion = false ; } ( this . maxFieldCount ) ++ ; lastVisibleFieldID = field . binding . id ; break ; case AbstractVariableDeclaration . INITIALIZER : ( ( Initializer ) ( field ) ) . lastVisibleFieldID = lastVisibleFieldID + 1 ; break ; } field . resolve ( ( field . isStatic ( ) ? this . staticInitializerScope : this . initializerScope ) ) ; } } if ( needSerialVersion ) { this . scope . problemReporter ( ) . missingSerialVersion ( this ) ; } if ( ( this . memberTypes ) != null ) { for ( int i = 0 , count = this . memberTypes . length ; i < count ; i ++ ) { this . memberTypes [ i ] . resolve ( this . scope ) ; }

Fix:
ASTNode . resolveAnnotations ( this . annotations , this . staticInitializerScope ) ;