Buggy code:
public class ClassScope extends Scope { public TypeDeclaration referenceContext ; public TypeReference superTypeReference ; public ClassScope ( Scope parent , TypeDeclaration context ) { } void buildAnonymousTypeBinding ( SourceTypeBinding enclosingType , ReferenceBinding supertype ) { } private void buildFields ( ) { } void buildFieldsAndMethods ( ) { } private LocalTypeBinding buildLocalType ( SourceTypeBinding enclosingType , ReferenceBinding anonymousOriginalSuperType , PackageBinding packageBinding ) { } void buildLocalTypeBinding ( SourceTypeBinding enclosingType ) { } private void buildMemberTypes ( AccessRestriction accessRestriction ) { } private void buildMethods ( ) { } SourceTypeBinding buildType ( SourceTypeBinding enclosingType , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } private void buildTypeVariables ( ) { } private void checkAndSetModifiers ( ) { } private void checkAndSetModifiersForField ( FieldBinding fieldBinding , FieldDeclaration fieldDecl ) { } public void checkParameterizedSuperTypeCollisions ( ) { } private void checkForInheritedMemberTypes ( SourceTypeBinding sourceType ) { } public void checkParameterizedTypeBounds ( ) { } private void connectMemberTypes ( ) { } private boolean connectSuperclass ( ) { } private boolean connectEnumSuperclass ( ) { SourceTypeBinding sourceType = referenceContext . binding ; ReferenceBinding rootEnumType = getJavaLangEnum ( ) ; boolean foundCycle = detectHierarchyCycle ( sourceType , rootEnumType , null ) ; TypeVariableBinding [ ] refTypeVariables = rootEnumType . typeVariables ( ) ; if ( refTypeVariables == ( Binding . NO_TYPE_VARIABLES ) ) { problemReporter ( ) . nonGenericTypeCannotBeParameterized ( null , rootEnumType , new TypeBinding [ ] { sourceType } ) ; return false ; } else if ( 1 != ( refTypeVariables . length ) ) { problemReporter ( ) . incorrectArityForParameterizedType ( null , rootEnumType , new TypeBinding [ ] { sourceType } ) ; return false ; } <START_BUG> ParameterizedTypeBinding superType = environment ( ) . createParameterizedType ( rootEnumType , new TypeBinding [ ] { environment ( ) . convertToRawType ( sourceType ) } , null ) ; <END_BUG> sourceType . superclass = superType ; if ( ( refTypeVariables [ 0 ] . boundCheck ( superType , sourceType ) ) != ( OK ) ) { problemReporter ( ) . typeMismatchError ( rootEnumType , refTypeVariables [ 0 ] , sourceType , null ) ; } return ! foundCycle ; } private boolean connectSuperInterfaces ( ) { } void connectTypeHierarchy ( ) { } private void connectTypeHierarchyWithoutMembers ( ) { } public boolean detectHierarchyCycle ( TypeBinding superType , TypeReference reference ) { } private boolean detectHierarchyCycle ( SourceTypeBinding sourceType , ReferenceBinding superType , TypeReference reference ) { } private ReferenceBinding findSupertype ( TypeReference typeReference ) { } public ProblemReporter problemReporter ( ) { } public TypeDeclaration referenceType ( ) { } public String toString ( ) { } }

Fix:
ParameterizedTypeBinding superType = environment ( ) . createParameterizedType ( rootEnumType , new TypeBinding [ ] { environment ( ) . convertToRawType ( sourceType , false ) } , null ) ;