Buggy code:
public class BlockScope extends Scope { public LocalVariableBinding [ ] locals ; public int localIndex ; public int startIndex ; public int offset ; public int maxOffset ; public BlockScope [ ] shiftScopes ; public static final VariableBinding [ ] EmulationPathToImplicitThis = new VariableBinding [ ] { } ; public Scope [ ] subscopes = new Scope [ 1 ] ; public int scopeIndex = 0 ; 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 ) { } public void computeLocalVariablePositions ( int initOffset , CodeStream codeStream ) { } public final LocalVariableBinding duplicateName ( char [ ] name ) { } public void emulateOuterAccess ( LocalVariableBinding outerLocalVariable ) { } public void emulateOuterAccess ( ReferenceBinding targetEnclosingType , boolean useDirectReference ) { } public final ReferenceBinding findLocalType ( char [ ] name ) { } public LocalVariableBinding findVariable ( char [ ] variable ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite ) { } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public Binding getBinding ( char [ ] name , int mask , InvocationSite invocationSite ) { } public Object [ ] getCompatibleEmulationPath ( ReferenceBinding targetEnclosingType ) { } public MethodBinding getConstructor ( ReferenceBinding receiverType , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { IPrivilegedHandler handler = findPrivilegedHandler ( invocationType ( ) ) ; compilationUnitScope ( ) . recordTypeReference ( receiverType ) ; compilationUnitScope ( ) . recordTypeReferences ( argumentTypes ) ; MethodBinding methodBinding = receiverType . getExactConstructor ( argumentTypes ) ; if ( methodBinding != null ) { if ( methodBinding . canBeSeenBy ( invocationSite , this ) ) { return methodBinding ; } else if ( handler != null ) { <START_BUG> return handler . getPrivilegedAccessMethod ( methodBinding ) ; <END_BUG> } } MethodBinding [ ] methods = receiverType . getMethods ( ConstantPoolName ) ; if ( methods == ( NoMethods ) ) return new ProblemMethodBinding ( ConstantPoolName , argumentTypes , NotFound ) ; MethodBinding [ ] compatible = new MethodBinding [ methods . length ] ; int compatibleIndex = 0 ; for ( int i = 0 , length = methods . length ; i < length ; i ++ ) if ( areParametersAssignable ( methods [ i ] . parameters , argumentTypes ) ) compatible [ ( compatibleIndex ++ ) ] = methods [ i ] ; if ( compatibleIndex == 0 ) return new ProblemMethodBinding ( ConstantPoolName , argumentTypes , NotFound ) ; MethodBinding [ ] visible = new MethodBinding [ compatibleIndex ] ; int visibleIndex = 0 ; for ( int i = 0 ; i < compatibleIndex ; i ++ ) { MethodBinding method = compatible [ i ] ; if ( method . canBeSeenBy ( invocationSite , this ) ) visible [ ( visibleIndex ++ ) ] = method ; } if ( visibleIndex == 1 ) return visible [ 0 ] ; if ( visibleIndex == 0 ) return new ProblemMethodBinding ( ConstantPoolName , argumentTypes , NotVisible ) ; return mostSpecificClassMethodBinding ( visible , visibleIndex ) ; } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getExactEmulationPath ( ReferenceBinding targetEnclosingType ) { } public FieldBinding getField ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { } public MethodBinding getImplicitMethod ( char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public MethodBinding getMethod ( TypeBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public int maxShiftedOffset ( ) { } public ProblemReporter problemReporter ( ) { } public void propagateInnerEmulation ( ReferenceBinding targetType , boolean isEnclosingInstanceSupplied , boolean useDirectReference ) { } public TypeDeclaration referenceType ( ) { } int startIndex ( ) { } public String toString ( ) { } public String toString ( int tab ) { } }

Fix:
return handler . getPrivilegedAccessMethod ( methodBinding , ( ( AstNode ) ( invocationSite ) ) ) ;