Buggy code:
public class MatchLocator implements ITypeRequestor { public static final int MAX_AT_ONCE = 400 ; public SearchPattern pattern ; public PatternLocator patternLocator ; public int matchContainer ; public SearchRequestor requestor ; public IJavaSearchScope scope ; public IProgressMonitor progressMonitor ; public ICompilationUnit [ ] workingCopies ; public HandleFactory handleFactory ; public char [ ] [ ] [ ] allSuperTypeNames ; public MatchLocatorParser parser ; private Parser basicParser ; public INameEnvironment nameEnvironment ; public NameLookup nameLookup ; public LookupEnvironment lookupEnvironment ; public HierarchyResolver hierarchyResolver ; public CompilerOptions options ; public int numberOfMatches ; public PossibleMatch [ ] matchesToProcess ; public PossibleMatch currentPossibleMatch ; public long resultCollectorTime = 0 ; int progressStep ; int progressWorked ; CompilationUnitScope unitScope ; SimpleLookupTable bindings ; public class LocalDeclarationVisitor extends ASTVisitor { IJavaElement enclosingElement ; MatchingNodeSet nodeSet ; HashtableOfIntValues occurrencesCounts = new HashtableOfIntValues ( ) ; public LocalDeclarationVisitor ( IJavaElement enclosingElement , MatchingNodeSet nodeSet ) { } public boolean visit ( TypeDeclaration typeDeclaration , BlockScope unused ) { } } public static class WorkingCopyDocument extends JavaSearchDocument { public ICompilationUnit workingCopy ; WorkingCopyDocument ( ICompilationUnit workingCopy , SearchParticipant participant ) { } public String toString ( ) { } } public class WrappedCoreException extends RuntimeException { private static final long serialVersionUID = 8354329870126121212L ; public CoreException coreException ; public WrappedCoreException ( CoreException coreException ) { } } public static SearchDocument [ ] addWorkingCopies ( InternalSearchPattern pattern , SearchDocument [ ] indexMatches , ICompilationUnit [ ] copies , SearchParticipant participant ) { } public static void setFocus ( InternalSearchPattern pattern , IJavaElement focus ) { } private static HashMap workingCopiesThatCanSeeFocus ( ICompilationUnit [ ] copies , IJavaElement focus , boolean isPolymorphicSearch , SearchParticipant participant ) { } public static ClassFileReader classFileReader ( IType type ) { IClassFile classFile = type . getClassFile ( ) ; JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; if ( classFile . isOpen ( ) ) return ( ( ClassFileReader ) ( manager . getInfo ( type ) ) ) ; PackageFragment pkg = ( ( PackageFragment ) ( type . getPackageFragment ( ) ) ) ; IPackageFragmentRoot root = ( ( IPackageFragmentRoot ) ( pkg . getParent ( ) ) ) ; try { if ( ! ( root . isArchive ( ) ) ) <START_BUG> return ClassFileReader . read ( type . getPath ( ) . toOSString ( ) ) ; <END_BUG> IPath zipPath = ( root . isExternal ( ) ) ? root . getPath ( ) : root . getResource ( ) . getLocation ( ) ; if ( zipPath == null ) return null ; ZipFile zipFile = null ; try { if ( JavaModelManager . ZIP_ACCESS_VERBOSE ) System . out . println ( ( ( ( "(" + ( Thread . currentThread ( ) ) ) + ")<seq2seq4repair_space>[MatchLocator.classFileReader()]<seq2seq4repair_space>Creating<seq2seq4repair_space>ZipFile<seq2seq4repair_space>on<seq2seq4repair_space>" ) + zipPath ) ) ; zipFile = manager . getZipFile ( zipPath ) ; String classFileName = classFile . getElementName ( ) ; String path = Util . concatWith ( pkg . names , classFileName , '//' ) ; return ClassFileReader . read ( zipFile , path ) ; } finally { manager . closeZipFile ( zipFile ) ; } } catch ( ClassFormatException e ) { } catch ( CoreException e ) { } catch ( IOException e ) { } return null ; } public static SearchPattern createAndPattern ( final SearchPattern leftPattern , final SearchPattern rightPattern ) { } public static void findIndexMatches ( InternalSearchPattern pattern , Index index , IndexQueryRequestor requestor , SearchParticipant participant , IJavaSearchScope scope , IProgressMonitor monitor ) throws IOException { } public static IJavaElement getProjectOrJar ( IJavaElement element ) { } public static boolean isPolymorphicSearch ( InternalSearchPattern pattern ) { } public static IJavaElement projectOrJarFocus ( InternalSearchPattern pattern ) { } public MatchLocator ( SearchPattern pattern , SearchRequestor requestor , IJavaSearchScope scope , IProgressMonitor progressMonitor ) { } 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 ) { } private long findLastTypeArgumentInfo ( TypeReference typeRef ) { } 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 ) { }

Fix:
return ClassFileReader . read ( type . getResource ( ) . getLocation ( ) . toOSString ( ) ) ;