Buggy code:
public class DeltaProcessor { static final int IGNORE = 0 ; static final int SOURCE = 1 ; static final int BINARY = 2 ; protected JavaElementDelta fCurrentDelta ; protected IndexManager indexManager = new IndexManager ( ) ; Map roots ; Map otherRoots ; Openable currentElement ; int currentEventType ; HashSet projectsToUpdate = new HashSet ( ) ; static final IJavaElementDelta [ ] NO_DELTA = new IJavaElementDelta [ 0 ] ; public static boolean VERBOSE = false ; protected void addToParentInfo ( Openable child ) { } public static void performPreBuildCheck ( IResourceDelta delta , IJavaElement parent ) { IResource resource = delta . getResource ( ) ; IJavaElement element = JavaCore . create ( resource ) ; boolean processChildren = false ; switch ( resource . getType ( ) ) { case IResource . ROOT : processChildren = true ; break ; case IResource . PROJECT : try { if ( ( ( IProject ) ( resource ) ) . hasNature ( JavaCore . NATURE_ID ) ) { JavaProject project = ( ( JavaProject ) ( JavaCore . create ( ( ( IProject ) ( resource ) ) ) ) ) ; if ( ! ( ResourcesPlugin . getWorkspace ( ) . isAutoBuilding ( ) ) ) { project . getResolvedClasspath ( true , true ) ; } processChildren = true ; } } catch ( CoreException e ) { } break ; case IResource . FILE : if ( ( parent . getElementType ( ) ) == ( IJavaElement . JAVA_PROJECT ) ) { IFile file = ( ( IFile ) ( resource ) ) ; JavaProject project = ( ( JavaProject ) ( parent ) ) ; QualifiedName classpathProp ; if ( file . getName ( ) . equals ( project . computeSharedPropertyFileName ( ( classpathProp = project . getClasspathPropertyName ( ) ) ) ) ) { switch ( delta . getKind ( ) ) { case IResourceDelta . REMOVED : try { project . saveClasspath ( false ) ; } catch ( JavaModelException e ) { } break ; case IResourceDelta . CHANGED : if ( ( ( delta . getFlags ( ) ) & ( IResourceDelta . CONTENT ) ) == 0 ) break ; case IResourceDelta . ADDED : try { String fileClasspathString = project . getSharedProperty ( classpathProp ) ; if ( fileClasspathString == null ) break ; IClasspathEntry [ ] fileEntries = project . readPaths ( fileClasspathString ) ; if ( fileEntries == null ) break ; if ( project . isClasspathEqualsTo ( fileEntries ) ) break ; IPath outputLocation = null ; if ( ( fileEntries != null ) && ( ( fileEntries . length ) > 0 ) ) { IClasspathEntry entry = fileEntries [ ( ( fileEntries . length ) - 1 ) ] ; if ( ( entry . getContentKind ( ) ) == ( ClasspathEntry . K_OUTPUT ) ) { outputLocation = entry . getPath ( ) ; IClasspathEntry [ ] copy = new IClasspathEntry [ ( fileEntries . length ) - 1 ] ; System . arraycopy ( fileEntries , 0 , copy , 0 , copy . length ) ; fileEntries = copy ; } } if ( outputLocation == null ) { outputLocation = ReuseOutputLocation ; } try { <START_BUG> project . setRawClasspath ( fileEntries , outputLocation , null , true , false , project . getExpandedClasspath ( true ) , true ) ; <END_BUG> } catch ( JavaModelException e ) { } } catch ( IOException e ) { break ; } catch ( RuntimeException e ) { break ; } catch ( CoreException e ) { break ; } } } } break ; } if ( processChildren ) { IResourceDelta [ ] children = delta . getAffectedChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { DeltaProcessor . performPreBuildCheck ( children [ i ] , element ) ; } } } protected static void close ( Openable element ) { } private void cloneCurrentDelta ( IJavaProject project , IPackageFragmentRoot root ) { } protected void contentChanged ( Openable element , IResourceDelta delta ) { } protected Openable createElement ( IResource resource , int elementType , IJavaProject project ) { } protected void elementAdded ( Openable element , IResourceDelta delta ) { } protected void elementClosed ( Openable element , IResourceDelta delta ) { } protected void elementOpened ( Openable element , IResourceDelta delta ) { } protected void elementRemoved ( Openable element , IResourceDelta delta ) { } protected IJavaElementDelta [ ] filterRealDeltas ( IJavaElementDelta [ ] deltas ) { } protected boolean hasJavaNature ( IResource resource ) { } private JavaModelException newInvalidElementType ( ) { } protected void nonJavaResourcesChanged ( Openable element , IResourceDelta delta ) throws JavaModelException { } private void popUntilPrefixOf ( IPath path ) { } public IJavaElementDelta [ ] processResourceDelta ( IResourceDelta changes , int eventType ) { } private boolean updateCurrentDeltaAndIndex ( IResourceDelta delta , int elementType , IJavaProject project ) throws JavaModelException { } protected void removeFromParentInfo ( Openable child ) { } protected boolean traverseDelta ( IResourceDelta delta , int elementType , IJavaProject currentProject , IPath currentOutput , int outputTraverseMode ) { } private int elementType ( IResource res , int kind , int flags , int parentType , boolean isPkgFragmentRoot ) { } private void initializeRoots ( IJavaModel model ) { } private boolean isOnClasspath ( IPath path ) { } protected void updateIndex ( Openable element , IResourceDelta delta ) { } private void updateRootIndex ( IPackageFragmentRoot root , IPackageFragment pkg , IResourceDelta delta ) { } }

Fix:
project . setRawClasspath ( fileEntries , outputLocation , null , true , false , project . getResolvedClasspath ( true ) , true ) ;