Buggy code:
public BlockScope [ ] shiftScopes ; public static final VariableBinding [ ] EmulationPathToImplicitThis = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInConstructorCall = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInStaticContext = new VariableBinding [ ] { } ; public Scope [ ] subscopes = new Scope [ 1 ] ; public int subscopeCount = 0 ; 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 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 ) , NotFound ) ; } return new ProblemBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , NotFound ) ; } if ( binding instanceof ReferenceBinding ) { if ( ! ( binding . isValidBinding ( ) ) ) return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , binding . problemId ( ) ) ; if ( ! ( ( ( ReferenceBinding ) ( binding ) ) . canBeSeenBy ( this ) ) ) return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , ( ( ReferenceBinding ) ( binding ) ) , NotVisible ) ; break foundType ; } packageBinding = ( ( PackageBinding ) ( binding ) ) ; } return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , NotFound ) ; } <START_BUG> binding = convertToRawType ( ( ( ReferenceBinding ) ( binding ) ) ) ; <END_BUG> 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 ( ) ) ) return new ProblemFieldBinding ( ( ( FieldBinding ) ( binding ) ) . declaringClass , CharOperation . subarray ( compoundName , 0 , currentIndex ) , binding . problemId ( ) ) ; break ; } if ( ( binding = findMemberType ( nextName , typeBinding ) ) == null ) { if ( ( mask & ( Binding . FIELD ) ) != 0 ) { return new ProblemBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , typeBinding , NotFound ) ; } return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , typeBinding , NotFound ) ; } if ( ! ( binding . isValidBinding ( ) ) ) return new ProblemReferenceBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , binding . problemId ( ) ) ; } if ( ( ( mask & ( Binding . FIELD ) ) != 0 ) && ( binding instanceof FieldBinding ) ) { FieldBinding field = ( ( FieldBinding ) ( binding ) ) ; if ( ! ( field . isStatic ( ) ) ) return new ProblemFieldBinding ( field . declaringClass , CharOperation . subarray ( compoundName , 0 , currentIndex ) , NonStaticReferenceInStaticContext ) ; return binding ; } if ( ( ( mask & ( Binding . TYPE ) ) != 0 ) && ( binding instanceof ReferenceBinding ) ) { return binding ; } return new ProblemBinding ( CharOperation . subarray ( compoundName , 0 , currentIndex ) , NotFound ) ; } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getEmulationPath ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch , boolean denyEnclosingArgInConstructorCall ) { }

Fix:
binding = environment ( ) . convertToRawType ( ( ( ReferenceBinding ) ( binding ) ) ) ;