Buggy code:
public class SingleNameReference extends NameReference implements OperatorIds { public char [ ] token ; public MethodBinding [ ] syntheticAccessors ; public static final int READ = 0 ; public static final int WRITE = 1 ; public SingleNameReference ( char [ ] source , long pos ) { } public FlowInfo analyseAssignment ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , Assignment assignment , boolean isCompound ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , boolean valueRequired ) { } public TypeBinding checkFieldAccess ( BlockScope scope ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , MethodBinding writeAccessor , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void generateReceiver ( CodeStream codeStream ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageSyntheticReadAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageSyntheticWriteAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding reportError ( BlockScope scope ) { } public TypeBinding resolveType ( BlockScope scope ) { this . actualReceiverType = this . receiverType = scope . enclosingSourceType ( ) ; <START_BUG> if ( ( this . codegenBinding = this . binding = scope . getBinding ( token , ( ( bits ) & ( ASTNode . RestrictiveFlagMASK ) ) , this ) ) . isValidBinding ( ) ) { <END_BUG> switch ( ( bits ) & ( ASTNode . RestrictiveFlagMASK ) ) { case VARIABLE : case ( VARIABLE ) | ( TypeConstants . TYPE ) : if ( ( binding ) instanceof VariableBinding ) { VariableBinding variable = ( ( VariableBinding ) ( binding ) ) ; if ( ( binding ) instanceof LocalVariableBinding ) { bits &= ~ ( ASTNode . RestrictiveFlagMASK ) ; bits |= LOCAL ; if ( ( ( this . bits ) & ( IsStrictlyAssignedMASK ) ) == 0 ) { constant = variable . constant ; } else { constant = NotAConstant ; } if ( ( ! ( variable . isFinal ( ) ) ) && ( ( ( bits ) & ( ASTNode . DepthMASK ) ) != 0 ) ) { scope . problemReporter ( ) . cannotReferToNonFinalOuterLocal ( ( ( LocalVariableBinding ) ( variable ) ) , this ) ; } return this . resolvedType = variable . type ; } FieldBinding field = ( ( FieldBinding ) ( this . binding ) ) ; if ( ( ! ( field . isStatic ( ) ) ) && ( ( scope . environment ( ) . options . getSeverity ( CompilerOptions . UnqualifiedFieldAccess ) ) != ( ProblemSeverities . Ignore ) ) ) { scope . problemReporter ( ) . unqualifiedFieldAccess ( this , field ) ; } return this . resolvedType = checkFieldAccess ( scope ) ; } bits &= ~ ( ASTNode . RestrictiveFlagMASK ) ; bits |= TypeConstants . TYPE ; case TypeConstants . TYPE : constant = Constant . NotAConstant ; if ( isTypeUseDeprecated ( ( ( TypeBinding ) ( binding ) ) , scope ) ) scope . problemReporter ( ) . deprecatedType ( ( ( TypeBinding ) ( binding ) ) , this ) ; return this . resolvedType = ( ( TypeBinding ) ( binding ) ) ; } } return this . resolvedType = this . reportError ( scope ) ; } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } public String unboundReferenceErrorName ( ) { } }

Fix:
if ( ( this . codegenBinding = this . binding = scope . getBinding ( token , ( ( bits ) & ( ASTNode . RestrictiveFlagMASK ) ) , this , true ) ) . isValidBinding ( ) ) {