// https://bugs.eclipse.org/bugs/show_bug.cgi?id=335986
// When a package fragment's corresponding resource is removed from the project,
// IJavaProject#computePackageFragmentRoots() doesn't include that entry. Hence
// the cache become necessary in such cases. Add the cache to the accumulatedRoots
// only when it's not already present.
RootInfo rootInfo = (RootInfo) state.oldRoots.get(this.oldResolvedClasspath[i].getPath());
if (rootInfo != null && rootInfo.cache != null) {
IPackageFragmentRoot oldRoot = rootInfo.cache;
boolean found = false;
for (int j = 0; j < accumulatedRoots.size(); j++) {
IPackageFragmentRoot root = (IPackageFragmentRoot) accumulatedRoots.elementAt(j);