Buggy code:
public CaseStatement enclosingCase ; protected BlockScope ( int kind , Scope parent ) { } public BlockScope ( BlockScope parent ) { } public BlockScope ( BlockScope parent , boolean addToParentScope ) { } public BlockScope ( BlockScope parent , int variableCount ) { } public final void addAnonymousType ( TypeDeclaration anonymousType , ReferenceBinding superBinding ) { } public final void addLocalType ( TypeDeclaration localType ) { } public final void addLocalVariable ( LocalVariableBinding binding ) { } public void addSubscope ( Scope childScope ) { } public final boolean allowBlankFinalFieldAssignment ( FieldBinding binding ) { } String basicToString ( int tab ) { } private void checkAndSetModifiersForVariable ( LocalVariableBinding varBinding ) { } void computeLocalVariablePositions ( int ilocal , int initOffset , CodeStream codeStream ) { } public void emulateOuterAccess ( LocalVariableBinding outerLocalVariable ) { } public LocalDeclaration [ ] findLocalVariableDeclarations ( int position ) { } public final ReferenceBinding findLocalType ( char [ ] name ) { } public LocalVariableBinding findVariable ( char [ ] variable ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite , boolean needResolve ) { Binding binding = getBinding ( compoundName [ 0 ] , ( ( mask | ( Binding . TYPE ) ) | ( Binding . PACKAGE ) ) , invocationSite , needResolve ) ; invocationSite . setFieldIndex ( 1 ) ; if ( binding instanceof VariableBinding ) return binding ; CompilationUnitScope unitScope = compilationUnitScope ( ) ; unitScope . recordSimpleReference ( compoundName [ 0 ] ) ; if ( ! ( binding . isValidBinding ( ) ) ) return binding ; int length = compoundName . length ; int currentIndex = 1 ; foundType : if ( binding instanceof PackageBinding ) { PackageBinding packageBinding = ( ( PackageBinding ) ( binding ) ) ; while ( currentIndex < length ) { unitScope . recordReference ( packageBinding . compoundName , compoundName [ currentIndex ] ) ; binding = packageBinding . getTypeOrPackage ( compoundName [ ( currentIndex ++ ) ] ) ; invocationSite . setFieldIndex ( currentIndex ) ; if ( binding == null ) { if ( currentIndex == length ) { return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , null , ProblemReasons . NotFound ) ; } return new ProblemBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , ProblemReasons . NotFound ) ; } if ( binding instanceof ReferenceBinding ) { if ( ! ( binding . isValidBinding ( ) ) ) return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , null , binding . problemId ( ) ) ; if ( ! ( ( ( ReferenceBinding ) ( binding ) ) . canBeSeenBy ( this ) ) ) return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , ( ( ReferenceBinding ) ( binding ) ) , ProblemReasons . NotVisible ) ; break foundType ; } packageBinding = ( ( PackageBinding ) ( binding ) ) ; } return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , null , ProblemReasons . NotFound ) ; } binding = environment ( ) . convertToRawType ( ( ( ReferenceBinding ) ( binding ) ) ) ; while ( currentIndex < length ) { ReferenceBinding typeBinding = ( ( ReferenceBinding ) ( binding ) ) ; char [ ] nextName = compoundName [ ( currentIndex ++ ) ] ; invocationSite . setFieldIndex ( currentIndex ) ; invocationSite . setActualReceiverType ( typeBinding ) ; if ( ( ( mask & ( Binding . FIELD ) ) != 0 ) && ( ( binding = findField ( typeBinding , nextName , invocationSite , true ) ) != null ) ) { if ( ! ( binding . isValidBinding ( ) ) ) <START_BUG> return new ProblemFieldBinding ( ( ( FieldBinding ) ( binding ) ) , CharOperation . subarray ( compoundName , 0 , currentIndex ) , binding . problemId ( ) ) ; <END_BUG> break ; } if ( ( binding = findMemberType ( nextName , typeBinding ) ) == null ) { if ( ( mask & ( Binding . FIELD ) ) != 0 ) { return new ProblemBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , typeBinding , ProblemReasons . NotFound ) ; } return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , typeBinding , ProblemReasons . NotFound ) ; } if ( ! ( binding . isValidBinding ( ) ) ) return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , null , binding . problemId ( ) ) ; } if ( ( ( mask & ( Binding . FIELD ) ) != 0 ) && ( binding instanceof FieldBinding ) ) { FieldBinding field = ( ( FieldBinding ) ( binding ) ) ; if ( ! ( field . isStatic ( ) ) ) return new ProblemFieldBinding ( field , CharOperation . subarray ( compoundName , 0 , currentIndex ) , ProblemReasons . NonStaticReferenceInStaticContext ) ; return binding ; } if ( ( ( mask & ( Binding . TYPE ) ) != 0 ) && ( binding instanceof ReferenceBinding ) ) { return binding ; } return new ProblemBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , ProblemReasons . NotFound ) ; } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getEmulationPath ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch , boolean denyEnclosingArgInConstructorCall ) { } public final boolean isDuplicateLocalVariable ( char [ ] name ) { } public int maxShiftedOffset ( ) { } public ProblemReporter problemReporter ( ) { } public void propagateInnerEmulation ( ReferenceBinding targetType , boolean isEnclosingInstanceSupplied ) { }

Fix:
return new ProblemFieldBinding ( ( ( ProblemFieldBinding ) ( binding ) ) . closestMatch , CharOperation . subarray ( compoundName , 0 , currentIndex ) , binding . problemId ( ) ) ;