Buggy code:
public class TypeDeclaration extends Statement implements ReferenceContext , ProblemSeverities { public static final char [ ] ANONYMOUS_EMPTY_NAME = new char [ ] { } ; public int modifiers = AccDefault ; public int modifiersSourceStart ; public Annotation [ ] annotations ; public char [ ] name ; public TypeReference superclass ; public TypeReference [ ] superInterfaces ; public FieldDeclaration [ ] fields ; public AbstractMethodDeclaration [ ] methods ; public TypeDeclaration [ ] memberTypes ; public SourceTypeBinding binding ; public ClassScope scope ; public MethodScope initializerScope ; public MethodScope staticInitializerScope ; public boolean ignoreFurtherInvestigation = false ; public int maxFieldCount ; public int declarationSourceStart ; public int declarationSourceEnd ; public int bodyStart ; public int bodyEnd ; protected boolean hasBeenGenerated = false ; public CompilationResult compilationResult ; public MethodDeclaration [ ] missingAbstractMethods ; public Javadoc javadoc ; public QualifiedAllocationExpression allocation ; public TypeDeclaration enclosingType ; public FieldBinding enumValuesSyntheticfield ; public TypeParameter [ ] typeParameters ; public TypeDeclaration ( CompilationResult compilationResult ) { } public void abort ( int abortLevel , IProblem problem ) { } public final void addClinit ( ) { } public MethodDeclaration addMissingAbstractMethodFor ( MethodBinding methodBinding ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void analyseCode ( ClassScope enclosingClassScope ) { } public void analyseCode ( ClassScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void analyseCode ( CompilationUnitScope unitScope ) { } public boolean checkConstructors ( Parser parser ) { } public CompilationResult compilationResult ( ) { } public ConstructorDeclaration createDefaultConstructor ( boolean needExplicitConstructorCall , boolean needToInsert ) { } public MethodBinding createDefaultConstructorWithBinding ( MethodBinding inheritedConstructorBinding ) { } public FieldDeclaration declarationOf ( FieldBinding fieldBinding ) { } public TypeDeclaration declarationOf ( MemberTypeBinding memberTypeBinding ) { } public AbstractMethodDeclaration declarationOf ( MethodBinding methodBinding ) { } public TypeDeclaration declarationOfType ( char [ ] [ ] typeName ) { } public void generateCode ( ClassFile enclosingClassFile ) { } public void generateCode ( BlockScope blockScope , CodeStream codeStream ) { } public void generateCode ( ClassScope classScope , ClassFile enclosingClassFile ) { } public void generateCode ( CompilationUnitScope unitScope ) { } public int getKind ( ) { } public boolean hasErrors ( ) { } public void internalAnalyseCode ( FlowContext flowContext , FlowInfo flowInfo ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { if ( ! ( flowInfo . isReachable ( ) ) ) return ; NestedTypeBinding nestedType = ( ( NestedTypeBinding ) ( binding ) ) ; MethodScope methodScope = currentScope . methodScope ( ) ; if ( ( ! ( methodScope . isStatic ) ) && ( ! ( methodScope . isConstructorCall ) ) ) { nestedType . addSyntheticArgumentAndField ( binding . enclosingType ( ) ) ; } if ( binding . isAnonymousType ( ) ) { <START_BUG> ReferenceBinding superclassBinding = binding . superclass ; <END_BUG> if ( ( ( superclassBinding . enclosingType ( ) ) != null ) && ( ! ( superclassBinding . isStatic ( ) ) ) ) { if ( ( ! ( superclassBinding . isLocalType ( ) ) ) || ( ( ( ( NestedTypeBinding ) ( superclassBinding ) ) . getSyntheticField ( superclassBinding . enclosingType ( ) , true ) ) != null ) ) { nestedType . addSyntheticArgument ( superclassBinding . enclosingType ( ) ) ; } } } } public void manageEnclosingInstanceAccessIfNecessary ( ClassScope currentScope , FlowInfo flowInfo ) { } public final boolean needClassInitMethod ( ) { } public void parseMethod ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printBody ( int indent , StringBuffer output ) { } public StringBuffer printHeader ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void resolve ( ) { } public void resolve ( BlockScope blockScope ) { } public void resolve ( ClassScope upperScope ) { } public void resolve ( CompilationUnitScope upperScope ) { } public void tagAsHavingErrors ( ) { } public void traverse ( ASTVisitor visitor , CompilationUnitScope unitScope ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } public void traverse ( ASTVisitor visitor , ClassScope classScope ) { } void updateMaxFieldCount ( ) { } }

Fix:
ReferenceBinding superclassBinding = ( ( ReferenceBinding ) ( binding . superclass . erasure ( ) ) ) ;