Buggy code:
public class SetClasspathOperation extends JavaModelOperation { IClasspathEntry [ ] oldResolvedPath ; IClasspathEntry [ ] newResolvedPath ; IClasspathEntry [ ] newRawPath ; boolean canChangeResource ; boolean needCycleCheck ; boolean needValidation ; boolean needSave ; IPath newOutputLocation ; public static final IClasspathEntry [ ] ReuseClasspath = new IClasspathEntry [ 0 ] ; public static final IClasspathEntry [ ] UpdateClasspath = new IClasspathEntry [ 0 ] ; public static final IPath ReuseOutputLocation = new Path ( "Reuse<seq2seq4repair_space>Existing<seq2seq4repair_space>Output<seq2seq4repair_space>Location" ) ; public SetClasspathOperation ( IJavaProject project , IClasspathEntry [ ] oldResolvedPath , IClasspathEntry [ ] newRawPath , IPath newOutputLocation , boolean canChangeResource , boolean needValidation , boolean needSave ) { } protected void addClasspathDeltas ( IPackageFragmentRoot [ ] roots , int flag , JavaElementDelta delta ) { } protected int classpathContains ( IClasspathEntry [ ] list , IClasspathEntry entry ) { } protected void collectAllSubfolders ( IFolder folder , ArrayList collection ) throws JavaModelException { } protected ArrayList determineAffectedPackageFragments ( IPath location ) throws JavaModelException { } protected void executeOperation ( ) throws JavaModelException { } protected void generateClasspathChangeDeltas ( IClasspathEntry [ ] oldResolvedPath , IClasspathEntry [ ] newResolvedPath , JavaModelManager manager , final JavaProject project ) { } protected JavaProject getProject ( ) { } private int getSourceAttachmentDeltaFlag ( IPath oldPath , IPath newPath , IPath sourcePath ) { } public boolean isReadOnly ( ) { } protected void saveClasspathIfNecessary ( ) throws JavaModelException { } public String toString ( ) { } private void updateClasspath ( ) throws JavaModelException { } protected void updateAffectedProjects ( IPath prerequisiteProjectPath ) { } protected void updateCycleMarkersIfNecessary ( IClasspathEntry [ ] newResolvedPath ) { } protected void updateOutputLocation ( ) throws JavaModelException { } protected void updateProjectReferencesIfNecessary ( ) throws JavaModelException { if ( ! ( this . canChangeResource ) ) return ; if ( ( ( this . newRawPath ) == ( SetClasspathOperation . ReuseClasspath ) ) || ( ( this . newRawPath ) == ( SetClasspathOperation . UpdateClasspath ) ) ) return ; JavaProject jproject = getProject ( ) ; String [ ] oldRequired = jproject . projectPrerequisites ( this . oldResolvedPath ) ; if ( ( this . newResolvedPath ) == null ) { <START_BUG> this . newResolvedPath = jproject . getResolvedClasspath ( this . newRawPath , true , this . canChangeResource ) ; <END_BUG> } String [ ] newRequired = jproject . projectPrerequisites ( this . newResolvedPath ) ; try { IProject project = jproject . getProject ( ) ; IProjectDescription description = project . getDescription ( ) ; IProject [ ] projectReferences = description . getReferencedProjects ( ) ; HashSet oldReferences = new HashSet ( projectReferences . length ) ; for ( int i = 0 ; i < ( projectReferences . length ) ; i ++ ) { String projectName = projectReferences [ i ] . getName ( ) ; oldReferences . add ( projectName ) ; } HashSet newReferences = ( ( HashSet ) ( oldReferences . clone ( ) ) ) ; for ( int i = 0 ; i < ( oldRequired . length ) ; i ++ ) { String projectName = oldRequired [ i ] ; newReferences . remove ( projectName ) ; } for ( int i = 0 ; i < ( newRequired . length ) ; i ++ ) { String projectName = newRequired [ i ] ; newReferences . add ( projectName ) ; } Iterator iter ; int newSize = newReferences . size ( ) ; checkIdentity : { if ( ( oldReferences . size ( ) ) == newSize ) { iter = newReferences . iterator ( ) ; while ( iter . hasNext ( ) ) { if ( ! ( oldReferences . contains ( iter . next ( ) ) ) ) { break checkIdentity ; } } return ; } } String [ ] requiredProjectNames = new String [ newSize ] ; int index = 0 ; iter = newReferences . iterator ( ) ; while ( iter . hasNext ( ) ) { requiredProjectNames [ ( index ++ ) ] = ( ( String ) ( iter . next ( ) ) ) ; } Util . sort ( requiredProjectNames ) ; IProject [ ] requiredProjectArray = new IProject [ newSize ] ; IWorkspaceRoot wksRoot = project . getWorkspace ( ) . getRoot ( ) ; for ( int i = 0 ; i < newSize ; i ++ ) { requiredProjectArray [ i ] = wksRoot . getProject ( requiredProjectNames [ i ] ) ; } description . setReferencedProjects ( requiredProjectArray ) ; project . setDescription ( description , this . fMonitor ) ; } catch ( CoreException e ) { throw new JavaModelException ( e ) ; } } public IJavaModelStatus verify ( ) { } }

Fix:
this . newResolvedPath = jproject . getResolvedClasspath ( this . newRawPath , true , this . needValidation ) ;