Buggy code:
public abstract class PatternLocator implements IIndexConstants { protected int matchMode ; protected boolean isCaseSensitive ; public static final int IMPOSSIBLE_MATCH = 0 ; public static final int INACCURATE_MATCH = 1 ; public static final int POSSIBLE_MATCH = 2 ; public static final int ACCURATE_MATCH = 3 ; public static final int COMPILATION_UNIT_CONTAINER = 1 ; public static final int CLASS_CONTAINER = 2 ; public static final int METHOD_CONTAINER = 4 ; public static final int FIELD_CONTAINER = 8 ; public static final int ALL_CONTAINER = ( ( ( PatternLocator . COMPILATION_UNIT_CONTAINER ) | ( PatternLocator . CLASS_CONTAINER ) ) | ( PatternLocator . METHOD_CONTAINER ) ) | ( PatternLocator . FIELD_CONTAINER ) ; public static PatternLocator patternLocator ( SearchPattern pattern ) { } public static char [ ] qualifiedPattern ( char [ ] simpleNamePattern , char [ ] qualificationPattern ) { } public static char [ ] qualifiedSourceName ( TypeBinding binding ) { } public PatternLocator ( SearchPattern pattern ) { } public void initializePolymorphicSearch ( MatchLocator locator ) { } public int match ( ASTNode node , MatchingNodeSet nodeSet ) { } public int match ( ConstructorDeclaration node , MatchingNodeSet nodeSet ) { } public int match ( Expression node , MatchingNodeSet nodeSet ) { } public int match ( FieldDeclaration node , MatchingNodeSet nodeSet ) { } public int match ( LocalDeclaration node , MatchingNodeSet nodeSet ) { } public int match ( MethodDeclaration node , MatchingNodeSet nodeSet ) { } public int match ( MessageSend node , MatchingNodeSet nodeSet ) { } public int match ( Reference node , MatchingNodeSet nodeSet ) { } public int match ( TypeDeclaration node , MatchingNodeSet nodeSet ) { } public int match ( TypeReference node , MatchingNodeSet nodeSet ) { } protected int matchContainer ( ) { } protected boolean matchesName ( char [ ] pattern , char [ ] name ) { } protected boolean matchesTypeReference ( char [ ] pattern , TypeReference type ) { } protected int matchLevel ( ImportReference importRef ) { } protected void matchLevelAndReportImportRef ( ImportReference importRef , Binding binding , MatchLocator locator ) throws CoreException { } protected void matchReportImportRef ( ImportReference importRef , Binding binding , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected void matchReportReference ( ASTNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { <START_BUG> SearchMatch match = JavaSearchMatch . newReferenceMatch ( referenceType ( ) , element , accuracy , reference . sourceStart , ( ( reference . sourceEnd ) + 1 ) , locator ) ; <END_BUG> locator . report ( match ) ; } protected int referenceType ( ) { } public int resolveLevel ( ASTNode possibleMatchingNode ) { } public int resolveLevel ( Binding binding ) { } protected int resolveLevelForType ( char [ ] simpleNamePattern , char [ ] qualificationPattern , TypeBinding type ) { } protected int resolveLevelForType ( char [ ] qualifiedPattern , TypeBinding type ) { } public String toString ( ) { } }

Fix:
SearchMatch match = locator . newReferenceMatch ( referenceType ( ) , element , accuracy , reference . sourceStart , ( ( reference . sourceEnd ) + 1 ) ) ;