Buggy code:
public class BasicSearchEngine { private Parser parser ; private CompilerOptions compilerOptions ; private ICompilationUnit [ ] workingCopies ; private WorkingCopyOwner workingCopyOwner ; public static boolean VERBOSE = false ; public BasicSearchEngine ( ) { } public BasicSearchEngine ( ICompilationUnit [ ] workingCopies ) { } char convertTypeKind ( int typeDeclarationKind ) { } public BasicSearchEngine ( WorkingCopyOwner workingCopyOwner ) { } public static IJavaSearchScope createHierarchyScope ( IType type ) throws JavaModelException { } public static IJavaSearchScope createHierarchyScope ( IType type , WorkingCopyOwner owner ) throws JavaModelException { } public static IJavaSearchScope createJavaSearchScope ( IJavaElement [ ] elements ) { } public static IJavaSearchScope createJavaSearchScope ( IJavaElement [ ] elements , boolean includeReferencedProjects ) { } public static IJavaSearchScope createJavaSearchScope ( IJavaElement [ ] elements , int includeMask ) { } public static IJavaSearchScope createWorkspaceScope ( ) { } public void findMatches ( SearchPattern pattern , SearchParticipant [ ] participants , IJavaSearchScope scope , SearchRequestor requestor , IProgressMonitor monitor ) throws CoreException { } public static SearchParticipant getDefaultSearchParticipant ( ) { } private String getMatchRuleString ( final int matchRule ) { StringBuffer buffer = new StringBuffer ( ) ; for ( int i = 1 ; i <= 8 ; i ++ ) { int bit = matchRule & ( 1 << ( i - 1 ) ) ; <START_BUG> if ( ( buffer . length ( ) ) > 0 ) <END_BUG> buffer . append ( "<seq2seq4repair_space>|<seq2seq4repair_space>" ) ; switch ( bit ) { case SearchPattern . R_PREFIX_MATCH : buffer . append ( "R_PREFIX_MATCH" ) ; break ; case SearchPattern . R_CASE_SENSITIVE : buffer . append ( "R_CASE_SENSITIVE" ) ; break ; case SearchPattern . R_EQUIVALENT_MATCH : buffer . append ( "R_EQUIVALENT_MATCH" ) ; break ; case SearchPattern . R_ERASURE_MATCH : buffer . append ( "R_ERASURE_MATCH" ) ; break ; case SearchPattern . R_FULL_MATCH : buffer . append ( "R_FULL_MATCH" ) ; break ; case SearchPattern . R_PATTERN_MATCH : buffer . append ( "R_PATTERN_MATCH" ) ; break ; case SearchPattern . R_REGEXP_MATCH : buffer . append ( "R_REGEXP_MATCH" ) ; break ; case SearchPattern . R_CAMELCASE_MATCH : buffer . append ( "R_CAMELCASE_MATCH" ) ; break ; } } return buffer . toString ( ) ; } private Parser getParser ( ) { } private IResource getResource ( IJavaElement element ) { } private ICompilationUnit [ ] getWorkingCopies ( ) { } private ICompilationUnit [ ] getWorkingCopies ( IJavaElement element ) { } boolean match ( char patternTypeSuffix , int modifiers ) { } boolean match ( char patternTypeSuffix , char [ ] patternPkg , char [ ] patternTypeName , int matchRule , int typeKind , char [ ] pkg , char [ ] typeName ) { } public void search ( SearchPattern pattern , SearchParticipant [ ] participants , IJavaSearchScope scope , SearchRequestor requestor , IProgressMonitor monitor ) throws CoreException { } public void searchAllTypeNames ( final char [ ] packageName , final char [ ] typeName , final int matchRule , int searchFor , IJavaSearchScope scope , final IRestrictedAccessTypeRequestor nameRequestor , int waitingPolicy , IProgressMonitor progressMonitor ) throws JavaModelException { } public void searchAllTypeNames ( final char [ ] [ ] qualifications , final char [ ] [ ] typeNames , final int matchRule , int searchFor , IJavaSearchScope scope , final IRestrictedAccessTypeRequestor nameRequestor , int waitingPolicy , IProgressMonitor progressMonitor ) throws JavaModelException { } public void searchDeclarations ( IJavaElement enclosingElement , SearchRequestor requestor , SearchPattern pattern , IProgressMonitor monitor ) throws JavaModelException { } public void searchDeclarationsOfAccessedFields ( IJavaElement enclosingElement , SearchRequestor requestor , IProgressMonitor monitor ) throws JavaModelException { } public void searchDeclarationsOfReferencedTypes ( IJavaElement enclosingElement , SearchRequestor requestor , IProgressMonitor monitor ) throws JavaModelException { } public void searchDeclarationsOfSentMessages ( IJavaElement enclosingElement , SearchRequestor requestor , IProgressMonitor monitor ) throws JavaModelException { } }

Fix:
if ( ( bit != 0 ) && ( ( buffer . length ( ) ) > 0 ) )