Buggy code:
class DefaultBindingResolver extends BindingResolver { static class BindingTables { Map bindingKeysToBindings ; Map compilerBindingsToASTBindings ; BindingTables ( ) { } } Map astNodesToBlockScope ; Map bindingsToAstNodes ; DefaultBindingResolver . BindingTables bindingTables ; Map newAstToOldAst ; private CompilationUnitScope scope ; WorkingCopyOwner workingCopyOwner ; DefaultBindingResolver ( CompilationUnitScope scope , WorkingCopyOwner workingCopyOwner , DefaultBindingResolver . BindingTables bindingTables ) { } DefaultBindingResolver ( LookupEnvironment lookupEnvironment , WorkingCopyOwner workingCopyOwner , DefaultBindingResolver . BindingTables bindingTables ) { } 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 IMemberValuePairBinding getMemberValuePairBinding ( ElementValuePair valuePair ) { } synchronized IPackageBinding getPackageBinding ( PackageBinding packageBinding ) { } private int getTypeArguments ( ParameterizedQualifiedTypeReference typeReference ) { } synchronized ITypeBinding getTypeBinding ( TypeBinding referenceBinding ) { if ( referenceBinding == null ) { return null ; } else if ( ! ( referenceBinding . isValidBinding ( ) ) ) { switch ( referenceBinding . problemId ( ) ) { case ProblemReasons . NotVisible : case ProblemReasons . NonStaticReferenceInStaticContext : if ( referenceBinding instanceof ProblemReferenceBinding ) { ProblemReferenceBinding problemReferenceBinding = ( ( ProblemReferenceBinding ) ( referenceBinding ) ) ; <START_BUG> Binding binding2 = problemReferenceBinding . closestMatch ; <END_BUG> if ( ( binding2 != null ) && ( binding2 instanceof TypeBinding ) ) { TypeBinding binding = ( ( TypeBinding ) ( this . bindingTables . compilerBindingsToASTBindings . get ( binding2 ) ) ) ; if ( binding != null ) { return binding ; } binding = new TypeBinding ( this , ( ( TypeBinding ) ( binding2 ) ) ) ; this . bindingTables . compilerBindingsToASTBindings . put ( binding2 , binding ) ; return binding ; } } } return null ; } else { TypeBinding binding = ( ( TypeBinding ) ( this . bindingTables . compilerBindingsToASTBindings . get ( referenceBinding ) ) ) ; if ( binding != null ) { return binding ; } binding = new TypeBinding ( this , referenceBinding ) ; this . bindingTables . compilerBindingsToASTBindings . put ( referenceBinding , binding ) ; return binding ; } } synchronized IVariableBinding getVariableBinding ( VariableBinding variableBinding ) { } synchronized IAnnotationBinding getAnnotationInstance ( AnnotationBinding internalInstance ) { } LookupEnvironment lookupEnvironment ( ) { } synchronized void recordScope ( ASTNode astNode , BlockScope blockScope ) { } boolean resolveBoxing ( Expression expression ) { } boolean resolveUnboxing ( Expression expression ) { } Object resolveConstantExpressionValue ( Expression expression ) { } synchronized IMethodBinding resolveConstructor ( ClassInstanceCreation expression ) { } synchronized IMethodBinding resolveConstructor ( ConstructorInvocation expression ) { } IMethodBinding resolveConstructor ( EnumConstantDeclaration enumConstantDeclaration ) { } 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 ) { } IMethodBinding resolveMember ( AnnotationTypeMemberDeclaration declaration ) { } synchronized IMethodBinding resolveMethod ( MethodDeclaration method ) { } synchronized IMethodBinding resolveMethod ( MethodInvocation method ) { } synchronized IMethodBinding resolveMethod ( SuperMethodInvocation method ) { } synchronized ITypeBinding resolveTypeBindingForName ( Name name ) { } synchronized IBinding resolveName ( Name name ) { } synchronized IPackageBinding resolvePackage ( PackageDeclaration pkg ) { } synchronized IBinding resolveReference ( MemberRef ref ) { } synchronized IMemberValuePairBinding resolveMemberValuePair ( MemberValuePair memberValuePair ) { } 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 ) { } synchronized IVariableBinding resolveVariable ( VariableDeclaration variable ) { } synchronized ITypeBinding resolveWellKnownType ( String name ) { } synchronized IAnnotationBinding resolveAnnotation ( final Annotation domASTNode ) { } public CompilationUnitScope scope ( ) { } synchronized void store ( ASTNode node , org . eclipse . jdt . internal . compiler . ast . ASTNode oldASTNode ) { } synchronized void updateKey ( ASTNode node , ASTNode newNode ) { } ITypeBinding resolveArrayType ( ITypeBinding typeBinding , int dimensions ) { } }

Fix:
Binding binding2 = problemReferenceBinding . closestMatch ( ) ;