private static @NotNull DiffUserDataKeysEx.DiffComputer getDiffComputer(@NotNull Collection<? extends Range> ranges) {
    return (text1, text2, policy, innerChanges, indicator) -> {
      InnerFragmentsPolicy fragmentsPolicy = innerChanges ? InnerFragmentsPolicy.WORDS : InnerFragmentsPolicy.NONE;
      LineOffsets offsets1 = LineOffsetsUtil.create(text1);
      LineOffsets offsets2 = LineOffsetsUtil.create(text2);

      List<LineFragment> result = new ArrayList<>();
      ComparisonManagerImpl comparisonManager = ComparisonManagerImpl.getInstanceImpl();
      for (Range range : ranges) {
        result.addAll(comparisonManager.compareLinesInner(range, text1, text2, offsets1, offsets2, policy, fragmentsPolicy, indicator));
      }
      return result;
    };
  }
private static @NotNull DiffUserDataKeysEx.DiffComputer getDiffComputer(@NotNull Collection<? extends Range> ranges)