Buggy code:
public class JavaModel extends Openable implements IJavaModel { protected IWorkspace workspace = null ; protected JavaModel ( IWorkspace workspace ) throws Error { } private void cleanupCycleMarkers ( ) { } protected void closing ( Object info ) throws JavaModelException { } public String [ ] computeBuildOrder ( boolean generateMarkerOnError ) throws JavaModelException { } protected int computeDepth ( String projectName , StringHashtableOfInt depthTable , String dependentProjectName , boolean generateMarkerOnError ) throws JavaModelException { } public void copy ( IJavaElement [ ] elements , IJavaElement [ ] containers , IJavaElement [ ] siblings , String [ ] renamings , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } public void delete ( IJavaElement [ ] elements , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public boolean equals ( Object o ) { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Hashtable newElements , IResource underlyingResource ) throws JavaModelException { } protected IJavaElement getHandleFromMementoForBinaryMembers ( String memento , IPackageFragmentRoot root , int rootEnd , int end ) throws JavaModelException { } protected IJavaElement getHandleFromMementoForSourceMembers ( String memento , IPackageFragmentRoot root , int rootEnd , int end ) throws JavaModelException { } protected IType getHandleFromMementoForSourceType ( String memento , ICompilationUnit cu , int typeStart , int typeEnd ) throws JavaModelException { } public String getHandleMemento ( ) { } protected char getHandleMementoDelimiter ( ) { } public IJavaModel getJavaModel ( ) { } public IJavaProject getJavaProject ( ) { } public IJavaProject getJavaProject ( String name ) { } public IJavaProject getJavaProject ( IResource resource ) { } public IJavaProject [ ] getJavaProjects ( ) throws JavaModelException { } public IResource getUnderlyingResource ( ) throws JavaModelException { } public IWorkspace getWorkspace ( ) { } public int hashCode ( ) { } public void move ( IJavaElement [ ] elements , IJavaElement [ ] containers , IJavaElement [ ] siblings , String [ ] renamings , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public void rename ( IJavaElement [ ] elements , IJavaElement [ ] destinations , String [ ] renamings , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected void runOperation ( MultiOperation op , IJavaElement [ ] elements , IJavaElement [ ] siblings , String [ ] renamings , IProgressMonitor monitor ) throws JavaModelException { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } public static Object getTarget ( IContainer container , IPath path , boolean checkResourceExistence ) { if ( path == null ) return null ; IResource resource = container . findMember ( path ) ; if ( resource != null ) { if ( ( ! checkResourceExistence ) || ( resource . exists ( ) ) ) return resource ; return null ; } File externalFile = new File ( path . toOSString ( ) ) ; <START_BUG> if ( externalFile . exists ( ) ) <END_BUG> return externalFile ; return null ; } }

Fix:
if ( ( ! checkResourceExistence ) || ( externalFile . exists ( ) ) )