This page lists the known changes to metrics in Project Analyzer v8.x and v9.x. Other changes can exist, especially under some specific circumstances.
Different versions of Project Analyzer may report different values for the same metric. There can be changes with the definition of a metric. There can also be improvements in the code analysis, which produces more accurate metrics as a by-product.
If you intend to compare projects, or different versions of the same project, you should analyze them with the same version of Project Analyzer. Comparing metrics stored with different Project Analyzer versions can lead to the wrong conclusions about the quality or development done on the code.
We recommend that you do not compare old Project Analyzer v7 metrics to those stored with v8 or v9. We recommend that you re-analyze your old code with v9 to make meaningful comparisons.
This is not to say that the data stored with v7.x is all wrong. The values are just different. Just to name an example, v7 did not record "As New" as a call to the appropriate constructor (Sub New, Class_Initialize). v8 does. This small change can make a big increase in SFIN, SFOUT, RFC, RFC´, MPC, SC, SYSC, RSYSC and DCALLT.
If you wish to measure the amount of change that affects your old metrics data, do a simple test: Analyze the same project with the current Project Analyzer and your previous version. Compare the values you get. The metrics with large changes should not be used for comparison.
| Metric | Vers. | Description | Projects affected | Effect |
|---|---|---|---|---|
| TCC for classes | v9.0 | TCC for a class now counts complexity of Custom Event accessors too. Project Analyzer v8.x did not include them. This only affects classes with Custom Events. The project-level TCC is not affected by the change. | VB.NET 2005 | Increase |
| System complexity SC, SYSC, RSYSC, SFOUT |
v9.0 | Project Analyzer v9.0 improved the analysis of late-bound calls. In projects using late binding, system complexity related metrics may differ significantly from values stored with previous Project Analyzer versions. | All with late binding | None to significant
-21% to +19% |
| Dead code metrics dPROCS, dVARS, dCONSTS, dLINES, DEAD |
v9.0 | Due to more accurate analysis, dead code metrics may have changed. | All | Slight change |
| VARS, VARSloc | v9.0 | Implicit arrays, those declared via ReDim without a preceding Dim, are now included in the variable count metrics. | VB 3.0 - 6.0 | Slight increase |
| Metric | Vers. | Description | Projects affected | Effect |
|---|---|---|---|---|
| DCALLT, maxDCALLT | v8.1 | DCALLT has been fixed for recursive call trees. What is more, it is now being approximated for complex recursive call trees. | All | Increase (fix) Decrease (approximation) |
| AHF, MHF | v8.1 | A bug caused MHF and AHF to be miscalculated by Project Analyzer v8.0. It has been fixed. The bug didn't affect all projects, just some. If MHF or AHF changed a lot, this indicates the fix affected your program. | VB.NET | None to significant |
| Metric | Vers. | Description | Projects affected | Effect |
|---|---|---|---|---|
| VARS => VARSloc | v8.0 | VARSloc (local variables) was previous called VARS. It has been renamed to avoid confusion with other variable counts. | All | |
| CDENS => CALLDENS | v8.0 | CALLDENS (call density) was previously called CDENS. It has been renamed for clarity. | All | |
| CALLS, CALLDENS | v8.0 | Setting the function return value (myfunc = retval) is no longer counted in CALLS or CALLDENS. | All | Significant decrease -15% to -62% |
| LLINES, LLOC, LLOC% | v8.0 | Attribute lines (VB 4.0 - 6.0) are no longer counted into LLOC or LLINES (nor into STMT or STMTd either, for that matter).
They can thus appear to have decreased a little.
For the same reason, LLOC% may also have decreased a little.
Slightly decreased LLOC or LLINES is not deleted code! |
VB 4.0 - 6.0 | Slight decrease 0%..-2% |
| LLOC'%, LLOW%, MCOMM% | v8.0 | If the amount of code decreases as mentioned above (LLOC), the amount of commentation and whitespace increases accordingly. | VB 4.0 - 6.0 | Slight increase |
| Statement counts STMT*, XQT, CTRL |
v8.0 | The statement count metrics may have changed slightly due to subtle changes in the counting routines. | All | Slight changes 0%..-5% |
| dVARS, DEAD | v8.0 | The number of dead variables now always includes variables that are read only or written only. This increases both dVARS and DEAD. | All | Increase |
| LENP | v8.0 | LENP Length of procedure names doesn't count the length of Operator names as Operator names are pre-defined. This is a definition update for VB.NET 2005, not a real change. | VB.NET 2005 | None |
| Object-oriented metric changes | ||||
| MOOD metrics | v8.0 | MOOD metrics take both Property Set and Get accessors into account. In Project Analyzer v7, each VB.NET property was taken only once because Get/Set always have the same scope in VB.NET 2002 and 2003. Now that VB.NET 2005 allows different scopes for Get/Set, we consider each accessor. For the sake of conformance, we do the same for 2002 and as well. The change gives more weight to properties. | VB.NET 2002 and 2003 | Small |
| AIF, MIF | v8.0 | MIF and AIF were reported too high by Project Analyzer v7. Therefore, old MIF and AIF values are no longer displayed. | VB.NET | Breaking change; significant decrease |
| PF | v8.0 | Classes with explicit Protected Overrides Sub Finalize is not counted as it is derived from System.Object, not your own classes. |
VB.NET with Sub Finalize | Decrease if lots of Finalize |
| RFC, RFC', CBO, MPC | v8.0 | Improved analysis can have found new calls (such as calls to constructors), which increases RFC, RFC', CBO and MPC. | Projects with classes | Increase RFC 0%..+3% RFC' 0%..+49% CBO 0%..+26% MPC 0%..+17% |
| LCOM2, LCOM3 | v8.0 | Constructors and destructors are no longer counted as methods for LCOM2 and LCOM3, as they frequently access many or all variables in a class. | Projects with classes | Increase 0%..+13% |
| WMCi, VARSi | v8.0 | Bug fix: WMCi and VARSi were erroneously zero for projects with just 1 class. | Projects with 1 class | Increase |
| Changes with complexity, call tree and fan-in/fan-out metrics | ||||
| Cyclomatic complexity CC, CC2, CC3, TCC |
v8.0 | CC, CC2, CC3, TCC: Each Catch branch counts as one decision (previously none) and Catch..When counts as two (previously none). An unconditional Do..Loop does not add complexity (previously added 1). CC2 now counts Boolean operators in Catch..When (previously not). An additional change affects class-level TCC: A bug caused too low TCC for abstract classes with MustOverride procedures. The magnitude of that bug was equal to the number of MustOverride procedures. |
All More changes with VB.NET |
Slight changes |
| DCOND, DLOOP | v8.0 | Fix: End While now correctly terminates a While loop for DCOND and DLOOP. The bug caused too high values for DCOND and DLOOP. Maximum bug effect: +1 for each End While. |
VB.NET with While..End While | Small decrease |
| System complexity SC, DC, SYSC, RSYSC |
v8.0 | The values of DC, SYSC and RSYSC have changed compared to values reported by earlier versions.
|
All | Noticeable change
SC -3%..22% DC -14%..+19% SYSC -6%..+21% RSYSC -11%..+21% |
| DCALLT, maxDCALLT, LLOCt | v8.0 | The call tree metrics can have increased due to a) improved analysis that finds more calls and b) due to corrections in the way these metrics are calculated. The increases vary from none to relatively high values. Large increases are possible for individual functions. |
All | Large increases possible
maxDCALLT 0..+44% DCALLT 0..+70% LLOCt 0..+34% |
| SFIN, SFOUT for files | v8.0 | Late-bound calls now add to file-level SFIN and SFOUT. In Project Analyzer v7, late-bound calls were not counted. To get back old behavior, disable late-bound analysis in the General options dialog.
Improved analysis can also have found new calls, which further increases SFIN and SFOUT. |
All | Increase 0% to +76% |
| SFIN, SFOUT for procedures | v8.0 | Improved analysis can have found new calls, which increases SFIN and SFOUT, especially for calls to constructors and default members. | All | Increase 0% to +15% |
| Information flow IFIN, IFOUT, IFIO, IC1 |
v8.0 | The information flow metrics now report different values compared to earlier Project Analyzer versions. The changes are due to improvements in determining "in" and "out" parameters for IFIN and IFOUT. | All | Noticeable changes
IFIN -2%..+7% IFOUT 0..+11% IFIO 0..+10% IC1 -2%..+16% |
The change percentages in the above table are estimated based on min..max changes found in analysis of 17 VB6 projects with Project Analyzer v7.1.01 and v8.0.01, and 20 VB6 projects with Project Analyzer v8.0.01 and v9.0.01. The changes are project-level averages (min..max). Changes with individual files, classes, procedures or even projects can be larger.
©Aivosto Oy - Project Analyzer Help Contents