boolean (@NotNull Document document) { final int count = document.getLineCount(); for (int i = 1; i < count; i += 2) { if (document.getLineStartOffset(i) != document.getLineEndOffset(i)) { return false; } } return true; }