Buggy code:
public class JavaModel extends Openable implements IJavaModel { public static HashSet existingExternalFiles = new HashSet ( ) ; protected JavaModel ( ) throws Error { } 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 IJavaProject findJavaProject ( IProject project ) { } public static void flushExternalFileCache ( ) { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { <START_BUG> fgJavaModelManager . putInfo ( fgJavaModelManager . getJavaModel ( ) , info ) ; <END_BUG> try { IProject [ ] projects = this . getWorkspace ( ) . getRoot ( ) . getProjects ( ) ; for ( int i = 0 , max = projects . length ; i < max ; i ++ ) { IProject project = projects [ i ] ; if ( ( project . isOpen ( ) ) && ( project . hasNature ( JavaCore . NATURE_ID ) ) ) { info . addChild ( getJavaProject ( project ) ) ; } } } catch ( CoreException e ) { throw new JavaModelException ( e ) ; } return true ; } 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 IJavaProject [ ] getOldJavaProjectsList ( ) throws JavaModelException { } public IPath getPath ( ) { } public IResource getResource ( ) { } public IResource getUnderlyingResource ( ) throws JavaModelException { } public IWorkspace getWorkspace ( ) { } public void move ( IJavaElement [ ] elements , IJavaElement [ ] containers , IJavaElement [ ] siblings , String [ ] renamings , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public void refreshExternalJARs ( IProgressMonitor monitor ) throws JavaModelException { } public void rename ( IJavaElement [ ] elements , IJavaElement [ ] destinations , String [ ] renamings , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public IJavaElement rootedAt ( IJavaProject project ) { } 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 ) { } }

Fix:
JavaModelManager . getJavaModelManager ( ) . putInfo ( this , info ) ;