Buggy code:
public class ParameterizedGenericMethodBinding extends ParameterizedMethodBinding implements Substitution { public TypeBinding [ ] typeArguments ; private LookupEnvironment environment ; public boolean inferredReturnType ; public boolean wasInferred ; public boolean isRaw ; public MethodBinding tiebreakMethod ; public ParameterizedGenericMethodBinding ( MethodBinding originalMethod , TypeBinding [ ] typeArguments , LookupEnvironment environment ) { } public ParameterizedGenericMethodBinding ( MethodBinding originalMethod , RawTypeBinding rawType , LookupEnvironment environment ) { } public static MethodBinding computeCompatibleMethod ( MethodBinding originalMethod , TypeBinding [ ] arguments , Scope scope , InvocationSite invocationSite ) { } public char [ ] computeUniqueKey ( ) { } public boolean hasSubstitutedParameters ( ) { } public boolean hasSubstitutedReturnType ( ) { } public void inferFromExpectedType ( TypeBinding expectedType , Scope scope ) { } public TypeBinding substitute ( TypeBinding originalType ) { <START_BUG> switch ( originalType . bindingType ( ) ) { <END_BUG> case Binding . TYPE_PARAMETER : TypeVariableBinding originalVariable = ( ( TypeVariableBinding ) ( originalType ) ) ; TypeVariableBinding [ ] variables = this . originalMethod . typeVariables ; int length = variables . length ; if ( ( ( originalVariable . rank ) < length ) && ( ( variables [ originalVariable . rank ] ) == originalVariable ) ) { return this . typeArguments [ originalVariable . rank ] ; } if ( ( this . declaringClass ) instanceof Substitution ) { return ( ( Substitution ) ( this . declaringClass ) ) . substitute ( originalType ) ; } break ; case Binding . PARAMETERIZED_TYPE : ParameterizedTypeBinding originalParameterizedType = ( ( ParameterizedTypeBinding ) ( originalType ) ) ; ReferenceBinding originalEnclosing = originalType . enclosingType ( ) ; ReferenceBinding substitutedEnclosing = originalEnclosing ; if ( originalEnclosing != null ) { substitutedEnclosing = ( ( ReferenceBinding ) ( this . substitute ( originalEnclosing ) ) ) ; } if ( this . isRaw ) { return this . environment . createRawType ( originalParameterizedType . type , substitutedEnclosing ) ; } TypeBinding [ ] originalArguments = originalParameterizedType . arguments ; TypeBinding [ ] substitutedArguments = originalArguments ; if ( originalArguments != null ) { substitutedArguments = Scope . substitute ( this , originalArguments ) ; } if ( ( substitutedArguments != originalArguments ) || ( substitutedEnclosing != originalEnclosing ) ) { identicalVariables : { if ( substitutedEnclosing != originalEnclosing ) break identicalVariables ; TypeVariableBinding [ ] originalVariables = originalParameterizedType . type . typeVariables ( ) ; length = originalVariables . length ; for ( int i = 0 ; i < length ; i ++ ) { if ( ( substitutedArguments [ i ] ) != ( originalVariables [ i ] ) ) break identicalVariables ; } return originalParameterizedType . type ; } return this . environment . createParameterizedType ( originalParameterizedType . type , substitutedArguments , substitutedEnclosing ) ; } break ; case Binding . ARRAY_TYPE : TypeBinding originalLeafComponentType = originalType . leafComponentType ( ) ; TypeBinding substitute = substitute ( originalLeafComponentType ) ; if ( substitute != originalLeafComponentType ) { return this . environment . createArrayType ( substitute . leafComponentType ( ) , ( ( substitute . dimensions ( ) ) + ( originalType . dimensions ( ) ) ) ) ; } break ; case Binding . WILDCARD_TYPE : WildcardBinding wildcard = ( ( WildcardBinding ) ( originalType ) ) ; if ( ( wildcard . kind ) != ( Wildcard . UNBOUND ) ) { TypeBinding originalBound = wildcard . bound ; TypeBinding substitutedBound = substitute ( originalBound ) ; if ( substitutedBound != originalBound ) { return this . environment . createWildcard ( wildcard . genericType , wildcard . rank , substitutedBound , wildcard . kind ) ; } } break ; case Binding . GENERIC_TYPE : ReferenceBinding originalGenericType = ( ( ReferenceBinding ) ( originalType ) ) ; originalEnclosing = originalType . enclosingType ( ) ; substitutedEnclosing = originalEnclosing ; if ( originalEnclosing != null ) { substitutedEnclosing = ( ( ReferenceBinding ) ( this . substitute ( originalEnclosing ) ) ) ; } if ( this . isRaw ) { return this . environment . createRawType ( originalGenericType , substitutedEnclosing ) ; } TypeVariableBinding [ ] originalVariables = originalGenericType . typeVariables ( ) ; length = originalVariables . length ; System . arraycopy ( originalVariables , 0 , ( originalArguments = new TypeBinding [ length ] ) , 0 , length ) ; substitutedArguments = Scope . substitute ( this , originalArguments ) ; if ( ( substitutedArguments != originalArguments ) || ( substitutedEnclosing != originalEnclosing ) ) { return this . environment . createParameterizedType ( originalGenericType , substitutedArguments , substitutedEnclosing ) ; } break ; } return originalType ; } public MethodBinding tiebreakMethod ( ) { } }

Fix:
switch ( originalType . kind ( ) ) {