void (Document document, PsiElement element) { if (element != null && element.getTextRange().getEndOffset() > document.getTextLength()) { throw new AssertionError(DebugUtil.diagnosePsiDocumentInconsistency(element, document)); } }