Buggy code:
public void accept ( IBinaryType binaryType , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } public void accept ( org . eclipse . jdt . internal . compiler . env . ICompilationUnit sourceUnit , AccessRestriction accessRestriction ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } protected Parser basicParser ( ) { } protected void parseAndBuildBindings ( PossibleMatch possibleMatch , boolean mustResolve ) { } protected BinaryTypeBinding cacheBinaryType ( IType type , IBinaryType binaryType ) throws JavaModelException { } protected char [ ] [ ] [ ] computeSuperTypeNames ( IType focusType ) { } protected IJavaElement createHandle ( AbstractMethodDeclaration method , IJavaElement parent ) { } protected IJavaElement createHandle ( FieldDeclaration fieldDeclaration , TypeDeclaration typeDeclaration , IJavaElement parent ) { } protected boolean createHierarchyResolver ( IType focusType , PossibleMatch [ ] possibleMatches ) { } protected IJavaElement createImportHandle ( ImportReference importRef ) { } protected IType createTypeHandle ( String simpleTypeName ) { } protected boolean encloses ( IJavaElement element ) { } protected IBinaryType getBinaryInfo ( ClassFile classFile , IResource resource ) throws CoreException { } protected IType getFocusType ( ) { } protected void getMethodBodies ( CompilationUnitDeclaration unit ) { } protected TypeBinding getType ( Object typeKey , char [ ] typeName ) { } public MethodBinding getMethodBinding ( IMethod method ) { } 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 , int accuracy , int offset , int length ) { } public SearchMatch newDeclarationMatch ( IJavaElement element , int accuracy , int offset , int length , SearchParticipant participant , IResource resource ) { } public SearchMatch newFieldReferenceMatch ( IJavaElement enclosingElement , 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 , 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 newTypeReferenceMatch ( IJavaElement enclosingElement , int accuracy , int offset , int length , ASTNode reference ) { } public SearchMatch newTypeReferenceMatch ( IJavaElement enclosingElement , int accuracy , int offset , int length , int rule , ASTNode reference ) { } 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 { long start = - 1 ; if ( BasicSearchEngine . VERBOSE ) { start = System . currentTimeMillis ( ) ; System . out . println ( "Reporting<seq2seq4repair_space>match" ) ; System . out . println ( ( "\tResource:<seq2seq4repair_space>" + ( match . getResource ( ) ) ) ) ; System . out . println ( ( ( ( ( "\tPositions:<seq2seq4repair_space>[offset=" + ( match . getOffset ( ) ) ) + ",<seq2seq4repair_space>length=" ) + ( match . getLength ( ) ) ) + "]" ) ) ; <START_BUG> if ( ( this . parser ) != null ) { <END_BUG> String selection = new String ( this . parser . scanner . source , match . getOffset ( ) , match . getLength ( ) ) ; System . out . println ( ( ( "\tSelection:<seq2seq4repair_space>-->" + selection ) + "<--" ) ) ; } System . out . println ( ( "\tJava<seq2seq4repair_space>element:<seq2seq4repair_space>" + ( ( ( JavaElement ) ( match . getElement ( ) ) ) . toStringWithAncestors ( ) ) ) ) ; System . out . println ( ( ( match . getAccuracy ( ) ) == ( SearchMatch . A_ACCURATE ) ? "\tAccuracy:<seq2seq4repair_space>EXACT_MATCH" : "\tAccuracy:<seq2seq4repair_space>POTENTIAL_MATCH" ) ) ; System . out . print ( "\tMatch<seq2seq4repair_space>rule:<seq2seq4repair_space>" ) ; if ( ( ( match . getMatchRule ( ) ) & ( SearchPattern . R_EQUIVALENT_MATCH ) ) != 0 ) { if ( ( ( match . getMatchRule ( ) ) & ( SearchPattern . R_ERASURE_MATCH ) ) != 0 ) { System . out . println ( "EQUIVALENT<seq2seq4repair_space>+<seq2seq4repair_space>ERASURE" ) ; } else { System . out . println ( "EQUIVALENT" ) ; } } else if ( ( ( match . getMatchRule ( ) ) & ( SearchPattern . R_ERASURE_MATCH ) ) != 0 ) { System . out . println ( "ERASURE" ) ; } else { System . out . println ( "PERFECT" ) ; } } this . requestor . acceptSearchMatch ( match ) ; if ( BasicSearchEngine . VERBOSE ) this . resultCollectorTime += ( System . currentTimeMillis ( ) ) - start ; } protected void reportAccurateTypeReference ( ASTNode typeRef , char [ ] name , IJavaElement element , int accuracy ) throws CoreException { } protected void reportAccurateTypeReference ( ASTNode typeRef , char [ ] name , IJavaElement element , int accuracy , int rule ) throws CoreException { } protected void reportAccurateParameterizedTypeReference ( TypeReference typeRef , int start , int index , TypeReference [ ] typeArguments , IJavaElement element , int accuracy , int rule ) throws CoreException { }

Fix:
if ( ( ( ( this . parser ) != null ) && ( ( match . getOffset ( ) ) > 0 ) ) && ( ( match . getLength ( ) ) > 0 ) ) {