Buggy code:
public class MethodBinding extends Binding { public int modifiers ; public char [ ] selector ; public TypeBinding returnType ; public TypeBinding [ ] parameters ; public ReferenceBinding [ ] thrownExceptions ; public ReferenceBinding declaringClass ; public TypeVariableBinding [ ] typeVariables = Binding . NO_TYPE_VARIABLES ; char [ ] signature ; public long tagBits ; protected MethodBinding ( ) { } public MethodBinding ( int modifiers , char [ ] selector , TypeBinding returnType , TypeBinding [ ] parameters , ReferenceBinding [ ] thrownExceptions , ReferenceBinding declaringClass ) { } public MethodBinding ( int modifiers , TypeBinding [ ] parameters , ReferenceBinding [ ] thrownExceptions , ReferenceBinding declaringClass ) { } public MethodBinding ( MethodBinding initialMethodBinding , ReferenceBinding declaringClass ) { } public final boolean areParameterErasuresEqual ( MethodBinding method ) { } public final boolean areParametersCompatibleWith ( TypeBinding [ ] arguments ) { } public final boolean areParametersEqual ( MethodBinding method ) { } public final boolean areTypeVariableErasuresEqual ( MethodBinding method ) { } MethodBinding asRawMethod ( LookupEnvironment env ) { } public final boolean canBeSeenBy ( InvocationSite invocationSite , Scope scope ) { } public final boolean canBeSeenBy ( PackageBinding invocationPackage ) { } public final boolean canBeSeenBy ( TypeBinding receiverType , InvocationSite invocationSite , Scope scope ) { if ( isPublic ( ) ) return true ; SourceTypeBinding invocationType = scope . enclosingSourceType ( ) ; if ( ( invocationType == ( this . declaringClass ) ) && ( invocationType == receiverType ) ) return true ; if ( invocationType == null ) return ( ! ( isPrivate ( ) ) ) && ( ( scope . getCurrentPackage ( ) ) == ( this . declaringClass . fPackage ) ) ; if ( isProtected ( ) ) { if ( invocationType == ( this . declaringClass ) ) return true ; if ( ( invocationType . fPackage ) == ( this . declaringClass . fPackage ) ) return true ; ReferenceBinding currentType = invocationType ; TypeBinding receiverErasure = receiverType . erasure ( ) ; ReferenceBinding declaringErasure = ( ( ReferenceBinding ) ( this . declaringClass . erasure ( ) ) ) ; int depth = 0 ; do { if ( ( currentType . findSuperTypeOriginatingFrom ( declaringErasure ) ) != null ) { if ( invocationSite . isSuperAccess ( ) ) return true ; if ( receiverType instanceof ArrayBinding ) return false ; if ( isStatic ( ) ) { if ( depth > 0 ) invocationSite . setDepth ( depth ) ; return true ; } if ( ( currentType == receiverErasure ) || ( ( receiverErasure . findSuperTypeOriginatingFrom ( currentType ) ) != null ) ) { if ( depth > 0 ) invocationSite . setDepth ( depth ) ; return true ; } } depth ++ ; currentType = currentType . enclosingType ( ) ; } while ( currentType != null ) ; return false ; } if ( isPrivate ( ) ) { receiverCheck : { if ( receiverType != ( this . declaringClass ) ) { if ( ( receiverType . isTypeVariable ( ) ) && ( ( ( TypeVariableBinding ) ( receiverType ) ) . isErasureBoundTo ( this . declaringClass . erasure ( ) ) ) ) break receiverCheck ; return false ; } } if ( invocationType != ( this . declaringClass ) ) { ReferenceBinding outerInvocationType = invocationType ; ReferenceBinding temp = outerInvocationType . enclosingType ( ) ; while ( temp != null ) { outerInvocationType = temp ; temp = temp . enclosingType ( ) ; } ReferenceBinding outerDeclaringClass = ( ( ReferenceBinding ) ( this . declaringClass . erasure ( ) ) ) ; temp = outerDeclaringClass . enclosingType ( ) ; while ( temp != null ) { outerDeclaringClass = temp ; temp = temp . enclosingType ( ) ; } if ( outerInvocationType != outerDeclaringClass ) return false ; } return true ; } PackageBinding declaringPackage = this . declaringClass . fPackage ; if ( ( invocationType . fPackage ) != declaringPackage ) return false ; if ( receiverType instanceof ArrayBinding ) return false ; TypeBinding originalDeclaringClass = this . declaringClass . original ( ) ; <START_BUG> ReferenceBinding currentType = ( ( ReferenceBinding ) ( receiverType ) ) ; <END_BUG> do { if ( originalDeclaringClass == ( currentType . original ( ) ) ) return true ; PackageBinding currentPackage = currentType . fPackage ; if ( ( currentPackage != null ) && ( currentPackage != declaringPackage ) ) return false ; } while ( ( currentType = currentType . superclass ( ) ) != null ) ; return false ; } public List collectMissingTypes ( List missingTypes ) { } MethodBinding computeSubstitutedMethod ( MethodBinding method , LookupEnvironment env ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } public final char [ ] constantPoolName ( ) { } public MethodBinding findOriginalInheritedMethod ( MethodBinding inheritedMethod ) { } public char [ ] genericSignature ( ) { } public final int getAccessFlags ( ) { } public AnnotationBinding [ ] getAnnotations ( ) { } public long getAnnotationTagBits ( ) { } public Object getDefaultValue ( ) { } public AnnotationBinding [ ] [ ] getParameterAnnotations ( ) { } public TypeVariableBinding getTypeVariable ( char [ ] variableName ) { } public boolean hasSubstitutedParameters ( ) { } public boolean hasSubstitutedReturnType ( ) { } public final boolean isAbstract ( ) { } public final boolean isBridge ( ) { } public final boolean isConstructor ( ) { } public final boolean isDefault ( ) { } public final boolean isDefaultAbstract ( ) { } public final boolean isDeprecated ( ) { } public final boolean isFinal ( ) { } public final boolean isImplementing ( ) { } public final boolean isMain ( ) { } public final boolean isNative ( ) { } public final boolean isOverriding ( ) { } public final boolean isPrivate ( ) { } public final boolean isOrEnclosedByPrivateType ( ) { }

Fix:
ReferenceBinding currentType = ( ( ReferenceBinding ) ( ( receiverType . isCapture ( ) ) ? receiverType . erasure ( ) : receiverType ) ) ;