Buggy code:
public class ClassFileMatchLocator implements IIndexConstants { public static char [ ] convertClassFileFormat ( char [ ] name ) { } boolean checkDeclaringType ( IBinaryType enclosingBinaryType , char [ ] simpleName , char [ ] qualification , boolean isCaseSensitive ) { } boolean checkParameters ( char [ ] methodDescriptor , char [ ] [ ] parameterSimpleNames , char [ ] [ ] parameterQualifications , boolean isCaseSensitive ) { } boolean checkTypeName ( char [ ] simpleName , char [ ] qualification , char [ ] fullyQualifiedTypeName , boolean isCaseSensitive ) { } public void locateMatches ( MatchLocator locator , ClassFile classFile , IBinaryType info ) throws CoreException { SearchPattern pattern = locator . pattern ; BinaryType binaryType = ( ( BinaryType ) ( classFile . getType ( ) ) ) ; if ( matchBinary ( pattern , info , null ) ) locator . reportBinaryMemberDeclaration ( null , binaryType , info , SearchMatch . A_ACCURATE ) ; int accuracy = SearchMatch . A_ACCURATE ; if ( ( ( InternalSearchPattern ) ( pattern ) ) . mustResolve ) { try { <START_BUG> BinaryTypeBinding binding = locator . cacheBinaryType ( binaryType ) ; <END_BUG> if ( binding != null ) { if ( ! ( locator . typeInHierarchy ( binding ) ) ) return ; MethodBinding [ ] methods = binding . methods ( ) ; for ( int i = 0 , l = methods . length ; i < l ; i ++ ) { MethodBinding method = methods [ i ] ; if ( ( locator . patternLocator . resolveLevel ( method ) ) == ( PatternLocator . ACCURATE_MATCH ) ) { IMethod methodHandle = binaryType . getMethod ( new String ( ( method . isConstructor ( ) ? binding . compoundName [ ( ( binding . compoundName . length ) - 1 ) ] : method . selector ) ) , CharOperation . toStrings ( Signature . getParameterTypes ( ClassFileMatchLocator . convertClassFileFormat ( method . signature ( ) ) ) ) ) ; locator . reportBinaryMemberDeclaration ( null , methodHandle , info , SearchMatch . A_ACCURATE ) ; } } FieldBinding [ ] fields = binding . fields ( ) ; for ( int i = 0 , l = fields . length ; i < l ; i ++ ) { FieldBinding field = fields [ i ] ; if ( ( locator . patternLocator . resolveLevel ( field ) ) == ( PatternLocator . ACCURATE_MATCH ) ) { IField fieldHandle = binaryType . getField ( new String ( field . name ) ) ; locator . reportBinaryMemberDeclaration ( null , fieldHandle , info , SearchMatch . A_ACCURATE ) ; } } return ; } } catch ( AbortCompilation e ) { } accuracy = SearchMatch . A_INACCURATE ; } IBinaryMethod [ ] methods = info . getMethods ( ) ; if ( methods != null ) { for ( int i = 0 , l = methods . length ; i < l ; i ++ ) { IBinaryMethod method = methods [ i ] ; if ( matchBinary ( pattern , method , info ) ) { char [ ] name ; if ( method . isConstructor ( ) ) { name = info . getName ( ) ; int lastSlash = CharOperation . lastIndexOf ( '//' , name ) ; if ( lastSlash != ( - 1 ) ) { name = CharOperation . subarray ( name , ( lastSlash + 1 ) , name . length ) ; } } else { name = method . getSelector ( ) ; } IMethod methodHandle = binaryType . getMethod ( new String ( name ) , CharOperation . toStrings ( Signature . getParameterTypes ( ClassFileMatchLocator . convertClassFileFormat ( method . getMethodDescriptor ( ) ) ) ) ) ; locator . reportBinaryMemberDeclaration ( null , methodHandle , info , accuracy ) ; } } } IBinaryField [ ] fields = info . getFields ( ) ; if ( fields != null ) { for ( int i = 0 , l = fields . length ; i < l ; i ++ ) { IBinaryField field = fields [ i ] ; if ( matchBinary ( pattern , field , info ) ) { IField fieldHandle = binaryType . getField ( new String ( field . getName ( ) ) ) ; locator . reportBinaryMemberDeclaration ( null , fieldHandle , info , accuracy ) ; } } } } boolean matchBinary ( SearchPattern pattern , Object binaryInfo , IBinaryType enclosingBinaryType ) { } boolean matchConstructor ( ConstructorPattern pattern , Object binaryInfo , IBinaryType enclosingBinaryType ) { } boolean matchField ( FieldPattern pattern , Object binaryInfo , IBinaryType enclosingBinaryType ) { } boolean matchMethod ( MethodPattern pattern , Object binaryInfo , IBinaryType enclosingBinaryType ) { } boolean matchSuperTypeReference ( SuperTypeReferencePattern pattern , Object binaryInfo , IBinaryType enclosingBinaryType ) { } boolean matchTypeDeclaration ( TypeDeclarationPattern pattern , Object binaryInfo , IBinaryType enclosingBinaryType ) { } }

Fix:
BinaryTypeBinding binding = locator . cacheBinaryType ( binaryType , info ) ;