class ComputeASTMetrics {

  ArrayList<ASTMetric> metrics;

  /*
   * New metrics should be added into the metrics linked list
   */
  public ComputeASTMetrics(Node astNode) {
    metrics = new ArrayList<ASTMetric>();
    // add new metrics below this line
    // REMEMBER ALL METRICS NEED TO implement MetricInterface

    // abrupt edges metric calculator
    metrics.add(new AbruptEdgesMetric(astNode));
    metrics.add(new NumLocalsMetric(astNode));
    metrics.add(new ConstructNumbersMetric(astNode));
    metrics.add(new StmtSumWeightedByDepth(astNode));
    metrics.add(new ConditionComplexityMetric(astNode));
    metrics.add(new ExpressionComplexityMetric(astNode));
    metrics.add(new IdentifiersMetric(astNode));
  }

  public void apply() {<FILL_FUNCTION_BODY>}
}

    if (!Options.v().ast_metrics()) {
      return;
    }

    Iterator<ASTMetric> metricIt = metrics.iterator();
    while (metricIt.hasNext()) {
      metricIt.next().execute();
    }

  
<no_super_class>