Analyze code statistics

In this section, we will see how to generate the source code statistics and documentation using the Blu Age Analyzer.

  1. In the Blu Age Analyzer window, select Metrics tab, then click Compute Metrics button.

Compute Metrics

  1. In the ‘Compute Metrics’ procedure selection window, select all the line items and click OK.

    Note: By selecting the main check box (top one), all the rows will be selected automatically.

Select procedures

  1. Now, double-click the metrics tab to make it bigger.

Metrics Option

  1. The Metrics window now shows the latest statistics for the application components. Some of the metrics shown are Lines of Code (Loc), Lines of code with No Comment (Loc NC), Cyclomatic complexity V(g) and Essential complexity eV(g).

Metrics

  • eV(g)/V(g) is the ratio of essential complexity and cyclomatic complexity. The essential complexity is always less than or equal to the cyclomatic complexity. It represents the code which disbranches the normal execution flow (GO TO for example). The closer this number is to 1, the more complex the code is. These metrics can be exported to an Excel spreadsheet (if needed).

  • pV(g) is the Polymorphic complexity.

  1. Restore the Metrics window by clicking on the restore button.

Restore Metrics

  1. Blu Age Analyzer also produces documentation describing the variables characteristics. You can find that under Navigator window, then expand Murach-Reverse, then documentation folder, then double click on index.html file.

Documentation

  1. It also produces the PIM (platform independent model). You can find that under Navigator window, then expand Murach-Reverse, then gapwalk - MurachCode - COBOL folder, then double click on any of the .ds or .stm file.

PIM documentation