private static boolean isCodeBlockWithoutStubs(@NotNull ASTNode node) {
    CodeBlockVisitor visitor = new CodeBlockVisitor();
    if (TreeUtil.isCollapsedChameleon(node)) {
      Lexer lexer = JavaParserDefinition.createLexer(PsiUtil.getLanguageLevel(node.getPsi()));
      TokenList tokens = TokenSequence.performLexing(node.getChars(), lexer);
      for (int i = 0; i < tokens.getTokenCount(); i++) {
        visitor.visit(tokens.getTokenType(i));
      }
    } else {
      ((TreeElement)node).acceptTree(visitor);
    }
    return visitor.result;
  }
private static boolean isCodeBlockWithoutStubs(@NotNull ASTNode node)