Buggy code:
class DefaultBindingResolver extends BindingResolver { static class BindingTables { Map bindingKeysToBindings ; Map compilerBindingsToASTBindings ; BindingTables ( ) { } } private static final char [ ] [ ] JAVA_LANG_EXCEPTION = new char [ ] [ ] { "java" . toCharArray ( ) , "lang" . toCharArray ( ) , "Exception" . toCharArray ( ) } ; private static final char [ ] [ ] JAVA_LANG_STRINGBUFFER = new char [ ] [ ] { "java" . toCharArray ( ) , "lang" . toCharArray ( ) , "StringBuffer" . toCharArray ( ) } ; Map astNodesToBlockScope ; Map bindingsToAstNodes ; DefaultBindingResolver . BindingTables bindingTables ; CompilationUnitResolver compilationUnitResolver ; Map newAstToOldAst ; private CompilationUnitScope scope ; WorkingCopyOwner workingCopyOwner ; DefaultBindingResolver ( ) { } DefaultBindingResolver ( CompilationUnitScope scope , WorkingCopyOwner workingCopyOwner , DefaultBindingResolver . BindingTables bindingTables , CompilationUnitResolver compilationUnitResolver ) { } synchronized ASTNode findDeclaringNode ( IBinding binding ) { } synchronized ASTNode findDeclaringNode ( String bindingKey ) { } IBinding getBinding ( Binding binding ) { } synchronized org . eclipse . jdt . internal . compiler . ast . ASTNode getCorrespondingNode ( ASTNode currentNode ) { } synchronized IMethodBinding getMethodBinding ( MethodBinding methodBinding ) { } synchronized IPackageBinding getPackageBinding ( PackageBinding packageBinding ) { } synchronized ITypeBinding getTypeBinding ( TypeBinding referenceBinding ) { } synchronized IVariableBinding getVariableBinding ( VariableBinding variableBinding ) { } synchronized void recordScope ( ASTNode astNode , BlockScope blockScope ) { } synchronized IMethodBinding resolveConstructor ( ClassInstanceCreation expression ) { } synchronized IMethodBinding resolveConstructor ( ConstructorInvocation expression ) { } synchronized IMethodBinding resolveConstructor ( SuperConstructorInvocation expression ) { } synchronized ITypeBinding resolveExpressionType ( Expression expression ) { } synchronized IVariableBinding resolveField ( FieldAccess fieldAccess ) { } synchronized IVariableBinding resolveField ( SuperFieldAccess fieldAccess ) { } synchronized IBinding resolveImport ( ImportDeclaration importDeclaration ) { } IVariableBinding resolveMember ( AnnotationTypeMemberDeclaration member ) { } synchronized IMethodBinding resolveMethod ( MethodDeclaration method ) { } synchronized IMethodBinding resolveMethod ( MethodInvocation method ) { } synchronized IMethodBinding resolveMethod ( SuperMethodInvocation method ) { } synchronized IBinding resolveName ( Name name ) { } synchronized IPackageBinding resolvePackage ( PackageDeclaration pkg ) { } synchronized IBinding resolveReference ( MemberRef ref ) { } synchronized IBinding resolveReference ( MethodRef ref ) { } ITypeBinding resolveType ( AnnotationTypeDeclaration type ) { } synchronized ITypeBinding resolveType ( AnonymousClassDeclaration type ) { } ITypeBinding resolveType ( EnumDeclaration type ) { } synchronized ITypeBinding resolveType ( Type type ) { } synchronized ITypeBinding resolveType ( TypeDeclaration type ) { } synchronized ITypeBinding resolveTypeParameter ( TypeParameter typeParameter ) { } synchronized IVariableBinding resolveVariable ( EnumConstantDeclaration enumConstant ) { final Object node = this . newAstToOldAst . get ( enumConstant ) ; if ( node instanceof FieldDeclaration ) { FieldDeclaration fieldDeclaration = ( ( FieldDeclaration ) ( node ) ) ; IVariableBinding variableBinding = this . getVariableBinding ( fieldDeclaration . binding ) ; if ( variableBinding == null ) { return null ; } <START_BUG> this . bindingsToAstNodes . put ( variableBinding , node ) ; <END_BUG> String key = variableBinding . getKey ( ) ; if ( key != null ) { this . bindingTables . bindingKeysToBindings . put ( key , variableBinding ) ; } return variableBinding ; } return null ; } synchronized IVariableBinding resolveVariable ( VariableDeclaration variable ) { } synchronized ITypeBinding resolveWellKnownType ( String name ) { } synchronized void store ( ASTNode node , org . eclipse . jdt . internal . compiler . ast . ASTNode oldASTNode ) { } synchronized void updateKey ( ASTNode node , ASTNode newNode ) { } }

Fix:
this . bindingsToAstNodes . put ( variableBinding , enumConstant ) ;