Buggy code:
public class CompilationUnit extends Openable implements ICompilationUnit , org . eclipse . jdt . internal . compiler . env . ICompilationUnit , SuffixConstants { protected WorkingCopyOwner owner ; protected CompilationUnit ( PackageFragment parent , String name , WorkingCopyOwner owner ) { } public void accept ( IAbstractSyntaxTreeVisitor visitor ) throws JavaModelException { } public void becomeWorkingCopy ( IProblemRequestor problemRequestor , IProgressMonitor monitor ) throws JavaModelException { } protected boolean buildStructure ( OpenableElementInfo info , final IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { if ( ! ( isWorkingCopy ( ) ) ) { if ( ( ( ( ( ( IPackageFragment ) ( getParent ( ) ) ) . getKind ( ) ) == ( IPackageFragmentRoot . K_BINARY ) ) || ( ! ( isValidCompilationUnit ( ) ) ) ) || ( ! ( underlyingResource . isAccessible ( ) ) ) ) { throw newNotPresentException ( ) ; } } <START_BUG> if ( ( ( this . owner ) != ( DefaultWorkingCopyOwner . PRIMARY ) ) && ( ! ( isWorkingCopy ( ) ) ) ) { <END_BUG> throw newNotPresentException ( ) ; } CompilationUnitElementInfo unitInfo = ( ( CompilationUnitElementInfo ) ( info ) ) ; IBuffer buffer = getBufferManager ( ) . getBuffer ( this ) ; if ( buffer == null ) { buffer = openBuffer ( pm , unitInfo ) ; } final char [ ] contents = ( buffer == null ) ? null : buffer . getCharacters ( ) ; CompilationUnitStructureRequestor requestor = new CompilationUnitStructureRequestor ( this , unitInfo , newElements ) ; JavaModelManager . PerWorkingCopyInfo perWorkingCopyInfo = getPerWorkingCopyInfo ( ) ; boolean computeProblems = ( perWorkingCopyInfo != null ) && ( perWorkingCopyInfo . isActive ( ) ) ; IProblemFactory problemFactory = new DefaultProblemFactory ( ) ; SourceElementParser parser = new SourceElementParser ( requestor , problemFactory , new CompilerOptions ( getJavaProject ( ) . getOptions ( true ) ) ) ; requestor . parser = parser ; CompilationUnitDeclaration unit = parser . parseCompilationUnit ( new org . eclipse . jdt . internal . compiler . env . ICompilationUnit ( ) { public char [ ] getContents ( ) { return contents ; } public char [ ] getMainTypeName ( ) { return CompilationUnit . this . getMainTypeName ( ) ; } public char [ ] [ ] getPackageName ( ) { return CompilationUnit . this . getPackageName ( ) ; } public char [ ] getFileName ( ) { return CompilationUnit . this . getFileName ( ) ; } } , false ) ; if ( underlyingResource == null ) { underlyingResource = getResource ( ) ; } unitInfo . fTimestamp = ( ( IFile ) ( underlyingResource ) ) . getModificationStamp ( ) ; if ( computeProblems ) { perWorkingCopyInfo . beginReporting ( ) ; CompilationUnitProblemFinder . process ( unit , this , perWorkingCopyInfo , problemFactory , pm ) ; perWorkingCopyInfo . endReporting ( ) ; } return unitInfo . isStructureKnown ( ) ; } public boolean canBeRemovedFromCache ( ) { } public boolean canBufferBeRemovedFromCache ( IBuffer buffer ) { } public void close ( ) throws JavaModelException { } protected void closing ( Object info ) throws JavaModelException { } public void codeComplete ( int offset , ICompletionRequestor requestor ) throws JavaModelException { } public void codeComplete ( int offset , ICompletionRequestor requestor , WorkingCopyOwner workingCopyOwner ) throws JavaModelException { } public void codeComplete ( int offset , final ICodeCompletionRequestor requestor ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length , WorkingCopyOwner workingCopyOwner ) throws JavaModelException { } public void commit ( boolean force , IProgressMonitor monitor ) throws JavaModelException { } public void commitWorkingCopy ( boolean force , IProgressMonitor monitor ) throws JavaModelException { } public void copy ( IJavaElement container , IJavaElement sibling , String rename , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected Object createElementInfo ( ) { } public IImportDeclaration createImport ( String name , IJavaElement sibling , IProgressMonitor monitor ) throws JavaModelException { } public IPackageDeclaration createPackageDeclaration ( String name , IProgressMonitor monitor ) throws JavaModelException { } public IType createType ( String content , IJavaElement sibling , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public void delete ( boolean force , IProgressMonitor monitor ) throws JavaModelException { } public void destroy ( ) { } public void discardWorkingCopy ( ) throws JavaModelException { } public boolean equals ( Object obj ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public boolean exists ( ) { } public IJavaElement [ ] findElements ( IJavaElement element ) { } public IType findPrimaryType ( ) { } public IJavaElement findSharedWorkingCopy ( IBufferFactory factory ) { } public IType [ ] getAllTypes ( ) throws JavaModelException { } public ICompilationUnit getCompilationUnit ( ) { } public char [ ] getContents ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IJavaElement getElementAt ( int position ) throws JavaModelException { } public int getElementType ( ) { } public char [ ] getFileName ( ) { } protected char getHandleMementoDelimiter ( ) { } public IImportDeclaration getImport ( String name ) { } public IImportContainer getImportContainer ( ) { } public IImportDeclaration [ ] getImports ( ) throws JavaModelException { } public char [ ] getMainTypeName ( ) { } public IJavaElement getOriginal ( IJavaElement workingCopyElement ) { } public IJavaElement getOriginalElement ( ) { } public WorkingCopyOwner getOwner ( ) { } public IPackageDeclaration getPackageDeclaration ( String name ) { } public IPackageDeclaration [ ] getPackageDeclarations ( ) throws JavaModelException { } public char [ ] [ ] getPackageName ( ) { } public IPath getPath ( ) { } public JavaModelManager . PerWorkingCopyInfo getPerWorkingCopyInfo ( ) { } public ICompilationUnit getPrimary ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { }

Fix:
if ( ( ( this . owner ) != ( DefaultWorkingCopyOwner . PRIMARY ) ) && ( ( getPerWorkingCopyInfo ( ) ) == null ) ) {