Buggy code:
if ( this . didResolve ) { if ( ( ( this . resolvedType ) != null ) && ( ! ( this . resolvedType . isValidBinding ( ) ) ) ) return null ; return this . resolvedType ; } this . didResolve = true ; Binding binding = scope . getPackage ( this . tokens ) ; if ( ( binding != null ) && ( ! ( binding . isValidBinding ( ) ) ) ) { this . resolvedType = ( ( ReferenceBinding ) ( binding ) ) ; reportInvalidType ( scope ) ; return null ; } PackageBinding packageBinding = ( binding == null ) ? null : ( ( PackageBinding ) ( binding ) ) ; boolean isClassScope = ( scope . kind ) == ( Scope . CLASS_SCOPE ) ; boolean typeIsConsistent = true ; ReferenceBinding qualifiedType = null ; for ( int i = ( packageBinding == null ) ? 0 : packageBinding . compoundName . length , max = this . tokens . length ; i < max ; i ++ ) { findNextTypeBinding ( i , scope , packageBinding ) ; if ( ! ( this . resolvedType . isValidBinding ( ) ) ) { reportInvalidType ( scope ) ; return null ; } ReferenceBinding currentType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; if ( qualifiedType == null ) { qualifiedType = currentType . enclosingType ( ) ; if ( ( qualifiedType != null ) && ( qualifiedType . isGenericType ( ) ) ) { qualifiedType = ( currentType . isStatic ( ) ) ? ( ( ReferenceBinding ) ( scope . environment ( ) . convertToRawType ( qualifiedType ) ) ) : scope . environment ( ) . convertToParameterizedType ( qualifiedType ) ; } } if ( ( ( typeIsConsistent && ( currentType . isStatic ( ) ) ) && ( qualifiedType != null ) ) && ( ( qualifiedType . isParameterizedType ( ) ) || ( qualifiedType . isGenericType ( ) ) ) ) { scope . problemReporter ( ) . staticMemberOfParameterizedType ( this , scope . environment ( ) . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , null , qualifiedType ) ) ; typeIsConsistent = false ; } TypeReference [ ] args = this . typeArguments [ i ] ; if ( args != null ) { TypeReference keep = null ; if ( isClassScope ) { keep = ( ( ClassScope ) ( scope ) ) . superTypeReference ; ( ( ClassScope ) ( scope ) ) . superTypeReference = null ; } int argLength = args . length ; TypeBinding [ ] argTypes = new TypeBinding [ argLength ] ; boolean argHasError = false ; for ( int j = 0 ; j < argLength ; j ++ ) { TypeReference arg = args [ j ] ; TypeBinding argType = ( isClassScope ) ? arg . resolveTypeArgument ( ( ( ClassScope ) ( scope ) ) , currentType , j ) : arg . resolveTypeArgument ( ( ( BlockScope ) ( scope ) ) , currentType , j ) ; if ( argType == null ) { argHasError = true ; } else { argTypes [ j ] = argType ; } } if ( argHasError ) { return null ; } if ( isClassScope ) { ( ( ClassScope ) ( scope ) ) . superTypeReference = keep ; if ( ( ( ClassScope ) ( scope ) ) . detectHierarchyCycle ( currentType , this , argTypes ) ) return null ; } TypeVariableBinding [ ] typeVariables = currentType . typeVariables ( ) ; <START_BUG> if ( typeVariables == ( NoTypeVariables ) ) { <END_BUG> scope . problemReporter ( ) . nonGenericTypeCannotBeParameterized ( this , currentType , argTypes ) ; return null ; } else if ( argLength != ( typeVariables . length ) ) { scope . problemReporter ( ) . incorrectArityForParameterizedType ( this , currentType , argTypes ) ; return null ; } if ( ( ( typeIsConsistent && ( ! ( currentType . isStatic ( ) ) ) ) && ( qualifiedType != null ) ) && ( qualifiedType . isRawType ( ) ) ) { scope . problemReporter ( ) . rawMemberTypeCannotBeParameterized ( this , scope . environment ( ) . createRawType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , qualifiedType ) , argTypes ) ; typeIsConsistent = false ; } ParameterizedTypeBinding parameterizedType = scope . environment ( ) . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , argTypes , qualifiedType ) ; if ( checkBounds ) parameterizedType . boundCheck ( scope , args ) ; qualifiedType = parameterizedType ; } else { if ( isClassScope ) if ( ( ( ClassScope ) ( scope ) ) . detectHierarchyCycle ( currentType , this , null ) ) return null ; if ( currentType . isGenericType ( ) ) { if ( ( typeIsConsistent && ( qualifiedType != null ) ) && ( qualifiedType . isParameterizedType ( ) ) ) { scope . problemReporter ( ) . parameterizedMemberTypeMissingArguments ( this , scope . environment ( ) . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , null , qualifiedType ) ) ; typeIsConsistent = false ; } qualifiedType = scope . environment ( ) . createRawType ( currentType , qualifiedType ) ; } else { qualifiedType = ( ( qualifiedType != null ) && ( qualifiedType . isParameterizedType ( ) ) ) ? scope . environment ( ) . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , null , qualifiedType ) : currentType ; } } } this . resolvedType = qualifiedType ; if ( isTypeUseDeprecated ( this . resolvedType , scope ) ) reportDeprecatedType ( scope ) ;

Fix:
if ( typeVariables == ( Binding . NO_TYPE_VARIABLES ) ) {