Buggy code:
public abstract class PatternLocator implements ISearchPattern , 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 ) { if ( binding instanceof ReferenceBinding ) { ReferenceBinding type = ( ( ReferenceBinding ) ( binding ) ) ; if ( type . isLocalType ( ) ) return type . isMemberType ( ) ? CharOperation . concat ( PatternLocator . qualifiedSourceName ( type . enclosingType ( ) ) , type . sourceName ( ) , '.' ) : CharOperation . concat ( PatternLocator . qualifiedSourceName ( type . enclosingType ( ) ) , new char [ ] { '.' , '1' , '.' } , type . sourceName ( ) ) ; } <START_BUG> return binding . qualifiedSourceName ( ) ; <END_BUG> } 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 { } 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:
return binding != null ? binding . qualifiedSourceName ( ) : null ;