Program: 93591
Project: 93591
Buggy source:
/** 
 * The 'left' model we've been fed is a local file. We'll assume that the whole 'left' side of this comparison is local and resolve everything for that side as we would for local comparisons : update the dependency graph according to our resource listener, lookup for cross-references to/from the left resource according to the   {@link #resolutionScope}... Once we've resolved the local traversal, we'll use that as a base to infer the two remote sides, then "augment" it with the outgoing references of the remote variants of these resources.
 * @param storageAccessor The accessor that can be used to retrieve synchronization information between our resources.
 * @param left File corresponding to the left side of this comparison.
 * @param right "starting point" of the traversal to resolve as the right logical model.
 * @param origin "starting point" of the traversal to resolve as the origin logical model (common ancestor of left and right). Can be <code>null</code>.
 * @param monitor Monitor on which to report progress to the user.
 * @return A traversal corresponding to all resources composing the given file's logical model.
 * @throws InterruptedException Thrown if the resolution is cancelled or interrupted one way or another.
 */
private SynchronizationModel resolveModelsWithLocal(IStorageProviderAccessor storageAccessor,IFile left,IStorage right,IStorage origin,ThreadSafeProgressMonitor monitor) throws InterruptedException {
  if (getResolutionScope() != CrossReferenceResolutionScope.SELF) {
    final SynchronizedResourceSet resourceSet=new SynchronizedResourceSet();
    updateDependencies(resourceSet,left,monitor);
    updateChangedResources(resourceSet,monitor);
  }
  final Set<IStorage> leftTraversal=resolveTraversal(left,Collections.<URI>emptySet(),storageAccessor);
  while (!currentlyResolving.isEmpty()) {
    resolutionEnd.await();
  }
  final Set<IStorage> rightTraversal=resolveRemoteTraversal(storageAccessor,right,leftTraversal,DiffSide.REMOTE,monitor);
  final Set<IStorage> originTraversal;
  if (origin != null) {
    originTraversal=resolveRemoteTraversal(storageAccessor,origin,leftTraversal,DiffSide.ORIGIN,monitor);
  }
 else {
    originTraversal=Collections.emptySet();
  }
  final SynchronizationModel synchronizationModel=new SynchronizationModel(new StorageTraversal(leftTraversal),new StorageTraversal(rightTraversal),new StorageTraversal(originTraversal),diagnostic);
  return synchronizationModel;
}

Fixed version (ground truth):
/** 
 * The 'left' model we've been fed is a local file. We'll assume that the whole 'left' side of this comparison is local and resolve everything for that side as we would for local comparisons : update the dependency graph according to our resource listener, lookup for cross-references to/from the left resource according to the   {@link #resolutionScope}... Once we've resolved the local traversal, we'll use that as a base to infer the two remote sides, then "augment" it with the outgoing references of the remote variants of these resources.
 * @param storageAccessor The accessor that can be used to retrieve synchronization information between our resources.
 * @param left File corresponding to the left side of this comparison.
 * @param right "starting point" of the traversal to resolve as the right logical model.
 * @param origin "starting point" of the traversal to resolve as the origin logical model (common ancestor of left and right). Can be <code>null</code>.
 * @param monitor Monitor on which to report progress to the user.
 * @return A traversal corresponding to all resources composing the given file's logical model.
 * @throws InterruptedException Thrown if the resolution is cancelled or interrupted one way or another.
 */
private SynchronizationModel resolveModelsWithLocal(IStorageProviderAccessor storageAccessor,IFile left,IStorage right,IStorage origin,ThreadSafeProgressMonitor monitor) throws InterruptedException {
  if (getResolutionScope() != CrossReferenceResolutionScope.SELF) {
    final SynchronizedResourceSet resourceSet=new SynchronizedResourceSet();
    updateDependencies(resourceSet,left,monitor);
    updateChangedResources(resourceSet,monitor);
  }
  while (!currentlyResolving.isEmpty()) {
    resolutionEnd.await();
  }
  final Set<IStorage> leftTraversal=resolveTraversal(left,Collections.<URI>emptySet());
  final Set<IStorage> rightTraversal=resolveRemoteTraversal(storageAccessor,right,leftTraversal,DiffSide.REMOTE,monitor);
  final Set<IStorage> originTraversal;
  if (origin != null) {
    originTraversal=resolveRemoteTraversal(storageAccessor,origin,leftTraversal,DiffSide.ORIGIN,monitor);
  }
 else {
    originTraversal=Collections.emptySet();
  }
  final SynchronizationModel synchronizationModel=new SynchronizationModel(new StorageTraversal(leftTraversal),new StorageTraversal(rightTraversal),new StorageTraversal(originTraversal),diagnostic);
  return synchronizationModel;
}