Buggy code:
if ( mustBePublic && ( ! ( currentMethod . isPublic ( ) ) ) ) { currentLength -- ; currentMethods [ i ] = null ; continue nextMethod ; } if ( matchingMethod != null ) { if ( currentMethod . areParametersEqual ( matchingMethod ) ) { if ( ( ( matchingMethod . typeVariables ) != ( NoTypeVariables ) ) && ( ( invocationSite . genericTypeArguments ( ) ) == null ) ) continue nextMethod ; if ( ( matchingMethod . hasSubstitutedParameters ( ) ) && ( ! ( currentMethod . original ( ) . areParametersEqual ( matchingMethod . original ( ) ) ) ) ) continue nextMethod ; currentLength -- ; currentMethods [ i ] = null ; continue nextMethod ; } } else { for ( int j = 0 , max = found . size ; j < max ; j ++ ) { if ( ( ( MethodBinding ) ( found . elementAt ( j ) ) ) . areParametersEqual ( currentMethod ) ) { currentLength -- ; currentMethods [ i ] = null ; continue nextMethod ; } } } } } if ( ( ( currentLength == 1 ) && ( matchingMethod == null ) ) && ( ( found . size ) == 0 ) ) { matchingMethod = currentMethods [ 0 ] ; } else if ( currentLength > 0 ) { if ( matchingMethod != null ) { found . add ( matchingMethod ) ; matchingMethod = null ; } int maxMethod = currentMethods . length ; if ( maxMethod == currentLength ) { found . addAll ( currentMethods ) ; } else { for ( int i = 0 , max = currentMethods . length ; i < max ; i ++ ) { MethodBinding currentMethod = currentMethods [ i ] ; if ( currentMethod != null ) found . add ( currentMethod ) ; } } } currentType = currentType . superclass ( ) ; } int foundSize = found . size ; MethodBinding [ ] candidates = null ; int candidatesCount = 0 ; boolean checkedMatchingMethod = false ; MethodBinding problemMethod = null ; if ( foundSize > 0 ) { for ( int i = 0 ; i < foundSize ; i ++ ) { MethodBinding methodBinding = ( ( MethodBinding ) ( found . elementAt ( i ) ) ) ; MethodBinding compatibleMethod = computeCompatibleMethod ( methodBinding , argumentTypes , invocationSite ) ; if ( compatibleMethod != null ) { if ( compatibleMethod . isValidBinding ( ) ) { switch ( candidatesCount ) { case 0 : matchingMethod = compatibleMethod ; checkedMatchingMethod = true ; break ; case 1 : candidates = new MethodBinding [ foundSize ] ; candidates [ 0 ] = matchingMethod ; matchingMethod = null ; default : candidates [ candidatesCount ] = compatibleMethod ; } candidatesCount ++ ; } else if ( problemMethod == null ) { problemMethod = compatibleMethod ; } } } } if ( candidatesCount > 0 ) problemMethod = null ; if ( matchingMethod != null ) { if ( ! checkedMatchingMethod ) { MethodBinding compatibleMethod = computeCompatibleMethod ( matchingMethod , argumentTypes , invocationSite ) ; if ( compatibleMethod != null ) { if ( compatibleMethod . isValidBinding ( ) ) { matchingMethod = compatibleMethod ; checkedMatchingMethod = true ; } else { problemMethod = compatibleMethod ; } } } if ( checkedMatchingMethod ) { if ( ! ( matchingMethod . canBeSeenBy ( receiverType , invocationSite , this ) ) ) { MethodBinding interfaceMethod = findDefaultAbstractMethod ( receiverType , selector , argumentTypes , invocationSite , classHierarchyStart , null , found ) ; if ( interfaceMethod != null ) return interfaceMethod ; unitScope . recordTypeReferences ( matchingMethod . thrownExceptions ) ; return matchingMethod ; } } <START_BUG> if ( receiverType . isAbstract ( ) ) <END_BUG> matchingMethod = findDefaultAbstractMethod ( receiverType , selector , argumentTypes , invocationSite , classHierarchyStart , matchingMethod , found ) ; if ( matchingMethod != null ) return matchingMethod ; return problemMethod ; } if ( candidatesCount == 0 ) { MethodBinding interfaceMethod = findDefaultAbstractMethod ( receiverType , selector , argumentTypes , invocationSite , classHierarchyStart , matchingMethod , found ) ; if ( interfaceMethod != null ) return interfaceMethod ; if ( problemMethod != null ) return problemMethod ; if ( ( found . size ) == 0 ) return null ; int bestArgMatches = - 1 ; int bestParamMatches = - 1 ; MethodBinding bestGuess = ( ( MethodBinding ) ( found . elementAt ( 0 ) ) ) ; 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 ; int argMatches = 0 ; next : for ( int a = 0 ; a < argLength ; a ++ ) { TypeBinding arg = argumentTypes [ a ] ; for ( int p = ( a == 0 ) ? 0 : a - 1 ; ( p < paramLength ) && ( p < ( a + 1 ) ) ; p ++ ) { if ( ( params [ p ] ) == arg ) { argMatches ++ ; continue next ; } } } int paramMatches = 0 ; next : for ( int p = 0 ; p < paramLength ; p ++ ) { TypeBinding param = params [ p ] ; for ( int a = ( p == 0 ) ? 0 : p - 1 ; ( a < argLength ) && ( a < ( p + 1 ) ) ; a ++ ) { if ( param == ( argumentTypes [ a ] ) ) { paramMatches ++ ; continue next ; } }

Fix:
if ( ( receiverType . isAbstract ( ) ) || ( receiverType . isTypeVariable ( ) ) )