Buggy code:
public abstract class SearchPattern extends InternalSearchPattern { public static final int R_EXACT_MATCH = 0 ; public static final int R_PREFIX_MATCH = 1 ; public static final int R_PATTERN_MATCH = 2 ; public static final int R_REGEXP_MATCH = 4 ; public static final int R_CASE_SENSITIVE = 8 ; public static final int R_ERASURE_MATCH = 16 ; public static final int R_EQUIVALENT_MATCH = 32 ; public static final int R_FULL_MATCH = 64 ; public static final int R_CAMELCASE_MATCH = 128 ; private static final int MODE_MASK = ( ( ( SearchPattern . R_EXACT_MATCH ) | ( SearchPattern . R_PREFIX_MATCH ) ) | ( SearchPattern . R_PATTERN_MATCH ) ) | ( SearchPattern . R_REGEXP_MATCH ) ; private int matchRule ; public SearchPattern ( int matchRule ) { } public static final boolean camelCaseMatch ( String pattern , String name ) { } public static final boolean camelCaseMatch ( String pattern , int patternStart , int patternEnd , String name , int nameStart , int nameEnd ) { } public static SearchPattern createAndPattern ( SearchPattern leftPattern , SearchPattern rightPattern ) { } private static SearchPattern createFieldPattern ( String patternString , int limitTo , int matchRule ) { } private static SearchPattern createMethodOrConstructorPattern ( String patternString , int limitTo , int matchRule , boolean isConstructor ) { } public static SearchPattern createOrPattern ( SearchPattern leftPattern , SearchPattern rightPattern ) { } private static SearchPattern createPackagePattern ( String patternString , int limitTo , int matchRule ) { } public static SearchPattern createPattern ( String stringPattern , int searchFor , int limitTo , int matchRule ) { } public static SearchPattern createPattern ( IJavaElement element , int limitTo ) { } public static SearchPattern createPattern ( IJavaElement element , int limitTo , int matchRule ) { SearchPattern searchPattern = null ; int lastDot ; boolean ignoreDeclaringType = false ; boolean ignoreReturnType = false ; int maskedLimitTo = limitTo & ( ~ ( ( IJavaSearchConstants . IGNORE_DECLARING_TYPE ) + ( IJavaSearchConstants . IGNORE_RETURN_TYPE ) ) ) ; if ( ( maskedLimitTo == ( IJavaSearchConstants . DECLARATIONS ) ) || ( maskedLimitTo == ( IJavaSearchConstants . ALL_OCCURRENCES ) ) ) { ignoreDeclaringType = ( limitTo & ( IJavaSearchConstants . IGNORE_DECLARING_TYPE ) ) != 0 ; ignoreReturnType = ( limitTo & ( IJavaSearchConstants . IGNORE_RETURN_TYPE ) ) != 0 ; } char [ ] declaringSimpleName = null ; char [ ] declaringQualification = null ; switch ( element . getElementType ( ) ) { case IJavaElement . FIELD : IField field = ( ( IField ) ( element ) ) ; if ( ! ignoreDeclaringType ) { IType declaringClass = field . getDeclaringType ( ) ; declaringSimpleName = declaringClass . getElementName ( ) . toCharArray ( ) ; declaringQualification = declaringClass . getPackageFragment ( ) . getElementName ( ) . toCharArray ( ) ; char [ ] [ ] enclosingNames = SearchPattern . enclosingTypeNames ( declaringClass ) ; if ( ( enclosingNames . length ) > 0 ) { declaringQualification = CharOperation . concat ( declaringQualification , CharOperation . concatWith ( enclosingNames , '.' ) , '.' ) ; } } char [ ] name = field . getElementName ( ) . toCharArray ( ) ; char [ ] typeSimpleName = null ; char [ ] typeQualification = null ; String typeSignature = null ; if ( ! ignoreReturnType ) { try { typeSignature = field . getTypeSignature ( ) ; char [ ] signature = typeSignature . toCharArray ( ) ; char [ ] typeErasure = Signature . toCharArray ( Signature . getTypeErasure ( signature ) ) ; CharOperation . replace ( typeErasure , '$' , '.' ) ; if ( ( lastDot = CharOperation . lastIndexOf ( '.' , typeErasure ) ) == ( - 1 ) ) { typeSimpleName = typeErasure ; } else { typeSimpleName = CharOperation . subarray ( typeErasure , ( lastDot + 1 ) , typeErasure . length ) ; typeQualification = CharOperation . subarray ( typeErasure , 0 , lastDot ) ; if ( ! ( field . isBinary ( ) ) ) { <START_BUG> CharOperation . concat ( IIndexConstants . ONE_STAR , typeQualification ) ; <END_BUG> } } } catch ( JavaModelException e ) { return null ; } } boolean findDeclarations = false ; boolean readAccess = false ; boolean writeAccess = false ; switch ( maskedLimitTo ) { case IJavaSearchConstants . DECLARATIONS : findDeclarations = true ; break ; case IJavaSearchConstants . REFERENCES : readAccess = true ; writeAccess = true ; break ; case IJavaSearchConstants . READ_ACCESSES : readAccess = true ; break ; case IJavaSearchConstants . WRITE_ACCESSES : writeAccess = true ; break ; case IJavaSearchConstants . ALL_OCCURRENCES : findDeclarations = true ; readAccess = true ; writeAccess = true ; break ; } searchPattern = new FieldPattern ( findDeclarations , readAccess , writeAccess , name , declaringQualification , declaringSimpleName , typeQualification , typeSimpleName , typeSignature , matchRule ) ; break ; case IJavaElement . IMPORT_DECLARATION : String elementName = element . getElementName ( ) ; lastDot = elementName . lastIndexOf ( '.' ) ; if ( lastDot == ( - 1 ) ) return null ; IImportDeclaration importDecl = ( ( IImportDeclaration ) ( element ) ) ; if ( importDecl . isOnDemand ( ) ) { searchPattern = SearchPattern . createPackagePattern ( elementName . substring ( 0 , lastDot ) , maskedLimitTo , matchRule ) ; } else { searchPattern = SearchPattern . createTypePattern ( elementName . substring ( ( lastDot + 1 ) ) . toCharArray ( ) , elementName . substring ( 0 , lastDot ) . toCharArray ( ) , null , null , null , maskedLimitTo , matchRule ) ; } break ; case IJavaElement . LOCAL_VARIABLE : LocalVariable localVar = ( ( LocalVariable ) ( element ) ) ; boolean findVarDeclarations = false ; boolean findVarReadAccess = false ; boolean findVarWriteAccess = false ; switch ( maskedLimitTo ) { case IJavaSearchConstants . DECLARATIONS : findVarDeclarations = true ; break ; case IJavaSearchConstants . REFERENCES : findVarReadAccess = true ;

Fix:
typeQualification = CharOperation . concat ( IIndexConstants . ONE_STAR , typeQualification ) ;