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 ) { } private static SearchPattern createTypePattern ( char [ ] simpleName , char [ ] packageName , char [ ] [ ] enclosingTypeNames , String typeSignature , IType type , int limitTo , int matchRule ) { } private static SearchPattern createTypePattern ( String patternString , int limitTo , int matchRule , char indexSuffix ) { } private static char [ ] [ ] enclosingTypeNames ( IType type ) { } public void decodeIndexKey ( char [ ] key ) { } public abstract SearchPattern getBlankPattern ( ) { } public char [ ] getIndexKey ( ) { } public char [ ] [ ] getIndexCategories ( ) { } public final int getMatchRule ( ) { } public boolean matchesDecodedKey ( SearchPattern decodedPattern ) { } public boolean matchesName ( char [ ] pattern , char [ ] name ) { } public static int validateMatchRule ( String stringPattern , int matchRule ) { if ( ( matchRule & ( SearchPattern . R_REGEXP_MATCH ) ) != 0 ) { if ( ( ( ( matchRule & ( SearchPattern . R_PATTERN_MATCH ) ) != 0 ) || ( ( matchRule & ( SearchPattern . R_PREFIX_MATCH ) ) != 0 ) ) || ( ( matchRule & ( SearchPattern . R_CAMELCASE_MATCH ) ) != 0 ) ) { return - 1 ; } } int starIndex = stringPattern . indexOf ( '*' ) ; int questionIndex = stringPattern . indexOf ( '?' ) ; if ( ( starIndex < 0 ) && ( questionIndex < 0 ) ) { matchRule &= ~ ( SearchPattern . R_PATTERN_MATCH ) ; } else { matchRule |= SearchPattern . R_PATTERN_MATCH ; } if ( ( matchRule & ( SearchPattern . R_PATTERN_MATCH ) ) != 0 ) { matchRule &= ~ ( SearchPattern . R_CAMELCASE_MATCH ) ; matchRule &= ~ ( SearchPattern . R_PREFIX_MATCH ) ; } if ( ( matchRule & ( SearchPattern . R_CAMELCASE_MATCH ) ) != 0 ) { int length = stringPattern . length ( ) ; boolean validCamelCase = true ; boolean uppercase = false ; for ( int i = 0 ; ( i < length ) && validCamelCase ; i ++ ) { char ch = stringPattern . charAt ( i ) ; <START_BUG> validCamelCase = ScannerHelper . isJavaIdentifierStart ( ch ) ; <END_BUG> if ( ! uppercase ) uppercase = ScannerHelper . isUpperCase ( ch ) ; } validCamelCase = validCamelCase && uppercase ; if ( validCamelCase ) { if ( ( matchRule & ( SearchPattern . R_PREFIX_MATCH ) ) != 0 ) { if ( ( matchRule & ( SearchPattern . R_CASE_SENSITIVE ) ) != 0 ) { matchRule &= ~ ( SearchPattern . R_PREFIX_MATCH ) ; matchRule &= ~ ( SearchPattern . R_CASE_SENSITIVE ) ; } } } else { matchRule &= ~ ( SearchPattern . R_CAMELCASE_MATCH ) ; if ( ( matchRule & ( SearchPattern . R_PREFIX_MATCH ) ) == 0 ) { matchRule |= SearchPattern . R_PREFIX_MATCH ; matchRule |= SearchPattern . R_CASE_SENSITIVE ; } } } return matchRule ; } public String toString ( ) { } }

Fix:
validCamelCase = ( i == 0 ) ? ScannerHelper . isJavaIdentifierStart ( ch ) : ScannerHelper . isJavaIdentifierPart ( ch ) ;