Buggy code:
public class CodeSnippetScope extends BlockScope { protected CodeSnippetScope ( int kind , Scope parent ) { } public CodeSnippetScope ( BlockScope parent ) { } public CodeSnippetScope ( BlockScope parent , int variableCount ) { } public final boolean canBeSeenByForCodeSnippet ( FieldBinding fieldBinding , TypeBinding receiverType , InvocationSite invocationSite , Scope scope ) { } public final boolean canBeSeenByForCodeSnippet ( MethodBinding methodBinding , TypeBinding receiverType , InvocationSite invocationSite , Scope scope ) { if ( methodBinding . isPublic ( ) ) return true ; ReferenceBinding invocationType = ( ( ReferenceBinding ) ( receiverType ) ) ; <START_BUG> if ( ( invocationType == ( methodBinding . declaringClass ) ) && ( invocationType == receiverType ) ) <END_BUG> return true ; if ( methodBinding . isProtected ( ) ) { if ( invocationType == ( methodBinding . declaringClass ) ) return true ; if ( ( invocationType . fPackage ) == ( methodBinding . declaringClass . fPackage ) ) return true ; if ( methodBinding . declaringClass . isSuperclassOf ( invocationType ) ) { if ( invocationSite . isSuperAccess ( ) ) return true ; if ( receiverType instanceof ArrayBinding ) return false ; if ( invocationType . isSuperclassOf ( ( ( ReferenceBinding ) ( receiverType ) ) ) ) return true ; if ( methodBinding . isStatic ( ) ) return true ; } return false ; } if ( methodBinding . isPrivate ( ) ) { if ( receiverType != ( methodBinding . declaringClass ) ) return false ; if ( invocationType != ( methodBinding . declaringClass ) ) { ReferenceBinding outerInvocationType = invocationType ; ReferenceBinding temp = outerInvocationType . enclosingType ( ) ; while ( temp != null ) { outerInvocationType = temp ; temp = temp . enclosingType ( ) ; } ReferenceBinding outerDeclaringClass = methodBinding . declaringClass ; temp = outerDeclaringClass . enclosingType ( ) ; while ( temp != null ) { outerDeclaringClass = temp ; temp = temp . enclosingType ( ) ; } if ( outerInvocationType != outerDeclaringClass ) return false ; } return true ; } if ( ( invocationType . fPackage ) != ( methodBinding . declaringClass . fPackage ) ) return false ; if ( receiverType instanceof ArrayBinding ) return false ; ReferenceBinding type = ( ( ReferenceBinding ) ( receiverType ) ) ; PackageBinding declaringPackage = methodBinding . declaringClass . fPackage ; do { if ( ( methodBinding . declaringClass ) == type ) return true ; if ( declaringPackage != ( type . fPackage ) ) return false ; } while ( ( type = type . superclass ( ) ) != null ) ; return false ; } public final boolean canBeSeenByForCodeSnippet ( ReferenceBinding referenceBinding , ReferenceBinding receiverType ) { } public MethodBinding findExactMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public FieldBinding findFieldForCodeSnippet ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { } public MethodBinding findMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public MethodBinding findMethodForArray ( ArrayBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite , ReferenceBinding receiverType ) { } public MethodBinding getConstructor ( ReferenceBinding receiverType , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public FieldBinding getFieldForCodeSnippet ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { } public MethodBinding getImplicitMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } }

Fix:
if ( invocationType == ( methodBinding . declaringClass ) )