void (@NotNull Document document1, int line1, int line2, @NotNull Document document2, int oLine1, int oLine2) { if (line1 == line2 && oLine1 == oLine2) return; if (line1 == line2) { insertLines(document1, line1, getLinesContent(document2, oLine1, oLine2)); } else if (oLine1 == oLine2) { deleteLines(document1, line1, line2); } else { replaceLines(document1, line1, line2, getLinesContent(document2, oLine1, oLine2)); } }