Buggy code:
public abstract class Scope implements BaseTypes , BindingIds , CompilerModifiers , ProblemReasons , TagBits , TypeConstants , TypeIds { public Scope parent ; public int kind ; public static final int BLOCK_SCOPE = 1 ; public static final int METHOD_SCOPE = 2 ; public static final int CLASS_SCOPE = 3 ; public static final int COMPILATION_UNIT_SCOPE = 4 ; protected Scope ( int kind , Scope parent ) { } public abstract ProblemReporter problemReporter ( ) { } protected final boolean areParametersAssignable ( TypeBinding [ ] parameters , TypeBinding [ ] arguments ) { } public static boolean areTypesCompatible ( TypeBinding left , TypeBinding right ) { } public static int compareTypes ( TypeBinding left , TypeBinding right ) { } public int compareUncheckedException ( ReferenceBinding type ) { } public final CompilationUnitScope compilationUnitScope ( ) { } public ArrayBinding createArray ( TypeBinding type , int dimension ) { } public final SourceTypeBinding enclosingSourceType ( ) { } public final LookupEnvironment environment ( ) { } public ReferenceBinding findDirectMemberType ( char [ ] typeName , ReferenceBinding enclosingType ) { } public MethodBinding findExactMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public FieldBinding findField ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { } public ReferenceBinding findMemberType ( char [ ] typeName , ReferenceBinding enclosingType ) { } public MethodBinding findMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { ReferenceBinding currentType = receiverType ; MethodBinding matchingMethod = null ; ObjectVector found = new ObjectVector ( ) ; compilationUnitScope ( ) . recordTypeReference ( receiverType ) ; compilationUnitScope ( ) . recordTypeReferences ( argumentTypes ) ; if ( currentType . isInterface ( ) ) { MethodBinding [ ] currentMethods = currentType . getMethods ( selector ) ; int currentLength = currentMethods . length ; if ( currentLength == 1 ) { matchingMethod = currentMethods [ 0 ] ; } else <START_BUG> if ( currentLength > 0 ) { <END_BUG> found . addAll ( currentMethods ) ; } matchingMethod = findMethodInSuperInterfaces ( currentType , selector , found , matchingMethod ) ; currentType = getJavaLangObject ( ) ; } ReferenceBinding classHierarchyStart = currentType ; while ( currentType != null ) { MethodBinding [ ] currentMethods = currentType . getMethods ( selector ) ; int currentLength = currentMethods . length ; if ( ( ( currentLength == 1 ) && ( matchingMethod == null ) ) && ( ( found . size ) == 0 ) ) { matchingMethod = currentMethods [ 0 ] ; } else if ( currentLength > 0 ) { if ( ( ( found . size ) == 0 ) && ( matchingMethod != null ) ) { found . add ( matchingMethod ) ; matchingMethod = null ; } found . addAll ( currentMethods ) ; } currentType = currentType . superclass ( ) ; } int foundSize = found . size ; if ( foundSize == 0 ) { if ( matchingMethod != null ) return matchingMethod ; return findDefaultAbstractMethod ( receiverType , selector , argumentTypes , invocationSite , classHierarchyStart , matchingMethod , found ) ; } MethodBinding [ ] candidates = new MethodBinding [ foundSize ] ; int candidatesCount = 0 ; for ( int i = 0 ; i < foundSize ; i ++ ) { MethodBinding methodBinding = ( ( MethodBinding ) ( found . elementAt ( i ) ) ) ; if ( areParametersAssignable ( methodBinding . parameters , argumentTypes ) ) candidates [ ( candidatesCount ++ ) ] = methodBinding ; } if ( candidatesCount == 1 ) { compilationUnitScope ( ) . recordTypeReferences ( candidates [ 0 ] . thrownExceptions ) ; return candidates [ 0 ] ; } if ( candidatesCount == 0 ) { MethodBinding interfaceMethod = findDefaultAbstractMethod ( receiverType , selector , argumentTypes , invocationSite , classHierarchyStart , matchingMethod , found ) ; if ( interfaceMethod != null ) return interfaceMethod ; int argLength = argumentTypes . length ; foundSize = found . size ; nextMethod : for ( int i = 0 ; i < foundSize ; i ++ ) { MethodBinding methodBinding = ( ( MethodBinding ) ( found . elementAt ( i ) ) ) ; TypeBinding [ ] params = methodBinding . parameters ; int paramLength = params . length ; nextArg : for ( int a = 0 ; a < argLength ; a ++ ) { TypeBinding arg = argumentTypes [ a ] ; for ( int p = 0 ; p < paramLength ; p ++ ) if ( ( params [ p ] ) == arg ) continue nextArg ; continue nextMethod ; } return methodBinding ; } return ( ( MethodBinding ) ( found . elementAt ( 0 ) ) ) ; } int visiblesCount = 0 ; for ( int i = 0 ; i < candidatesCount ; i ++ ) { MethodBinding methodBinding = candidates [ i ] ; if ( methodBinding . canBeSeenBy ( receiverType , invocationSite , this ) ) { if ( visiblesCount != i ) { candidates [ i ] = null ; candidates [ visiblesCount ] = methodBinding ; } visiblesCount ++ ; } } if ( visiblesCount == 1 ) { compilationUnitScope ( ) . recordTypeReferences ( candidates [ 0 ] . thrownExceptions ) ; return candidates [ 0 ] ; } if ( visiblesCount == 0 ) { MethodBinding interfaceMethod = findDefaultAbstractMethod ( receiverType , selector , argumentTypes , invocationSite , classHierarchyStart , matchingMethod , found ) ; if ( interfaceMethod != null ) return interfaceMethod ; return new ProblemMethodBinding ( candidates [ 0 ] . selector , argumentTypes , candidates [ 0 ] . declaringClass , ProblemReasons . NotVisible ) ; } if ( candidates [ 0 ] . declaringClass . isClass ( ) ) { return mostSpecificClassMethodBinding ( candidates , visiblesCount ) ; }

Fix:
if ( currentLength > 1 ) {