void (CharSequence text, TreeElement child) { int length = 0; while (child != null) { length += child.getTextLength(); child = child.getTreeNext(); } if (length != text.length()) { LOG.error("Text mismatch in " + objectInfo(getElementType()), PluginException.createByClass("Text mismatch", null, getElementType().getClass()), new Attachment("code.txt", text.toString())); } }