Buggy code:
public class SourceTypeBinding extends ReferenceBinding { public ReferenceBinding superclass ; public ReferenceBinding [ ] superInterfaces ; private FieldBinding [ ] fields ; private MethodBinding [ ] methods ; public ReferenceBinding [ ] memberTypes ; public TypeVariableBinding [ ] typeVariables ; public ClassScope scope ; public static final int METHOD_EMUL = 0 ; public static final int FIELD_EMUL = 1 ; public static final int CLASS_LITERAL_EMUL = 2 ; public static final int RECEIVER_TYPE_EMUL = 3 ; HashMap [ ] synthetics ; char [ ] genericReferenceTypeSignature ; private SimpleLookupTable storedAnnotations = null ; public SourceTypeBinding ( char [ ] [ ] compoundName , PackageBinding fPackage , ClassScope scope ) { } private void addDefaultAbstractMethod ( MethodBinding abstractMethod ) { } public void addDefaultAbstractMethods ( ) { } public FieldBinding addSyntheticFieldForInnerclass ( LocalVariableBinding actualOuterLocalVariable ) { } public FieldBinding addSyntheticFieldForInnerclass ( ReferenceBinding enclosingType ) { } public FieldBinding addSyntheticFieldForClassLiteral ( TypeBinding targetType , BlockScope blockScope ) { } public FieldBinding addSyntheticFieldForAssert ( BlockScope blockScope ) { } public FieldBinding addSyntheticFieldForEnumValues ( ) { } public SyntheticMethodBinding addSyntheticMethod ( FieldBinding targetField , boolean isReadAccess ) { } public SyntheticMethodBinding addSyntheticEnumMethod ( char [ ] selector ) { } public SyntheticFieldBinding addSyntheticFieldForSwitchEnum ( char [ ] fieldName , String key ) { } public SyntheticMethodBinding addSyntheticMethodForSwitchEnum ( TypeBinding enumBinding ) { } public SyntheticMethodBinding addSyntheticMethod ( MethodBinding targetMethod , boolean isSuperAccess ) { } public SyntheticMethodBinding addSyntheticBridgeMethod ( MethodBinding inheritedMethodToBridge , MethodBinding targetMethod ) { } public int kind ( ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } void faultInTypesForFieldsAndMethods ( ) { } public FieldBinding [ ] fields ( ) { } public char [ ] genericTypeSignature ( ) { } public char [ ] genericSignature ( ) { } public long getAnnotationTagBits ( ) { } public MethodBinding [ ] getDefaultAbstractMethods ( ) { } public MethodBinding getExactConstructor ( TypeBinding [ ] argumentTypes ) { } public MethodBinding getExactMethod ( char [ ] selector , TypeBinding [ ] argumentTypes , CompilationUnitScope refScope ) { } public FieldBinding getField ( char [ ] fieldName , boolean needResolve ) { } public MethodBinding [ ] getMethods ( char [ ] selector ) { } public FieldBinding getSyntheticField ( LocalVariableBinding actualOuterLocalVariable ) { } public FieldBinding getSyntheticField ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch ) { } public SyntheticMethodBinding getSyntheticBridgeMethod ( MethodBinding inheritedMethodToBridge ) { } public void initializeDeprecatedAnnotationTagBits ( ) { } public boolean isEquivalentTo ( TypeBinding otherType ) { } public boolean isGenericType ( ) { } public ReferenceBinding [ ] memberTypes ( ) { } public FieldBinding getUpdatedFieldBinding ( FieldBinding targetField , ReferenceBinding newDeclaringClass ) { } public MethodBinding getUpdatedMethodBinding ( MethodBinding targetMethod , ReferenceBinding newDeclaringClass ) { } public boolean hasMemberTypes ( ) { } public MethodBinding [ ] methods ( ) { } private FieldBinding resolveTypeFor ( FieldBinding field ) { } private MethodBinding resolveTypesFor ( MethodBinding method ) { if ( ( ( method . modifiers ) & ( ExtraCompilerModifiers . AccUnresolved ) ) == 0 ) return method ; if ( ( this . scope . compilerOptions ( ) . sourceLevel ) >= ( ClassFileConstants . JDK1_5 ) ) { if ( ( ( method . getAnnotationTagBits ( ) ) & ( TagBits . AnnotationDeprecated ) ) != 0 ) method . modifiers |= ClassFileConstants . AccDeprecated ; } if ( ( isViewedAsDeprecated ( ) ) && ( ! ( method . isDeprecated ( ) ) ) ) method . modifiers |= ExtraCompilerModifiers . AccDeprecatedImplicitly ; if ( hasRestrictedAccess ( ) ) method . modifiers |= ExtraCompilerModifiers . AccRestrictedAccess ; AbstractMethodDeclaration methodDecl = method . sourceMethod ( ) ; if ( methodDecl == null ) return null ; TypeParameter [ ] typeParameters = methodDecl . typeParameters ( ) ; if ( typeParameters != null ) { <START_BUG> methodDecl . scope . connectTypeVariables ( typeParameters ) ; <END_BUG> for ( int i = 0 , paramLength = typeParameters . length ; i < paramLength ; i ++ ) typeParameters [ i ] . checkBounds ( methodDecl . scope ) ; } TypeReference [ ] exceptionTypes = methodDecl . thrownExceptions ; if ( exceptionTypes != null ) { int size = exceptionTypes . length ; method . thrownExceptions = new ReferenceBinding [ size ] ; int count = 0 ; ReferenceBinding resolvedExceptionType ; for ( int i = 0 ; i < size ; i ++ ) { resolvedExceptionType = ( ( ReferenceBinding ) ( exceptionTypes [ i ] . resolveType ( methodDecl . scope , true ) ) ) ; if ( resolvedExceptionType == null ) continue ; if ( resolvedExceptionType . isBoundParameterizedType ( ) ) { methodDecl . scope . problemReporter ( ) . invalidParameterizedExceptionType ( resolvedExceptionType , exceptionTypes [ i ] ) ; continue ; } if ( ( resolvedExceptionType . findSuperTypeErasingTo ( TypeIds . T_JavaLangThrowable , true ) ) == null ) { methodDecl . scope . problemReporter ( ) . cannotThrowType ( this , methodDecl , exceptionTypes [ i ] , resolvedExceptionType ) ; continue ; } if ( ( ( resolvedExceptionType . modifiers ) & ( ExtraCompilerModifiers . AccGenericSignature ) ) != 0 ) method . modifiers |= ExtraCompilerModifiers . AccGenericSignature ; method . thrownExceptions [ ( count ++ ) ] = resolvedExceptionType ; } if ( count < size ) System . arraycopy ( method . thrownExceptions , 0 , ( method . thrownExceptions = new ReferenceBinding [ count ] ) , 0 , count ) ; } boolean foundArgProblem = false ; Argument [ ] arguments = methodDecl . arguments ; if ( arguments != null ) { int size = arguments . length ; method . parameters = new TypeBinding [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { Argument arg = arguments [ i ] ; TypeBinding parameterType = arg . type . resolveType ( methodDecl . scope , true ) ; if ( parameterType == null ) { foundArgProblem = true ; }

Fix:
methodDecl . scope . connectTypeVariables ( typeParameters , true ) ;