int (@NotNull Document document, @NotNull CharSequence contentFromVcs) { List<Range> changedRanges = computeRanges(document, contentFromVcs); int linesChanges = 0; for (Range range : changedRanges) { int inserted = range.getLine2() - range.getLine1(); int deleted = range.getVcsLine2() - range.getVcsLine1(); linesChanges += Math.max(inserted, deleted); } return linesChanges; }