String (Document doc, int indent, CauseItem parent) { String text = null; if (myTarget != null) { Segment range = myTarget.getRange(); if (range != null) { text = doc.getText(TextRange.create(range)); int lineNumber = doc.getLineNumber(range.getStartOffset()); text += "; line#" + (lineNumber + 1); } } return StringUtil.repeat(" ", indent) + render(doc, parent) + (text == null ? "" : " (" + text + ")") + "\n" + StreamEx.of(myChildren).map(child -> child.dump(doc, indent + 1, this)).joining(); }