Buggy code:
public void generateReceiver ( CodeStream codeStream ) { } public TypeBinding [ ] genericTypeArguments ( ) { } protected FieldBinding getCodegenBinding ( int index ) { } protected TypeBinding getFinalReceiverType ( ) { } protected TypeBinding getGenericCast ( int index ) { } public TypeBinding getOtherFieldBindings ( BlockScope scope ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FieldBinding fieldBinding , int index , FlowInfo flowInfo ) { } public int nullStatus ( FlowInfo flowInfo ) { } public Constant optimizedBooleanConstant ( ) { } public TypeBinding postConversionType ( Scope scope ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding reportError ( BlockScope scope ) { } public TypeBinding resolveType ( BlockScope scope ) { this . actualReceiverType = scope . enclosingReceiverType ( ) ; this . constant = Constant . NotAConstant ; if ( ( this . binding = scope . getBinding ( this . tokens , ( ( this . bits ) & ( ASTNode . RestrictiveFlagMASK ) ) , this , true ) ) . isValidBinding ( ) ) { switch ( ( this . bits ) & ( ASTNode . RestrictiveFlagMASK ) ) { case Binding . VARIABLE : case ( Binding . TYPE ) | ( Binding . VARIABLE ) : if ( ( this . binding ) instanceof LocalVariableBinding ) { this . bits &= ~ ( ASTNode . RestrictiveFlagMASK ) ; this . bits |= Binding . LOCAL ; LocalVariableBinding local = ( ( LocalVariableBinding ) ( this . binding ) ) ; if ( ( ! ( local . isFinal ( ) ) ) && ( ( ( this . bits ) & ( ASTNode . DepthMASK ) ) != 0 ) ) { scope . problemReporter ( ) . cannotReferToNonFinalOuterLocal ( ( ( LocalVariableBinding ) ( this . binding ) ) , this ) ; } if ( ( ( local . type ) != null ) && ( ( ( local . type . tagBits ) & ( TagBits . HasMissingType ) ) != 0 ) ) { return null ; } this . resolvedType = getOtherFieldBindings ( scope ) ; if ( ( ( this . resolvedType ) != null ) && ( ( ( this . resolvedType . tagBits ) & ( TagBits . HasMissingType ) ) != 0 ) ) { FieldBinding lastField = this . otherBindings [ ( ( this . otherBindings . length ) - 1 ) ] ; scope . problemReporter ( ) . invalidField ( this , new ProblemFieldBinding ( lastField . declaringClass , lastField . name , ProblemReasons . NotFound ) , this . tokens . length , this . resolvedType . leafComponentType ( ) ) ; return null ; } return this . resolvedType ; } if ( ( this . binding ) instanceof FieldBinding ) { this . bits &= ~ ( ASTNode . RestrictiveFlagMASK ) ; this . bits |= Binding . FIELD ; FieldBinding fieldBinding = ( ( FieldBinding ) ( this . binding ) ) ; MethodScope methodScope = scope . methodScope ( ) ; ReferenceBinding declaringClass = fieldBinding . original ( ) . declaringClass ; SourceTypeBinding sourceType = methodScope . enclosingSourceType ( ) ; <START_BUG> if ( ( ( ( ( ( ( this . indexOfFirstFieldBinding ) == 1 ) || ( ( ( fieldBinding . modifiers ) & ( ClassFileConstants . AccEnum ) ) != 0 ) ) && ( sourceType == declaringClass ) ) && ( ( methodScope . lastVisibleFieldID ) >= 0 ) ) && ( ( fieldBinding . id ) >= ( methodScope . lastVisibleFieldID ) ) ) && ( ( ! ( fieldBinding . isStatic ( ) ) ) || ( methodScope . isStatic ) ) ) { <END_BUG> scope . problemReporter ( ) . forwardReference ( this , ( ( this . indexOfFirstFieldBinding ) - 1 ) , fieldBinding ) ; } if ( isFieldUseDeprecated ( fieldBinding , scope , ( ( ( ( this . bits ) & ( ASTNode . IsStrictlyAssigned ) ) != 0 ) && ( ( this . indexOfFirstFieldBinding ) == ( this . tokens . length ) ) ) ) ) { scope . problemReporter ( ) . deprecatedField ( fieldBinding , this ) ; } if ( fieldBinding . isStatic ( ) ) { if ( declaringClass . isEnum ( ) ) { if ( ( ( ( ( sourceType == declaringClass ) || ( ( sourceType . superclass ) == declaringClass ) ) && ( ( fieldBinding . constant ( ) ) == ( Constant . NotAConstant ) ) ) && ( ! ( methodScope . isStatic ) ) ) && ( methodScope . isInsideInitializerOrConstructor ( ) ) ) { scope . problemReporter ( ) . enumStaticFieldUsedDuringInitialization ( fieldBinding , this ) ; } } if ( ( ( ( this . indexOfFirstFieldBinding ) > 1 ) && ( ( fieldBinding . declaringClass ) != ( this . actualReceiverType ) ) ) && ( fieldBinding . declaringClass . canBeSeenBy ( scope ) ) ) { scope . problemReporter ( ) . indirectAccessToStaticField ( this , fieldBinding ) ; } } else { if ( ( ( this . indexOfFirstFieldBinding ) == 1 ) && ( ( scope . compilerOptions ( ) . getSeverity ( CompilerOptions . UnqualifiedFieldAccess ) ) != ( ProblemSeverities . Ignore ) ) ) { scope . problemReporter ( ) . unqualifiedFieldAccess ( this , fieldBinding ) ; } if ( ( ( this . indexOfFirstFieldBinding ) > 1 ) || ( scope . methodScope ( ) . isStatic ) ) { scope . problemReporter ( ) . staticFieldAccessToNonStaticVariable ( this , fieldBinding ) ; return null ; } } this . resolvedType = getOtherFieldBindings ( scope ) ;

Fix:
if ( ( ( ( ( ( ( ( this . indexOfFirstFieldBinding ) == 1 ) || ( ( ( fieldBinding . modifiers ) & ( ClassFileConstants . AccEnum ) ) != 0 ) ) || ( ( ! ( fieldBinding . isFinal ( ) ) ) && ( declaringClass . isEnum ( ) ) ) ) && ( sourceType == declaringClass ) ) && ( ( methodScope . lastVisibleFieldID ) >= 0 ) ) && ( ( fieldBinding . id ) >= ( methodScope . lastVisibleFieldID ) ) ) && ( ( ! ( fieldBinding . isStatic ( ) ) ) || ( methodScope . isStatic ) ) ) {