Buggy code:
public class IndexManager extends JobManager implements IIndexConstants { public SimpleLookupTable indexLocations = new SimpleLookupTable ( ) ; private Map indexes = new HashMap ( 5 ) ; private boolean needToSave = false ; private static final CRC32 checksumCalculator = new CRC32 ( ) ; private IPath javaPluginLocation = null ; private SimpleLookupTable indexStates = null ; private File savedIndexNamesFile = new File ( getJavaPluginWorkingLocation ( ) . append ( "savedIndexNames.txt" ) . toOSString ( ) ) ; public static Integer SAVED_STATE = new Integer ( 0 ) ; public static Integer UPDATING_STATE = new Integer ( 1 ) ; public static Integer UNKNOWN_STATE = new Integer ( 2 ) ; public static Integer REBUILDING_STATE = new Integer ( 3 ) ; public synchronized void aboutToUpdateIndex ( IPath containerPath , Integer newIndexState ) { } public void addBinary ( IFile resource , IPath containerPath ) { } public void addSource ( IFile resource , IPath containerPath , SourceElementParser parser ) { } public void cleanUpIndexes ( ) { } public String computeIndexLocation ( IPath containerPath ) { } public void ensureIndexExists ( String indexLocation , IPath containerPath ) { } public SourceElementParser getSourceElementParser ( IJavaProject project , ISourceElementRequestor requestor ) { } public synchronized Index getIndex ( IPath containerPath , boolean reuseExistingFile , boolean createIfMissing ) { } public synchronized Index getIndex ( IPath containerPath , String indexLocation , boolean reuseExistingFile , boolean createIfMissing ) { } public synchronized Index getIndex ( String indexLocation ) { } public synchronized Index getIndexForUpdate ( IPath containerPath , boolean reuseExistingFile , boolean createIfMissing ) { } private SimpleLookupTable getIndexStates ( ) { } private IPath getJavaPluginWorkingLocation ( ) { } public void indexDocument ( SearchDocument searchDocument , SearchParticipant searchParticipant , Index index , IPath indexLocation ) { } public void indexAll ( IProject project ) { if ( ( JavaCore . getPlugin ( ) ) == null ) return ; try { JavaModel model = JavaModelManager . getJavaModelManager ( ) . getJavaModel ( ) ; JavaProject javaProject = ( ( JavaProject ) ( model . getJavaProject ( project ) ) ) ; <START_BUG> IClasspathEntry [ ] entries = javaProject . getResolvedClasspath ( true , false , false ) ; <END_BUG> for ( int i = 0 ; i < ( entries . length ) ; i ++ ) { IClasspathEntry entry = entries [ i ] ; if ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_LIBRARY ) ) this . indexLibrary ( entry . getPath ( ) , project ) ; } } catch ( JavaModelException e ) { } IndexRequest request = new IndexAllProject ( project , this ) ; if ( ! ( isJobWaiting ( request ) ) ) this . request ( request ) ; } public void indexLibrary ( IPath path , IProject requestingProject ) { } public void indexSourceFolder ( JavaProject javaProject , IPath sourceFolder , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) { } public void jobWasCancelled ( IPath containerPath ) { } protected synchronized void moveToNextJob ( ) { } protected void notifyIdle ( long idlingTime ) { } public String processName ( ) { } private void rebuildIndex ( String indexLocation , IPath containerPath ) { } public synchronized Index recreateIndex ( IPath containerPath ) { } public void remove ( String containerRelativePath , IPath indexedContainer ) { } public synchronized void removeIndex ( IPath containerPath ) { } public synchronized void removeIndexPath ( IPath path ) { } public synchronized void removeIndexFamily ( IPath path ) { } public void removeSourceFolderFromIndex ( JavaProject javaProject , IPath sourceFolder , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) { } public synchronized void reset ( ) { } public void saveIndex ( Index index ) throws IOException { } public void saveIndexes ( ) { } public void scheduleDocumentIndexing ( final SearchDocument searchDocument , IPath container , final String indexLocation , final SearchParticipant searchParticipant ) { } public String toString ( ) { } private char [ ] readIndexState ( ) { } private synchronized void removeIndexesState ( String [ ] locations ) { } private synchronized void updateIndexState ( String indexLocation , Integer indexState ) { } private void writeSavedIndexNamesFile ( ) { } }

Fix:
IClasspathEntry [ ] entries = javaProject . getResolvedClasspath ( ) ;