Buggy code:
private void saveContainers ( IJavaProject project , Map containerMap ) throws IOException { } private void saveInt ( int value ) throws IOException { } private boolean saveNewId ( Object key , HashtableOfObjectToInt map ) throws IOException { } private void savePath ( IPath path ) throws IOException { } private void savePaths ( IPath [ ] paths ) throws IOException { } private void saveProjects ( IJavaProject [ ] projects ) throws IOException , JavaModelException { } private void saveString ( String string ) throws IOException { } private void saveVariables ( Map map ) throws IOException { } } private void traceVariableAndContainers ( String action , long start ) { } public void saving ( ISaveContext context ) throws CoreException { } public void secondaryTypeAdding ( String path , char [ ] typeName , char [ ] packageName ) { } public Map secondaryTypes ( IJavaProject project , boolean waitForIndexes , IProgressMonitor monitor ) throws JavaModelException { } private Hashtable secondaryTypesMerging ( Hashtable secondaryTypes ) { } private Map secondaryTypesSearching ( IJavaProject project , boolean waitForIndexes , IProgressMonitor monitor , final JavaModelManager . PerProjectInfo projectInfo ) throws JavaModelException { if ( ( JavaModelManager . VERBOSE ) || ( BasicSearchEngine . VERBOSE ) ) { StringBuffer buffer = new StringBuffer ( "JavaModelManager.secondaryTypesSearch(" ) ; buffer . append ( project . getElementName ( ) ) ; buffer . append ( ',' ) ; buffer . append ( waitForIndexes ) ; buffer . append ( ')' ) ; Util . verbose ( buffer . toString ( ) ) ; } final Hashtable secondaryTypes = new Hashtable ( 3 ) ; IRestrictedAccessTypeRequestor nameRequestor = new IRestrictedAccessTypeRequestor ( ) { public void acceptType ( int modifiers , char [ ] packageName , char [ ] simpleTypeName , char [ ] [ ] enclosingTypeNames , String path , AccessRestriction access ) { String key = ( packageName == null ) ? "" : new String ( packageName ) ; HashMap types = ( ( HashMap ) ( secondaryTypes . get ( key ) ) ) ; if ( types == null ) types = new HashMap ( 3 ) ; types . put ( new String ( simpleTypeName ) , path ) ; secondaryTypes . put ( key , types ) ; } } ; IPackageFragmentRoot [ ] allRoots = project . getAllPackageFragmentRoots ( ) ; int length = allRoots . length ; int size = 0 ; IPackageFragmentRoot [ ] allSourceFolders = new IPackageFragmentRoot [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { if ( ( allRoots [ i ] . getKind ( ) ) == ( IPackageFragmentRoot . K_SOURCE ) ) { allSourceFolders [ ( size ++ ) ] = allRoots [ i ] ; } } if ( size < length ) { System . arraycopy ( allSourceFolders , 0 , ( allSourceFolders = new IPackageFragmentRoot [ size ] ) , 0 , size ) ; } new BasicSearchEngine ( ) . searchAllSecondaryTypeNames ( allSourceFolders , nameRequestor , waitForIndexes , monitor ) ; Iterator packages = secondaryTypes . values ( ) . iterator ( ) ; while ( packages . hasNext ( ) ) { HashMap types = ( ( HashMap ) ( packages . next ( ) ) ) ; Iterator names = types . entrySet ( ) . iterator ( ) ; while ( names . hasNext ( ) ) { Map . Entry entry = ( ( Map . Entry ) ( names . next ( ) ) ) ; String typeName = ( ( String ) ( entry . getKey ( ) ) ) ; String path = ( ( String ) ( entry . getValue ( ) ) ) ; if ( Util . isJavaLikeFileName ( path ) ) { IFile file = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getFile ( new Path ( path ) ) ; ICompilationUnit unit = JavaModelManager . createCompilationUnitFrom ( file , null ) ; IType type = unit . getType ( typeName ) ; types . put ( typeName , type ) ; } else { <START_BUG> types . remove ( typeName ) ; <END_BUG> } } } if ( ( ( projectInfo . secondaryTypes ) == null ) || ( ( projectInfo . secondaryTypes . get ( JavaModelManager . INDEXED_SECONDARY_TYPES ) ) != null ) ) { projectInfo . secondaryTypes = secondaryTypes ; if ( ( JavaModelManager . VERBOSE ) || ( BasicSearchEngine . VERBOSE ) ) { System . out . print ( ( ( Thread . currentThread ( ) ) + "<seq2seq4repair_space>-><seq2seq4repair_space>secondary<seq2seq4repair_space>paths<seq2seq4repair_space>stored<seq2seq4repair_space>in<seq2seq4repair_space>cache:<seq2seq4repair_space>" ) ) ; System . out . println ( ) ; Iterator entries = secondaryTypes . entrySet ( ) . iterator ( ) ; while ( entries . hasNext ( ) ) { Map . Entry entry = ( ( Map . Entry ) ( entries . next ( ) ) ) ; String qualifiedName = ( ( String ) ( entry . getKey ( ) ) ) ; Util . verbose ( ( ( ( "<seq2seq4repair_space>-<seq2seq4repair_space>" + qualifiedName ) + '-' ) + ( entry . getValue ( ) ) ) ) ; } } } return projectInfo . secondaryTypes ; } public void secondaryTypesRemoving ( IFile file , boolean cleanIndexCache ) { } private void secondaryTypesRemoving ( Hashtable secondaryTypesMap , IFile file ) { } protected void setBuildOrder ( String [ ] javaBuildOrder ) throws JavaModelException { } public void setLastBuiltState ( IProject project , Object state ) { } public boolean storePreference ( String optionName , String optionValue , IEclipsePreferences eclipsePreferences ) { } public void setOptions ( Hashtable newOptions ) { } public void startup ( ) throws CoreException { } private void startIndexing ( ) { } public void shutdown ( ) { } public synchronized IPath variableGet ( String variableName ) { } private synchronized IPath variableGetDefaultToPreviousSession ( String variableName ) { } private HashSet variableInitializationInProgress ( ) { }

Fix:
names . remove ( ) ;