Analyze code statistics
In this section, we will see how to generate the source code statistics and documentation using the Blu Age Analyzer.
- In the Blu Age Analyzer window, select Metrics tab, then click Compute Metrics button.
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.
- Now, double-click the metrics tab to make it bigger.
- 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).
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.
- Restore the Metrics window by clicking on the restore button.
- 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.
- 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.