Buggy code:
public class ClassScope extends Scope { public TypeDeclaration referenceContext ; public ClassScope ( Scope parent , TypeDeclaration context ) { } void buildAnonymousTypeBinding ( SourceTypeBinding enclosingType , ReferenceBinding supertype ) { } private void buildFields ( ) { if ( ( referenceContext . fields ) == null ) { referenceContext . binding . fields = NoFields ; return ; } FieldDeclaration [ ] fields = referenceContext . fields ; int size = fields . length ; int count = 0 ; for ( int i = 0 ; i < size ; i ++ ) if ( fields [ i ] . isField ( ) ) count ++ ; FieldBinding [ ] fieldBindings = new FieldBinding [ count ] ; HashtableOfObject knownFieldNames = new HashtableOfObject ( count ) ; boolean duplicate = false ; count = 0 ; for ( int i = 0 ; i < size ; i ++ ) { FieldDeclaration field = fields [ i ] ; if ( ! ( field . isField ( ) ) ) { if ( referenceContext . binding . isInterface ( ) ) problemReporter ( ) . interfaceCannotHaveInitializers ( referenceContext . binding , field ) ; } else { <START_BUG> FieldBinding fieldBinding = new FieldBinding ( field , null , referenceContext . binding ) ; <END_BUG> checkAndSetModifiersForField ( fieldBinding , field ) ; if ( knownFieldNames . containsKey ( field . name ) ) { duplicate = true ; FieldBinding previousBinding = ( ( FieldBinding ) ( knownFieldNames . get ( field . name ) ) ) ; if ( previousBinding != null ) { for ( int f = 0 ; f < i ; f ++ ) { FieldDeclaration previousField = fields [ f ] ; if ( ( previousField . binding ) == previousBinding ) { problemReporter ( ) . duplicateFieldInType ( referenceContext . binding , previousField ) ; previousField . binding = null ; break ; } } } knownFieldNames . put ( field . name , null ) ; problemReporter ( ) . duplicateFieldInType ( referenceContext . binding , field ) ; field . binding = null ; } else { knownFieldNames . put ( field . name , fieldBinding ) ; if ( fieldBinding != null ) fieldBindings [ ( count ++ ) ] = fieldBinding ; } } } if ( duplicate ) { FieldBinding [ ] newFieldBindings = new FieldBinding [ ( knownFieldNames . size ( ) ) - 1 ] ; size = count ; count = 0 ; for ( int i = 0 ; i < size ; i ++ ) { FieldBinding fieldBinding = fieldBindings [ i ] ; if ( ( knownFieldNames . get ( fieldBinding . name ) ) != null ) newFieldBindings [ ( count ++ ) ] = fieldBinding ; } fieldBindings = newFieldBindings ; } if ( count != ( fieldBindings . length ) ) System . arraycopy ( fieldBindings , 0 , ( fieldBindings = new FieldBinding [ count ] ) , 0 , count ) ; for ( int i = 0 ; i < count ; i ++ ) fieldBindings [ i ] . id = i ; referenceContext . binding . fields = fieldBindings ; } void buildFieldsAndMethods ( ) { } private LocalTypeBinding buildLocalType ( SourceTypeBinding enclosingType , PackageBinding packageBinding ) { } void buildLocalTypeBinding ( SourceTypeBinding enclosingType ) { } private void buildMethods ( ) { } SourceTypeBinding buildType ( SourceTypeBinding enclosingType , PackageBinding packageBinding ) { } private void checkAndSetModifiers ( ) { } private void checkAndSetModifiersForField ( FieldBinding fieldBinding , FieldDeclaration fieldDecl ) { } private void checkForInheritedMemberTypes ( SourceTypeBinding sourceType ) { } private void connectMemberTypes ( ) { } private boolean connectSuperclass ( ) { } private boolean connectSuperInterfaces ( ) { } void connectTypeHierarchy ( ) { } private void connectTypeHierarchyWithoutMembers ( ) { } private boolean detectCycle ( SourceTypeBinding sourceType , ReferenceBinding superType , TypeReference reference ) { } private ReferenceBinding findSupertype ( TypeReference typeReference ) { } public ProblemReporter problemReporter ( ) { } public TypeDeclaration referenceType ( ) { } public String toString ( ) { } }

Fix:
FieldBinding fieldBinding = new FieldBinding ( field , null , ( ( field . modifiers ) | ( AccUnresolved ) ) , referenceContext . binding ) ;