Source:
private SynchronizationModel resolveRemoteTraversals(IStorageProviderAccessor storageAccessor, Set<IStorage> leftTraversal, IStorage right, IStorage origin, ThreadSafeProgressMonitor monitor) throws InterruptedException { final Set<IStorage> rightTraversal; if (right != null) { rightTraversal = resolveRemoteTraversal(storageAccessor, right, Iterables.transform( leftTraversal, AS_URI), DiffSide.REMOTE, monitor); } else { rightTraversal = Collections.emptySet(); } final Set<IStorage> differenceRightLeft = difference(rightTraversal, asURISet(leftTraversal)); loadAdditionalRemoteStorages(storageAccessor, leftTraversal, rightTraversal, differenceRightLeft, monitor); final Set<IStorage> originTraversal; if (origin != null) { final Set<URI> unionLeftRight = Sets.newLinkedHashSet(Iterables.transform(Sets.union( leftTraversal, rightTraversal), AS_URI)); originTraversal = resolveRemoteTraversal(storageAccessor, origin, unionLeftRight, DiffSide.ORIGIN, monitor); Set<IStorage> differenceOriginLeft = difference(originTraversal, asURISet(leftTraversal)); Set<IStorage> differenceOriginRight = difference(originTraversal, asURISet(rightTraversal)); Set<IStorage> additional = symmetricDifference(differenceOriginLeft, differenceOriginRight); loadAdditionalRemoteStorages(storageAccessor, leftTraversal, rightTraversal, originTraversal, additional, monitor); } else { originTraversal = Collections.emptySet(); } final SynchronizationModel synchronizationModel = new SynchronizationModel(new StorageTraversal( leftTraversal), new StorageTraversal(rightTraversal), new StorageTraversal(originTraversal), diagnostic); return synchronizationModel; }

Target:
private SynchronizationModel resolveRemoteTraversals(IStorageProviderAccessor storageAccessor, Set<IStorage> leftTraversal, IStorage right, IStorage origin, ThreadSafeProgressMonitor monitor) throws InterruptedException { final Set<IStorage> rightTraversal = resolveRemoteTraversal(storageAccessor, right, Iterables .transform(leftTraversal, AS_URI), DiffSide.REMOTE, monitor); final Set<IStorage> differenceRightLeft = difference(rightTraversal, asURISet(leftTraversal)); loadAdditionalRemoteStorages(storageAccessor, leftTraversal, rightTraversal, differenceRightLeft, monitor); final Set<IStorage> originTraversal; if (origin != null) { final Set<URI> unionLeftRight = Sets.newLinkedHashSet(Iterables.transform(Sets.union( leftTraversal, rightTraversal), AS_URI)); originTraversal = resolveRemoteTraversal(storageAccessor, origin, unionLeftRight, DiffSide.ORIGIN, monitor); Set<IStorage> differenceOriginLeft = difference(originTraversal, asURISet(leftTraversal)); Set<IStorage> differenceOriginRight = difference(originTraversal, asURISet(rightTraversal)); Set<IStorage> additional = symmetricDifference(differenceOriginLeft, differenceOriginRight); loadAdditionalRemoteStorages(storageAccessor, leftTraversal, rightTraversal, originTraversal, additional, monitor); } else { originTraversal = Collections.emptySet(); } final SynchronizationModel synchronizationModel = new SynchronizationModel(new StorageTraversal( leftTraversal), new StorageTraversal(rightTraversal), new StorageTraversal(originTraversal), diagnostic); return synchronizationModel; }