public static PsiElement @NotNull [] getDeeplyFilteredElements(PsiElement @NotNull [] children) {
    ArrayList<PsiElement> array = new ArrayList<>();
    for (PsiElement child : children) {
      if (child instanceof PsiWhiteSpace || child instanceof PsiComment || child instanceof PsiEmptyStatement) {
        continue;
      }
      if (child instanceof PsiBlockStatement) {
        child = ((PsiBlockStatement)child).getCodeBlock();
      }
      if (child instanceof PsiCodeBlock) {
        final PsiStatement[] statements = ((PsiCodeBlock)child).getStatements();
        for (PsiStatement statement : statements) {
          if (statement instanceof PsiBlockStatement) {
            Collections.addAll(array, getFilteredChildren(statement));
          } else if (!(statement instanceof PsiEmptyStatement)) {
            array.add(statement);
          }
        }
        continue;
      } else if (child instanceof PsiParenthesizedExpression) {
        array.add(PsiUtil.skipParenthesizedExprDown((PsiParenthesizedExpression)child));
        continue;
      }
      array.add(child);
    }
    return PsiUtilCore.toPsiElementArray(array);
  }
public static PsiElement @NotNull [] getDeeplyFilteredElements(PsiElement @NotNull [] children)