code: void analyzeIfNeeded(JCTree tree, Env<AttrContext> env) {
          if (!analyzerModes.isEmpty() &&
                  !env.info.isSpeculative &&
                  TreeInfo.isStatement(tree)) {
              JCStatement stmt = (JCStatement)tree;
              analyze(stmt, env);
          }
      }
docs: Analyze an AST node if needed.