Buggy code:
if ( type . isBaseType ( ) ) return null ; if ( indexOfFirst < 0 ) indexOfFirst = i ; actualLength ++ ; } switch ( actualLength ) { case 0 : return VoidBinding ; case 1 : return types [ indexOfFirst ] ; } TypeBinding firstType = types [ indexOfFirst ] ; TypeBinding [ ] superTypes ; int superLength ; if ( firstType . isBaseType ( ) ) { return null ; } else if ( firstType . isArrayType ( ) ) { superLength = 4 ; if ( ( firstType . erasure ( ) ) != firstType ) { ArrayList someInvocations = new ArrayList ( 1 ) ; someInvocations . add ( firstType ) ; allInvocations . put ( firstType . erasure ( ) , someInvocations ) ; } superTypes = new TypeBinding [ ] { firstType . erasure ( ) , getJavaIoSerializable ( ) , getJavaLangCloneable ( ) , getJavaLangObject ( ) } ; } else { ArrayList typesToVisit = new ArrayList ( 5 ) ; if ( ( firstType . erasure ( ) ) != firstType ) { ArrayList someInvocations = new ArrayList ( 1 ) ; someInvocations . add ( firstType ) ; allInvocations . put ( firstType . erasure ( ) , someInvocations ) ; } typesToVisit . add ( firstType . erasure ( ) ) ; ReferenceBinding currentType = ( ( ReferenceBinding ) ( firstType ) ) ; for ( int i = 0 , max = 1 ; i < max ; i ++ ) { currentType = ( ( ReferenceBinding ) ( typesToVisit . get ( i ) ) ) ; TypeBinding itsSuperclass = currentType . superclass ( ) ; if ( itsSuperclass != null ) { TypeBinding itsSuperclassErasure = itsSuperclass . erasure ( ) ; if ( ! ( typesToVisit . contains ( itsSuperclassErasure ) ) ) { if ( itsSuperclassErasure != itsSuperclass ) { ArrayList someInvocations = new ArrayList ( 1 ) ; someInvocations . add ( itsSuperclass ) ; allInvocations . put ( itsSuperclassErasure , someInvocations ) ; } typesToVisit . add ( itsSuperclassErasure ) ; max ++ ; } } ReferenceBinding [ ] itsInterfaces = currentType . superInterfaces ( ) ; for ( int j = 0 , count = itsInterfaces . length ; j < count ; j ++ ) { TypeBinding itsInterface = itsInterfaces [ j ] ; TypeBinding itsInterfaceErasure = itsInterface . erasure ( ) ; if ( ! ( typesToVisit . contains ( itsInterfaceErasure ) ) ) { if ( itsInterfaceErasure != itsInterface ) { ArrayList someInvocations = new ArrayList ( 1 ) ; someInvocations . add ( itsInterface ) ; allInvocations . put ( itsInterfaceErasure , someInvocations ) ; } typesToVisit . add ( itsInterfaceErasure ) ; max ++ ; } } } superLength = typesToVisit . size ( ) ; superTypes = new TypeBinding [ superLength ] ; typesToVisit . toArray ( superTypes ) ; } int remaining = superLength ; nextOtherType : for ( int i = indexOfFirst + 1 ; i < length ; i ++ ) { TypeBinding otherType = types [ i ] ; if ( otherType == null ) continue nextOtherType ; else if ( otherType . isArrayType ( ) ) { nextSuperType : for ( int j = 0 ; j < superLength ; j ++ ) { TypeBinding superType = superTypes [ j ] ; if ( ( superType == null ) || ( superType == otherType ) ) continue nextSuperType ; switch ( superType . id ) { case TypeIds . T_JavaIoSerializable : case TypeIds . T_JavaLangCloneable : case TypeIds . T_JavaLangObject : continue nextSuperType ; } superTypes [ j ] = null ; if ( ( -- remaining ) == 0 ) return null ; } continue nextOtherType ; } ReferenceBinding otherRefType = ( ( ReferenceBinding ) ( otherType ) ) ; nextSuperType : for ( int j = 0 ; j < superLength ; j ++ ) { TypeBinding superType = superTypes [ j ] ; if ( superType == null ) continue nextSuperType ; if ( otherRefType . erasure ( ) . isCompatibleWith ( superType ) ) { TypeBinding match = otherRefType . findSuperTypeErasingTo ( ( ( ReferenceBinding ) ( superType ) ) ) ; <START_BUG> if ( ( match . erasure ( ) ) != match ) { <END_BUG> ArrayList someInvocations = ( ( ArrayList ) ( allInvocations . get ( superType ) ) ) ; if ( someInvocations == null ) someInvocations = new ArrayList ( 1 ) ; someInvocations . add ( match ) ; allInvocations . put ( superType , someInvocations ) ; } break nextSuperType ; } else { superTypes [ j ] = null ; if ( ( -- remaining ) == 0 ) return null ; } } } for ( int i = 0 ; i < superLength ; i ++ ) { TypeBinding superType = superTypes [ i ] ; if ( superType != null ) { List matchingInvocations = ( ( List ) ( allInvocations . get ( superType ) ) ) ; if ( matchingInvocations != null ) invocations . addAll ( matchingInvocations ) ; return superType ; } } return null ; } protected final MethodBinding mostSpecificClassMethodBinding ( MethodBinding [ ] visible , int visibleSize , InvocationSite invocationSite ) { } public TypeBinding mostSpecificCommonType ( TypeBinding [ ] types ) { } protected final MethodBinding mostSpecificInterfaceMethodBinding ( MethodBinding [ ] visible , int visibleSize , InvocationSite invocationSite ) { } protected final MethodBinding mostSpecificMethodBinding ( MethodBinding [ ] visible , int visibleSize , InvocationSite invocationSite ) { } public final ClassScope outerMostClassScope ( ) { } public final MethodScope outerMostMethodScope ( ) { } public abstract ProblemReporter problemReporter ( ) { } public final CompilationUnitDeclaration referenceCompilationUnit ( ) { } int startIndex ( ) { } public CaseStatement switchCase ( ) { } public int unboxing ( int id ) { } public TypeBinding unboxing ( TypeBinding type ) { } }

Fix:
if ( ( match != null ) && ( ( match . erasure ( ) ) != match ) ) {