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 and with the same settings. Comparing metrics stored with different Project Analyzer versions can lead to the wrong conclusions about the quality or development done on the code.
This page is about changes to metrics: the way they are defined and calculated. This page lists no new metrics, only old ones that were changed.
Tip: 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.
The following is a list of the known changes to metrics in Project Analyzer v8.x and v9.x. Other changes can exist, especially under some specific circumstances.
|VARS, VARSloc||v10.1||Block-level local variables (several local variables with the same name) are now included in the variable count metrics.||VB.NET||Increase|
|CONSTS||v10.1||Block-level local constants (several local constants with the same name) are now counted in CONSTS. Rarely seen in real code.||VB.NET||Slight increase|
|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|
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|
|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)
|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|
|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
|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|
STMT*, XQT, CTRL
|v8.0||The statement count metrics may have changed slightly due to subtle changes in the counting routines.||All||Slight changes
|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|
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
|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|
CC, CC2, CC3, TCC
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.
More changes with VB.NET
||VB.NET with While..End While||Small decrease|
SC, DC, SYSC, RSYSC
The values of DC, SYSC and RSYSC have changed compared to values reported by earlier versions.
|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
|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.
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%
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
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