private static Couple<LineRange> extractCommentRange(@NotNull PsiElement member) {
    PsiElement firstChild = member.getFirstChild();
    PsiElement firstCoreChild = firstChild;
    while (firstCoreChild instanceof PsiComment && !(firstCoreChild instanceof PsiDocComment) || firstCoreChild instanceof PsiWhiteSpace) {
      firstCoreChild = firstCoreChild.getNextSibling();
    }
    PsiElement lastAttachedChild = PsiTreeUtil.skipWhitespacesBackward(firstCoreChild);
    if (lastAttachedChild == null) {
      LineRange wholeRange = new LineRange(member);
      return Couple.of(new LineRange(wholeRange.startLine, wholeRange.startLine), wholeRange);
    }
    else {
      return Couple.of(new LineRange(firstChild, lastAttachedChild), new LineRange(firstCoreChild, member));
    }
  }
private static Couple<LineRange> extractCommentRange(@NotNull PsiElement member)