String (@NotNull Document document, @NotNull CodeDocumentationAwareCommenter commenter, @NotNull TextRange commentRange, @NotNull String replacement) { final String prefix = commenter.getDocumentationCommentPrefix(); final String suffix = commenter.getDocumentationCommentSuffix(); final String linePrefix = commenter.getDocumentationCommentLinePrefix(); if (prefix == null || suffix == null || linePrefix == null) return null; final String header = getCommentHeader(document, suffix, prefix, linePrefix, commentRange); final String fullText = getCommentText(document, suffix, prefix, linePrefix, commentRange); if (StringUtil.equalsIgnoreWhitespaces(header, fullText)) replacement = ""; return getCommentPlaceholder(prefix, suffix, header, replacement); }