Buggy code:
public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeReference { public TypeReference [ ] [ ] typeArguments ; private boolean didResolve = false ; public ParameterizedQualifiedTypeReference ( char [ ] [ ] tokens , TypeReference [ ] [ ] typeArguments , int dim , long [ ] positions ) { } public void checkBounds ( Scope scope ) { } public void checkBounds ( ReferenceBinding type , Scope scope , int index ) { } public TypeReference copyDims ( int dim ) { } public char [ ] [ ] getParameterizedTypeName ( ) { } protected TypeBinding getTypeBinding ( Scope scope ) { } private TypeBinding internalResolveType ( Scope scope , boolean checkBounds ) { this . constant = Constant . NotAConstant ; 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 ( ) ; <START_BUG> if ( ( qualifiedType != null ) && ( qualifiedType . isGenericType ( ) ) ) { <END_BUG> 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 ( ) ; if ( typeVariables == ( Binding . NO_TYPE_VARIABLES ) ) { 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 ;

Fix:
if ( ( qualifiedType != null ) && ( ( qualifiedType . isGenericType ( ) ) || ( qualifiedType . isParameterizedType ( ) ) ) ) {