Buggy code:
public abstract class ReferenceBinding extends TypeBinding { public char [ ] [ ] compoundName ; public char [ ] sourceName ; public int modifiers ; public PackageBinding fPackage ; char [ ] fileName ; char [ ] constantPoolName ; char [ ] signature ; private SimpleLookupTable compatibleCache ; public static final ReferenceBinding LUB_GENERIC = new ReferenceBinding ( ) { } ; private static final Comparator FIELD_COMPARATOR = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { } } ; private static final Comparator METHOD_COMPARATOR = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { } } ; public static FieldBinding binarySearch ( char [ ] name , FieldBinding [ ] sortedFields ) { } public static long binarySearch ( char [ ] selector , MethodBinding [ ] sortedMethods ) { } static int compare ( char [ ] str1 , char [ ] str2 , int len1 , int len2 ) { } public static void sortFields ( FieldBinding [ ] sortedFields , int left , int right ) { } public static void sortMethods ( MethodBinding [ ] sortedMethods , int left , int right ) { } public FieldBinding [ ] availableFields ( ) { } public MethodBinding [ ] availableMethods ( ) { } public boolean canBeInstantiated ( ) { } public final boolean canBeSeenBy ( PackageBinding invocationPackage ) { } public final boolean canBeSeenBy ( ReferenceBinding receiverType , ReferenceBinding invocationType ) { if ( isPublic ( ) ) return true ; if ( ( invocationType == ( this ) ) && ( invocationType == receiverType ) ) return true ; if ( isProtected ( ) ) { if ( invocationType == ( this ) ) return true ; if ( ( invocationType . fPackage ) == ( this . fPackage ) ) return true ; TypeBinding currentType = invocationType . erasure ( ) ; TypeBinding declaringClass = enclosingType ( ) . erasure ( ) ; if ( declaringClass == invocationType ) return true ; if ( declaringClass == null ) return false ; do { if ( ( currentType . findSuperTypeOriginatingFrom ( declaringClass ) ) != null ) return true ; currentType = currentType . enclosingType ( ) ; } while ( currentType != null ) ; return false ; } if ( isPrivate ( ) ) { receiverCheck : { if ( ! ( ( receiverType == ( this ) ) || ( receiverType == ( enclosingType ( ) ) ) ) ) { if ( receiverType . isTypeVariable ( ) ) { TypeVariableBinding typeVariable = ( ( TypeVariableBinding ) ( receiverType ) ) ; if ( ( typeVariable . isErasureBoundTo ( erasure ( ) ) ) || ( typeVariable . isErasureBoundTo ( enclosingType ( ) . erasure ( ) ) ) ) break receiverCheck ; } return false ; } } if ( invocationType != ( this ) ) { ReferenceBinding outerInvocationType = invocationType ; ReferenceBinding temp = outerInvocationType . enclosingType ( ) ; while ( temp != null ) { outerInvocationType = temp ; temp = temp . enclosingType ( ) ; } ReferenceBinding outerDeclaringClass = ( ( ReferenceBinding ) ( erasure ( ) ) ) ; temp = outerDeclaringClass . enclosingType ( ) ; while ( temp != null ) { outerDeclaringClass = temp ; temp = temp . enclosingType ( ) ; } if ( outerInvocationType != outerDeclaringClass ) return false ; } return true ; } if ( ( invocationType . fPackage ) != ( this . fPackage ) ) return false ; <START_BUG> ReferenceBinding currentType = receiverType ; <END_BUG> TypeBinding originalDeclaringClass = ( ( enclosingType ( ) ) == null ? this : enclosingType ( ) ) . original ( ) ; do { if ( originalDeclaringClass == ( currentType . original ( ) ) ) return true ; PackageBinding currentPackage = currentType . fPackage ; if ( ( currentPackage != null ) && ( currentPackage != ( this . fPackage ) ) ) return false ; } while ( ( currentType = currentType . superclass ( ) ) != null ) ; return false ; } public final boolean canBeSeenBy ( Scope scope ) { } public char [ ] computeGenericTypeSignature ( TypeVariableBinding [ ] typeVariables ) { } public void computeId ( ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } public char [ ] constantPoolName ( ) { } public String debugName ( ) { } public final int depth ( ) { } public boolean detectAnnotationCycle ( ) { } public final ReferenceBinding enclosingTypeAt ( int relativeDepth ) { } public int enumConstantCount ( ) { } public int fieldCount ( ) { } public FieldBinding [ ] fields ( ) { } public final int getAccessFlags ( ) { } public AnnotationBinding [ ] getAnnotations ( ) { } public long getAnnotationTagBits ( ) { } public int getEnclosingInstancesSlotSize ( ) { } public MethodBinding getExactConstructor ( TypeBinding [ ] argumentTypes ) { } public MethodBinding getExactMethod ( char [ ] selector , TypeBinding [ ] argumentTypes , CompilationUnitScope refScope ) { } public FieldBinding getField ( char [ ] fieldName , boolean needResolve ) { } public char [ ] getFileName ( ) { } public ReferenceBinding getMemberType ( char [ ] typeName ) { } public MethodBinding [ ] getMethods ( char [ ] selector ) { } public MethodBinding [ ] getMethods ( char [ ] selector , int suggestedParameterLength ) { } public int getOuterLocalVariablesSlotSize ( ) { } public PackageBinding getPackage ( ) { } public TypeVariableBinding getTypeVariable ( char [ ] variableName ) { } public int hashCode ( ) { } public boolean hasIncompatibleSuperType ( ReferenceBinding otherType ) { } public boolean hasMemberTypes ( ) { } public final boolean hasRestrictedAccess ( ) { } public boolean implementsInterface ( ReferenceBinding anInterface , boolean searchHierarchy ) { } boolean implementsMethod ( MethodBinding method ) { }

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