Source:
<code>protected Comparison compare(String sourceRev, String targetRev, IFile file) throws Exception { final String fullPath = file.getFullPath().toString(); final Subscriber subscriber = repository.createSubscriberForComparison(sourceRev, targetRev, file); final IStorageProviderAccessor accessor = new SubscriberStorageAccessor(subscriber); final IStorageProvider sourceProvider = accessor.getStorageProvider(file, IStorageProviderAccessor.DiffSide.SOURCE); final IStorageProvider remoteProvider = accessor.getStorageProvider(file, IStorageProviderAccessor.DiffSide.REMOTE); final IStorageProvider ancestorProvider = accessor.getStorageProvider(file, IStorageProviderAccessor.DiffSide.ORIGIN); assertNotNull(sourceProvider); assertNotNull(remoteProvider); assertNotNull(ancestorProvider); final IProgressMonitor monitor = new NullProgressMonitor(); final IStorageProviderAccessor storageAccessor = new SubscriberStorageAccessor(subscriber); final ITypedElement left = new StorageTypedElement(sourceProvider.getStorage(monitor), fullPath); final ITypedElement right = new StorageTypedElement(remoteProvider.getStorage(monitor), fullPath); final ITypedElement origin = new StorageTypedElement(ancestorProvider.getStorage(monitor), fullPath); final ComparisonScopeBuilder scopeBuilder = new ComparisonScopeBuilder(new ThreadedModelResolver(), new IdenticalResourceMinimizer(), storageAccessor); final IComparisonScope scope = scopeBuilder.build(left, right, origin, monitor, Collections <START> .<IResourceSetHook> emptyList()); <END> final ResourceSet leftResourceSet = (ResourceSet)scope.getLeft(); final ResourceSet rightResourceSet = (ResourceSet)scope.getRight(); final ResourceSet originResourceSet = (ResourceSet)scope.getOrigin(); assertFalse(leftResourceSet.getResources().isEmpty()); assertFalse(rightResourceSet.getResources().isEmpty()); assertFalse(originResourceSet.getResources().isEmpty()); return EMFCompare.builder().build().compare(scope, new BasicMonitor()); }</code><technical_language>Do pass list around. NotLoadingResourceSet is class (and class creates resource set need create pass registry on)</technical_language>

Target:
protected Comparison compare(String sourceRev, String targetRev, IFile file) throws Exception { final String fullPath = file.getFullPath().toString(); final Subscriber subscriber = repository.createSubscriberForComparison(sourceRev, targetRev, file); final IStorageProviderAccessor accessor = new SubscriberStorageAccessor(subscriber); final IStorageProvider sourceProvider = accessor.getStorageProvider(file, IStorageProviderAccessor.DiffSide.SOURCE); final IStorageProvider remoteProvider = accessor.getStorageProvider(file, IStorageProviderAccessor.DiffSide.REMOTE); final IStorageProvider ancestorProvider = accessor.getStorageProvider(file, IStorageProviderAccessor.DiffSide.ORIGIN); assertNotNull(sourceProvider); assertNotNull(remoteProvider); assertNotNull(ancestorProvider); final IProgressMonitor monitor = new NullProgressMonitor(); final IStorageProviderAccessor storageAccessor = new SubscriberStorageAccessor(subscriber); final ITypedElement left = new StorageTypedElement(sourceProvider.getStorage(monitor), fullPath); final ITypedElement right = new StorageTypedElement(remoteProvider.getStorage(monitor), fullPath); final ITypedElement origin = new StorageTypedElement(ancestorProvider.getStorage(monitor), fullPath); final ComparisonScopeBuilder scopeBuilder = new ComparisonScopeBuilder(new ThreadedModelResolver(), new IdenticalResourceMinimizer(), storageAccessor); final IComparisonScope scope = scopeBuilder.build(left, right, origin, monitor); final ResourceSet leftResourceSet = (ResourceSet)scope.getLeft(); final ResourceSet rightResourceSet = (ResourceSet)scope.getRight(); final ResourceSet originResourceSet = (ResourceSet)scope.getOrigin(); assertFalse(leftResourceSet.getResources().isEmpty()); assertFalse(rightResourceSet.getResources().isEmpty()); assertFalse(originResourceSet.getResources().isEmpty()); return EMFCompare.builder().build().compare(scope, new BasicMonitor()); }