Buggy code:
public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeReference { public TypeReference [ ] [ ] typeArguments ; 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 . bits ) & ( ASTNode . DidResolve ) ) != 0 ) { if ( ( ( this . resolvedType ) != null ) && ( ! ( this . resolvedType . isValidBinding ( ) ) ) ) return null ; return this . resolvedType ; } this . bits |= ASTNode . DidResolve ; boolean isClassScope = ( scope . kind ) == ( Scope . CLASS_SCOPE ) ; Binding binding = scope . getPackage ( this . tokens ) ; if ( ( binding != null ) && ( ! ( binding . isValidBinding ( ) ) ) ) { this . resolvedType = ( ( ReferenceBinding ) ( binding ) ) ; reportInvalidType ( scope ) ; for ( int i = 0 , max = this . tokens . length ; i < max ; i ++ ) { TypeReference [ ] args = this . typeArguments [ i ] ; if ( args != null ) { int argLength = args . length ; for ( int j = 0 ; j < argLength ; j ++ ) { TypeReference typeArgument = args [ j ] ; if ( isClassScope ) { typeArgument . resolveType ( ( ( ClassScope ) ( scope ) ) ) ; } else { typeArgument . resolveType ( ( ( BlockScope ) ( scope ) ) , checkBounds ) ; } } } } return null ; } PackageBinding packageBinding = ( binding == null ) ? null : ( ( PackageBinding ) ( binding ) ) ; 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 ) ; for ( int j = i ; j < max ; j ++ ) { TypeReference [ ] args = this . typeArguments [ j ] ; if ( args != null ) { int argLength = args . length ; for ( int k = 0 ; k < argLength ; k ++ ) { TypeReference typeArgument = args [ k ] ; if ( isClassScope ) { typeArgument . resolveType ( ( ( ClassScope ) ( scope ) ) ) ; } else { typeArgument . resolveType ( ( ( BlockScope ) ( scope ) ) ) ; } } } } return null ; } ReferenceBinding currentType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; if ( qualifiedType == null ) { qualifiedType = currentType . enclosingType ( ) ; if ( ( qualifiedType != null ) && ( ( qualifiedType . isGenericType ( ) ) || ( qualifiedType . isParameterizedType ( ) ) ) ) { <START_BUG> qualifiedType = ( currentType . isStatic ( ) ) ? ( ( ReferenceBinding ) ( scope . environment ( ) . convertToRawType ( qualifiedType ) ) ) : scope . environment ( ) . convertToParameterizedType ( qualifiedType ) ; <END_BUG> } } 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 ) ) return null ; } TypeVariableBinding [ ] typeVariables = currentType . typeVariables ( ) ; if ( typeVariables == ( Binding . NO_TYPE_VARIABLES ) ) { scope . problemReporter ( ) . nonGenericTypeCannotBeParameterized ( i , this , currentType , argTypes ) ; return null ; }

Fix:
qualifiedType = ( currentType . isStatic ( ) ) ? ( ( ReferenceBinding ) ( scope . environment ( ) . convertToRawType ( qualifiedType , false ) ) ) : scope . environment ( ) . convertToParameterizedType ( qualifiedType ) ;