Buggy code:
protected IJavaElement createHandle ( FieldDeclaration fieldDeclaration , TypeDeclaration typeDeclaration , IJavaElement parent ) { } protected IJavaElement createHandle ( AbstractVariableDeclaration variableDeclaration , IJavaElement parent ) { } protected boolean createHierarchyResolver ( IType focusType , PossibleMatch [ ] possibleMatches ) { } protected IJavaElement createImportHandle ( ImportReference importRef ) { } protected IJavaElement createPackageDeclarationHandle ( CompilationUnitDeclaration unit ) { } protected IType createTypeHandle ( String simpleTypeName ) { } protected boolean encloses ( IJavaElement element ) { } private long findLastTypeArgumentInfo ( TypeReference typeRef ) { } protected IBinaryType getBinaryInfo ( ClassFile classFile , IResource resource ) throws CoreException { } protected IType getFocusType ( ) { } protected void getMethodBodies ( CompilationUnitDeclaration unit , MatchingNodeSet nodeSet ) { } protected TypeBinding getType ( Object typeKey , char [ ] typeName ) { } public MethodBinding getMethodBinding ( MethodPattern methodPattern ) { } protected boolean hasAlreadyDefinedType ( CompilationUnitDeclaration parsedUnit ) { } public void initialize ( JavaProject project , int possibleMatchSize ) throws JavaModelException { } protected void locateMatches ( JavaProject javaProject , PossibleMatch [ ] possibleMatches , int start , int length ) throws CoreException { } protected void locateMatches ( JavaProject javaProject , PossibleMatchSet matchSet , int expected ) throws CoreException { } public void locateMatches ( SearchDocument [ ] searchDocuments ) throws CoreException { } public void locatePackageDeclarations ( SearchParticipant participant ) throws CoreException { } protected void locatePackageDeclarations ( SearchPattern searchPattern , SearchParticipant participant ) throws CoreException { } protected IType lookupType ( ReferenceBinding typeBinding ) { } public SearchMatch newDeclarationMatch ( IJavaElement element , Binding binding , int accuracy , int offset , int length ) { } public SearchMatch newDeclarationMatch ( IJavaElement element , Binding binding , int accuracy , int offset , int length , SearchParticipant participant , IResource resource ) { } public SearchMatch newFieldReferenceMatch ( IJavaElement enclosingElement , Binding enclosingBinding , int accuracy , int offset , int length , ASTNode reference ) { } public SearchMatch newLocalVariableReferenceMatch ( IJavaElement enclosingElement , int accuracy , int offset , int length , ASTNode reference ) { } public SearchMatch newMethodReferenceMatch ( IJavaElement enclosingElement , Binding enclosingBinding , int accuracy , int offset , int length , boolean isConstructor , boolean isSynthetic , ASTNode reference ) { } public SearchMatch newPackageReferenceMatch ( IJavaElement enclosingElement , int accuracy , int offset , int length , ASTNode reference ) { } public SearchMatch newTypeParameterReferenceMatch ( IJavaElement enclosingElement , int accuracy , int offset , int length , ASTNode reference ) { } public TypeReferenceMatch newTypeReferenceMatch ( IJavaElement enclosingElement , Binding enclosingBinding , int accuracy , int offset , int length , ASTNode reference ) { } public TypeReferenceMatch newTypeReferenceMatch ( IJavaElement enclosingElement , Binding enclosingBinding , int accuracy , ASTNode reference ) { } protected boolean parseAndBuildBindings ( PossibleMatch possibleMatch , boolean mustResolve ) throws CoreException { } protected void process ( PossibleMatch possibleMatch , boolean bindingsWereCreated ) throws CoreException { } protected void purgeMethodStatements ( TypeDeclaration type , boolean checkEachMethod ) { } protected void reduceParseTree ( CompilationUnitDeclaration unit ) { } public SearchParticipant getParticipant ( ) { } protected void report ( SearchMatch match ) throws CoreException { } protected void reportAccurateTypeReference ( SearchMatch match , ASTNode typeRef , char [ ] name ) throws CoreException { } protected void reportAccurateParameterizedMethodReference ( SearchMatch match , ASTNode statement , TypeReference [ ] typeArguments ) throws CoreException { } protected void reportAccurateParameterizedTypeReference ( SearchMatch match , TypeReference typeRef , int index , TypeReference [ ] typeArguments ) throws CoreException { } protected void reportAccurateFieldReference ( SearchMatch [ ] matches , QualifiedNameReference qNameRef ) throws CoreException { } protected void reportBinaryMemberDeclaration ( IResource resource , IMember binaryMember , Binding binaryMemberBinding , IBinaryType info , int accuracy ) throws CoreException { ClassFile classFile = ( ( ClassFile ) ( binaryMember . getClassFile ( ) ) ) ; ISourceRange range = ( classFile . isOpen ( ) ) ? binaryMember . getNameRange ( ) : SourceMapper . UNKNOWN_RANGE ; if ( ( range . getOffset ( ) ) == ( - 1 ) ) { BinaryType type = ( ( BinaryType ) ( classFile . getType ( ) ) ) ; String sourceFileName = type . sourceFileName ( info ) ; if ( sourceFileName != null ) { SourceMapper mapper = classFile . getSourceMapper ( ) ; if ( mapper != null ) { char [ ] contents = mapper . findSource ( type , sourceFileName ) ; if ( contents != null ) <START_BUG> range = mapper . mapSource ( type , contents , binaryMember ) ; <END_BUG> } } } if ( resource == null ) resource = this . currentPossibleMatch . resource ; SearchMatch match = newDeclarationMatch ( binaryMember , binaryMemberBinding , accuracy , range . getOffset ( ) , range . getLength ( ) , getParticipant ( ) , resource ) ; report ( match ) ; } protected void reportMatching ( TypeDeclaration type , AbstractMethodDeclaration method , IJavaElement parent , int accuracy , boolean typeInHierarchy , MatchingNodeSet nodeSet ) throws CoreException { } protected void reportMatching ( Annotation [ ] annotations , IJavaElement enclosingElement , Binding elementBinding , MatchingNodeSet nodeSet , boolean matchedContainer , boolean enclosesElement ) throws CoreException { } protected void reportMatching ( CompilationUnitDeclaration unit , boolean mustResolve ) throws CoreException { } protected void reportMatching ( FieldDeclaration field , FieldDeclaration [ ] otherFields , TypeDeclaration type , IJavaElement parent , int accuracy , boolean typeInHierarchy , MatchingNodeSet nodeSet ) throws CoreException { } protected void reportMatching ( TypeDeclaration type , IJavaElement parent , int accuracy , MatchingNodeSet nodeSet , int occurrenceCount ) throws CoreException { } protected void reportMatching ( TypeParameter [ ] typeParameters , IJavaElement enclosingElement , IJavaElement parent , Binding binding , MatchingNodeSet nodeSet ) throws CoreException { } protected void reportMatchingSuper ( TypeReference superReference , IJavaElement enclosingElement , Binding elementBinding , MatchingNodeSet nodeSet , boolean matchedClassContainer ) throws CoreException { } protected boolean typeInHierarchy ( ReferenceBinding binding ) { } }

Fix:
range = mapper . mapSource ( type , contents , info , binaryMember ) ;