Buggy code:
public class BlockScope extends Scope { public LocalVariableBinding [ ] locals ; public int localIndex ; public int analysisIndex ; public int startIndex ; public int offset ; public int maxOffset ; public BlockScope shiftScope ; 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 , int variableCount ) { } public final void addAnonymousType ( TypeDeclaration anonymousType , ReferenceBinding superBinding ) { } public final void addLocalType ( TypeDeclaration localType ) { } public final void addLocalVariable ( LocalVariableBinding binding ) { } private 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 ) { compilationUnitScope ( ) . recordTypeReference ( receiverType ) ; <START_BUG> compilationUnitScope ( ) . recordReferences ( argumentTypes ) ; <END_BUG> compilationUnitScope ( ) . addTypeReferences ( argumentTypes ) ; MethodBinding methodBinding = receiverType . getExactConstructor ( argumentTypes ) ; if ( methodBinding != null ) if ( methodBinding . canBeSeenBy ( invocationSite , this ) ) return methodBinding ; 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 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:
compilationUnitScope ( ) . recordTypeReferences ( argumentTypes ) ;