Buggy code:
public class PackageFragmentRoot extends Openable implements IPackageFragmentRoot { protected static final char ATTACHMENT_PROPERTY_DELIMITER = '*' ; protected static final String NO_SOURCE_ATTACHMENT = "" ; protected static final SourceMapper NO_SOURCE_MAPPER = new SourceMapper ( ) ; protected Object resource ; protected PackageFragmentRoot ( IResource resource , JavaProject project , String name ) { } public void attachSource ( IPath sourcePath , IPath rootPath , IProgressMonitor monitor ) throws JavaModelException { } protected boolean buildStructure ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { } SourceMapper createSourceMapper ( IPath sourcePath , IPath rootPath ) { } public void delete ( int updateResourceFlags , int updateModelFlags , IProgressMonitor monitor ) throws JavaModelException { } protected boolean computeChildren ( OpenableElementInfo info , Map newElements ) throws JavaModelException { } protected void computeFolderChildren ( IContainer folder , String prefix , ArrayList vChildren , char [ ] [ ] exclusionPatterns ) throws JavaModelException { } public void copy ( IPath destination , int updateResourceFlags , int updateModelFlags , IClasspathEntry sibling , IProgressMonitor monitor ) throws JavaModelException { } protected Object createElementInfo ( ) { } public IPackageFragment createPackageFragment ( String name , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected int determineKind ( IResource underlyingResource ) throws JavaModelException { } public boolean equals ( Object o ) { if ( ( this ) == o ) return true ; if ( ! ( o instanceof PackageFragmentRoot ) ) return false ; PackageFragmentRoot other = ( ( PackageFragmentRoot ) ( o ) ) ; <START_BUG> return ( this . resource . equals ( other . resource ) ) && ( ( fOccurrenceCount ) == ( other . fOccurrenceCount ) ) ; <END_BUG> } public boolean exists ( ) { } public IClasspathEntry findSourceAttachmentRecommendation ( ) { } char [ ] [ ] fullExclusionPatternChars ( ) { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public String getHandleMemento ( ) { } public int getKind ( ) throws JavaModelException { } public Object [ ] getNonJavaResources ( ) throws JavaModelException { } public IPackageFragment getPackageFragment ( String packageName ) { } protected String getPackageName ( IFolder folder ) throws JavaModelException { } public IPath getPath ( ) { } public IClasspathEntry getRawClasspathEntry ( ) throws JavaModelException { } public IResource getResource ( ) { } public IPath getSourceAttachmentPath ( ) throws JavaModelException { } protected String getSourceAttachmentProperty ( ) throws JavaModelException { } protected QualifiedName getSourceAttachmentPropertyName ( ) throws JavaModelException { } public void setSourceAttachmentProperty ( String property ) { } public void setSourceMapper ( SourceMapper mapper ) throws JavaModelException { } public IPath getSourceAttachmentRootPath ( ) throws JavaModelException { } public SourceMapper getSourceMapper ( ) { } public IResource getUnderlyingResource ( ) throws JavaModelException { } public int hashCode ( ) { } public boolean isArchive ( ) { } public boolean isExternal ( ) { } protected boolean isOnClasspath ( ) { } public void move ( IPath destination , int updateResourceFlags , int updateModelFlags , IClasspathEntry sibling , IProgressMonitor monitor ) throws JavaModelException { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } protected void verifyAttachSource ( IPath sourcePath ) throws JavaModelException { } }

Fix:
return ( this . resource . equals ( other . resource ) ) && ( ( this . occurrenceCount ) == ( other . occurrenceCount ) ) ;