Buggy code:
public class ParameterizedSingleTypeReference extends ArrayTypeReference { public TypeReference [ ] typeArguments ; private boolean didResolve = false ; public ParameterizedSingleTypeReference ( char [ ] name , TypeReference [ ] typeArguments , int dim , long pos ) { } public void checkBounds ( Scope scope ) { } public TypeReference copyDims ( int dim ) { } public char [ ] [ ] getParameterizedTypeName ( ) { } protected TypeBinding getTypeBinding ( Scope scope ) { } private TypeBinding internalResolveType ( Scope scope , ReferenceBinding enclosingType , boolean checkBounds ) { this . constant = NotAConstant ; if ( this . didResolve ) { if ( ( ( this . resolvedType ) != null ) && ( ! ( this . resolvedType . isValidBinding ( ) ) ) ) return null ; return this . resolvedType ; } this . didResolve = true ; if ( enclosingType == null ) { this . resolvedType = scope . getType ( token ) ; if ( ! ( this . resolvedType . isValidBinding ( ) ) ) { reportInvalidType ( scope ) ; return null ; } enclosingType = this . resolvedType . enclosingType ( ) ; if ( enclosingType != null ) { ReferenceBinding currentType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; if ( ( currentType . isStatic ( ) ) || ( ( enclosingType . isGenericType ( ) ) && ( ( enclosingType . outermostEnclosingType ( ) ) != ( scope . outerMostClassScope ( ) . referenceContext . binding ) ) ) ) { enclosingType = ( ( ReferenceBinding ) ( scope . environment ( ) . convertToRawType ( enclosingType ) ) ) ; } } } else { this . resolvedType = scope . getMemberType ( token , ( ( ReferenceBinding ) ( enclosingType . erasure ( ) ) ) ) ; if ( ! ( this . resolvedType . isValidBinding ( ) ) ) { scope . problemReporter ( ) . invalidEnclosingType ( this , this . resolvedType , enclosingType ) ; return null ; } if ( isTypeUseDeprecated ( this . resolvedType , scope ) ) scope . problemReporter ( ) . deprecatedType ( this . resolvedType , this ) ; } boolean isClassScope = ( scope . kind ) == ( Scope . CLASS_SCOPE ) ; ReferenceBinding currentType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; int argLength = this . typeArguments . length ; TypeBinding [ ] argTypes = new TypeBinding [ argLength ] ; boolean argHasError = false ; for ( int i = 0 ; i < argLength ; i ++ ) { TypeReference typeArgument = this . typeArguments [ i ] ; TypeBinding argType = ( isClassScope ) ? typeArgument . resolveTypeArgument ( ( ( ClassScope ) ( scope ) ) , currentType , i ) : typeArgument . resolveTypeArgument ( ( ( BlockScope ) ( scope ) ) , currentType , i ) ; if ( argType == null ) { argHasError = true ; } else { argTypes [ i ] = argType ; } } if ( argHasError ) return null ; if ( isClassScope ) if ( ( ( ClassScope ) ( scope ) ) . detectHierarchyCycle ( currentType , this , argTypes ) ) return null ; TypeVariableBinding [ ] typeVariables = currentType . typeVariables ( ) ; if ( typeVariables == ( NoTypeVariables ) ) { scope . problemReporter ( ) . nonGenericTypeCannotBeParameterized ( this , currentType , argTypes ) ; return null ; } else if ( argLength != ( typeVariables . length ) ) { scope . problemReporter ( ) . incorrectArityForParameterizedType ( this , currentType , argTypes ) ; return null ; } else if ( ( ( ! ( currentType . isStatic ( ) ) ) && ( enclosingType != null ) ) && ( enclosingType . isRawType ( ) ) ) { scope . problemReporter ( ) . rawMemberTypeCannotBeParameterized ( this , scope . environment ( ) . createRawType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , enclosingType ) , argTypes ) ; return null ; } boolean allEqual = true ; for ( int i = 0 ; allEqual && ( i < argLength ) ; i ++ ) allEqual = ( typeVariables [ i ] ) == ( argTypes [ i ] ) ; if ( ! allEqual ) { <START_BUG> ParameterizedTypeBinding parameterizedType = scope . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , argTypes , enclosingType ) ; <END_BUG> if ( checkBounds ) parameterizedType . boundCheck ( scope , this . typeArguments ) ; this . resolvedType = parameterizedType ; if ( isTypeUseDeprecated ( this . resolvedType , scope ) ) reportDeprecatedType ( scope ) ; } if ( ( this . dimensions ) > 0 ) { if ( ( dimensions ) > 255 ) scope . problemReporter ( ) . tooManyDimensions ( this ) ; this . resolvedType = scope . createArrayType ( this . resolvedType , dimensions ) ; } return this . resolvedType ; } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope , boolean checkBounds ) { } public TypeBinding resolveType ( ClassScope scope ) { } public TypeBinding resolveTypeEnclosing ( BlockScope scope , ReferenceBinding enclosingType ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
ParameterizedTypeBinding parameterizedType = scope . environment ( ) . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , argTypes , enclosingType ) ;