code: Set<Impact> determineImpact(Set<Impact> changes, IndexDependencyModel dependencyModel) {
      Stopwatch sw = Stopwatch.createStarted();
      Map<Boolean, List<Impact>> split =
          changes.stream().collect(partitioningBy(Impact::isWholeRepository));
      ImmutableSet<String> allEntityTypeIds =
          changes.stream().map(Impact::getEntityTypeId).collect(toImmutableSet());
      Set<String> dependentEntities =
          allEntityTypeIds
              .stream()
              .flatMap(dependencyModel::getEntityTypesDependentOn)
              .collect(toImmutableSet());
      Set<Impact> result = collectResult(split.get(false), split.get(true), dependentEntities);
      if (LOG.isDebugEnabled()) {
        LOG.debug("Determined {} necessary actions in {}", result.size(), sw);
      }
      return result;
    }
docs: Determines which {@link Impact}s follow from a set of changes.
  
  @param changes The {@link Impact}s of which the impact needs to be determined
  @param dependencyModel {@link IndexDependencyModel} to determine which entities depend on which
  entities
  @return Set<Impact> containing the impact of the changes