Collection<PsiComment> (PsiElement anonymousClass, PsiCodeBlock body) { final Collection<PsiComment> psiComments = ContainerUtil.filter(PsiTreeUtil.findChildrenOfType(anonymousClass, PsiComment.class), comment -> !PsiTreeUtil.isAncestor(body, comment, false)); return ContainerUtil.map(psiComments, (comment) -> (PsiComment)comment.copy()); }