Buggy code:
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 ; private MethodDeclaration [ ] missingAbstractMethods ; public Annotation annotation ; public TypeDeclaration ( CompilationResult compilationResult ) { } public void abort ( int abortLevel ) { } 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 createsInternalConstructor ( boolean needExplicitConstructorCall , boolean needToInsert ) { } 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 boolean hasErrors ( ) { } public void internalAnalyseCode ( FlowContext flowContext , FlowInfo flowInfo ) { } public boolean isInterface ( ) { } 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 tab , 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 ( ) { if ( ( binding ) == null ) { ignoreFurtherInvestigation = true ; return ; } try { if ( ( ( this . bits ) & ( UndocumentedEmptyBlockMASK ) ) != 0 ) { this . scope . problemReporter ( ) . undocumentedEmptyBlock ( ( ( this . bodyStart ) - 1 ) , ( ( this . bodyEnd ) + 1 ) ) ; } if ( ( binding . superclass ) != null ) if ( isTypeUseDeprecated ( binding . superclass , scope ) ) scope . problemReporter ( ) . deprecatedType ( binding . superclass , superclass ) ; if ( ( superInterfaces ) != null ) for ( int i = superInterfaces . length ; ( -- i ) >= 0 ; ) if ( ( superInterfaces [ i ] . resolvedType ) != null ) if ( isTypeUseDeprecated ( superInterfaces [ i ] . resolvedType , scope ) ) scope . problemReporter ( ) . deprecatedType ( superInterfaces [ i ] . resolvedType , superInterfaces [ i ] ) ; maxFieldCount = 0 ; int lastFieldID = - 1 ; if ( ( fields ) != null ) { for ( int i = 0 , count = fields . length ; i < count ; i ++ ) { FieldDeclaration field = fields [ i ] ; if ( field . isField ( ) ) { if ( ( field . binding ) == null ) { if ( ( field . initialization ) != null ) field . initialization . resolve ( ( field . isStatic ( ) ? staticInitializerScope : initializerScope ) ) ; ignoreFurtherInvestigation = true ; continue ; } ( maxFieldCount ) ++ ; lastFieldID = field . binding . id ; } else { ( ( Initializer ) ( field ) ) . lastFieldID = lastFieldID + 1 ; } field . resolve ( ( field . isStatic ( ) ? staticInitializerScope : initializerScope ) ) ; } } if ( ( memberTypes ) != null ) { for ( int i = 0 , count = memberTypes . length ; i < count ; i ++ ) { memberTypes [ i ] . resolve ( scope ) ; } } int missingAbstractMethodslength = ( ( this . missingAbstractMethods ) == null ) ? 0 : this . missingAbstractMethods . length ; int methodsLength = ( ( this . methods ) == null ) ? 0 : methods . length ; if ( ( methodsLength + missingAbstractMethodslength ) > 65535 ) { scope . problemReporter ( ) . tooManyMethods ( this ) ; } if ( ( methods ) != null ) { for ( int i = 0 , count = methods . length ; i < count ; i ++ ) { methods [ i ] . resolve ( scope ) ; } } if ( ( this . annotation ) != null ) { this . annotation . resolve ( this . scope ) ; } else { if ( ( ( this . modifiers ) & ( AccPublic ) ) != 0 ) { <START_BUG> this . scope . problemReporter ( ) . annotationMissingForPublic ( this . sourceStart , this . sourceEnd , false ) ; <END_BUG> } } } catch ( org . eclipse . jdt . internal . compiler . problem . AbortType e ) { this . ignoreFurtherInvestigation = true ; return ; } } public void resolve ( BlockScope blockScope ) { } public void resolve ( ClassScope upperScope ) { } public void resolve ( CompilationUnitScope upperScope ) { } public void tagAsHavingErrors ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , CompilationUnitScope unitScope ) { } void updateMaxFieldCount ( ) { } }

Fix:
this . scope . problemReporter ( ) . annotationMissingForPublic ( this . sourceStart , this . sourceEnd ) ;