public LineRange resolveChangeAutomatically(@NotNull TextMergeChange change,
                                              @NotNull ThreeSide side) {
    if (!canResolveChangeAutomatically(change, side)) return null;

    if (change.isConflict()) {
      List<CharSequence> texts =
        ThreeSide.map(it -> DiffUtil.getLinesContent(getEditor(it).getDocument(), change.getStartLine(it), change.getEndLine(it)));

      CharSequence newContent = ComparisonMergeUtil.tryResolveConflict(texts.get(0), texts.get(1), texts.get(2));
      if (newContent == null) {
        LOG.warn(String.format("Can't resolve conflicting change:\n'%s'\n'%s'\n'%s'\n", texts.get(0), texts.get(1), texts.get(2)));
        return null;
      }

      String[] newContentLines = LineTokenizer.tokenize(newContent, false);
      myModel.replaceChange(change.getIndex(), Arrays.asList(newContentLines));
      markChangeResolved(change);
      return new LineRange(myModel.getLineStart(change.getIndex()), myModel.getLineEnd(change.getIndex()));
    }
    else {
      Side masterSide = side.select(Side.LEFT,
                                    change.isChange(Side.LEFT) ? Side.LEFT : Side.RIGHT,
                                    Side.RIGHT);
      return replaceChange(change, masterSide, false);
    }
  }
public LineRange resolveChangeAutomatically(@NotNull TextMergeChange change,
                                              @NotNull ThreeSide side)