Page tree
Skip to end of metadata
Go to start of metadata

On this page:

Target audience:

CAST AI Administrator

Summary: this page lists:

  • impacts of changes made to CAST AIP on Quality Model results post upgrade
  • their impacts of changes made in CAST AIP 8.1.0
  • Miscellaneous result changes

Introduction

Each CAST AIP release provides new features which improve the value of the platform and justify an upgrade. However, there are a number of changes or improvements which can impact the measurement results/grades:

  • New or improved Quality Rules to perform deeper analysis
  • Updates to the Assessment Model, e.g. changes to rule weights, severity or thresholds. This can be mitigated by using the "Preserve assessment model" option during the upgrade.
  • Improvements of the language analysis, e.g. more fine-grained detection of objects or links
  • Extended automatic discovery of files included in the analysis
  • Bug fixes to improve the precision of results
  • And, unfortunately, a new release may also introduce new bugs which may impact the results until they are discovered and removed

Below is a list of changes made to the current release of CAST AIP that are known to cause impacts to results. You can also consult Case Study - Measurement changes after upgrade for selected customer applications which provides a more detailed analysis based on a few sample applications.

Analyzing the root causes of impacts to measurement results/grades

The following is a general description of the steps that should be taken in order to compare pre and post upgrade results:

  • Step 1: Take a snapshot (including a source code analysis) with the previous release of CAST AIP before upgrading to the new release of CAST AIP
    • Check the list of applications to be analyzed, the list of files per application and list of SQL objects from the Analysis Service.
  • Step 2: Compare the source code in version 1 (before upgrade) with the source code in the new version 2 (after upgrade)
    • Compare the list of analyzed files, list of files per application and list of SQL objects between the two Analysis Services
  • Step 3: Compare the results of the application analysis and snapshot post upgrade. This can be done by comparing the snapshots available in the Dashboard Service to find the differences in:
    • Quality rules
    • Violations

    • Grades at Business Criteria level

    • Function Points

    • Transactions

    • Lines of code

  • Step 4: Compare the data functions and transactions across the source Analysis Service and the target Analysis Service post upgrade.

Impacts of changes made in CAST AIP 8.1.0 on Quality Model results post upgrade

New "Full Application" consolidation mode in the Assessment Model for snapshot generation in the CAST Management Studio

In CAST AIP 8.1.x, CAST has introduced a new consolidation mode in the CAST Assessment Model for snapshot generation. The new mode is called Full Application (please see Defining consolidation settings for more information) and calculates grades from components of an Application (as is already the case for previous consolidation modes available based on Functional Modules):

By default in CAST AIP 8.1.x, when using the CAST AIP 8.1.x Assessment Model, the new Full Application consolidation mode will always be used unless you manually change it. In the context of an upgrade to CAST AIP 8.1.x, if you choose to Use new Assessment Model from this release of CAST AIP (see Strategy for Assessment Model in Upgrading CAST AIP from 7.3.x or 8.0.x to 8.1.x) then the Full Application consolidation mode will be applied when you generate the snapshot at the end of the upgrade process (and for any subsequent snapshot thereafter).

Note that you can query the DSS_HISTORY table in the CAST Dashboard Service to view the status of each existing snapshot after the upgrade process has been completed by the CAST Update Tool. Messages will be entered into the table as follows for each snapshot that is handled as part of the upgrade:

  • During migration, the CAST AIP version has been updated to <CAST VERSION> for the snapshot <SNAPSHOT_ID>
  • During migration, the consolidation mode has been updated to <CONSOLIDATION_MODE> for the snapshot <SNAPSHOT_ID>

Consider the following:

  • If you have used the default behavior in CAST AIP, which is to automatically create one single Full Content module for each Application, then results WILL NOT change because a Full Content module contains the same components as the entire Application.
  • If your Application is composed of multiple auto-generated Modules (i.e. you have selected the Analysis Unit Content option or you have opted to define your own custom User Defined Modules) then results WILL differ for these modules because the Quality Rule grades will no longer be calculated on the average of all the modules, but on the entire Application instead.

If you need to revert to the grades from the previous release of CAST AIP, then please proceed as follows:

  • First you need to manually change the Consolidation Mode in the CAST Management Studio > Assessment Model editor to one of the other four existing legacy modes to match the mode chosen in the previous release of CAST AIP (remember that this will apply also for all future snapshots):

  • Now move to the Application editor > Execution tab. Select the snapshot generated at the end of the upgrade and click the Consolidate button. Grades will then revert back to their pre-upgrade values (apart from where bug fixes or other feature changes in AIP 8.1.x have an impact):

Calculation of Total and Failed Checks

Whatever Consolidation Mode is used in the Assessment Model in the CAST Management Studio, Total Checks and Failed Checks are now calculated in CAST AIP 8.1.x with components that can be accessed from all Functional Modules. This is also true for Sizing Measures counting critical violations. In the context of an upgrade to CAST AIP 8.1.x, if you choose to Use new Assessment Model from this release of CAST AIP (see Strategy for Assessment Model in Upgrading CAST AIP from 7.3.x or 8.0.x to 8.1.x) then the new calculation mode for Total Checks and Failed Checks will be applied when you generate the snapshot at the end of the upgrade process (and for any subsequent snapshot thereafter). As such, results may differ from previous releases of CAST AIP when there is an overlap between user defined modules (i.e. when a component belongs to two or more User Defined Modules).

ABAP/SAP

Avoid missing WHEN OTHERS in CASE statements - 7518

In previous releases of CAST AIP, this Quality Rule was flagged as "critical". To align the rule with other similar rules in JEE and .NET (C#) which are not flagged as critical, the Avoid missing WHEN OTHERS in CASE statements - 7518 rule has now been modified and is no longer flagged as critical. After an upgrade to CAST AIP 8.1 and the generation of a new snapshot the number of critical violations may change.

C++

Casting from pointer to base class to pointer to derived class should be done through dynamic_cast or static_cast - 8078

The Critical flag has been removed from the above Quality Rule, therefore, after an upgrade to CAST AIP 8.1 and the generation of a new snapshot the number of critical violations may change.

A pointer to a base class shall only be cast to a pointer to a derived class by means of dynamic_cast - 8060

  • The Critical flag has been removed from the above Quality Rule
  • The above Quality Rule has been deactivated by default (but can be reactivated manually if required).

After an upgrade to CAST AIP 8.1 and the generation of a new snapshot results may change.

DB2 UDB

In previous releases of CAST AIP, a bug was causing DB2 UDB source code to be incorrectly classified as both DB2 UDB and DB2 z/OS source code. The effects of this were that certain Quality Rules were detecting a falsely inflated number of violations, and the Number of Code Lines value was showing double the actual number of code lines (the source code was counted twice, once for DB2 UDB and once for DB2 z/OS). This issue has been fixed in CAST AIP 8.1 and therefore, after an upgrade to CAST AIP 8.1 and the generation of a new snapshot results may change as follows:

  • The following Quality Rules will produce more accurate results (a reduction in the number of violations is to be expected):
    • Avoid having multiple Artifacts inserting data on the same SQL Table (7390)

    • Avoid having multiple artifacts deleting data on the same SQL table (7392)
    • Avoid having multiple Artifacts updating data on the same SQL Table (7394)
    • Avoid too many Indexes on one Table (7348)
    • Other Quality Rules may also be impacted.
  • The Number of Code Lines (10151) value will be more accurate (a reduction is to be expected)

JEE

Multiple Quality Rules impacted by a change in the way nested java classes are handled

In previous releases of CAST AIP, the way in which nested java classes were handled with regard to Quality Rules was incorrect. This issue has now been fixed and therefore, after an upgrade to CAST AIP 8.1 and the generation of a new snapshot the number of violations may increase for the following Quality Rules:

  • Avoid using Hashtable (4706)

  • Avoid Packages with High Efferent Coupling (CE) (7246)

  • Close the outermost stream ASAP (8108)

  • Close database resources ASAP (8104)

  • Avoid testing floating point numbers for equality (8096)

  • Blocking synchronous calls should have associated timeouts (8100)

  • Suspicious similar method names or signatures in an inheritance tree (7440)
  •  Avoid improper processing of the execution status of data handling operations (8112)

Track Classes referencing Database objects - 4722 

This Quality Rule has been improved in CAST AIP 8.1 to take into account more dynamic links when checking for links to the database layer. Therefore, after an upgrade to CAST AIP 8.1 and the generation of a new snapshot, results for this Quality Rule may change, for example: there may be an increase in the number of false positives returned by the rule, which can be removed by cleaning up the invalid dynamic links using the Dynamic Link Manager.

Good use of Interfaces with collections as Method return types - 4578

A bug that was introduced in CAST AIP 8.0.1 has been discovered in CAST AIP 8.1. It has unfortunately not been possible to fix this bug in CAST AIP 8.1.x. Therefore after an upgrade to CAST AIP 8.1 (from CAST AIP 8.0.0) and the generation of a new snapshot, results for this Quality Rule may change, for example: there may be a decrease in the number of violations returned by the rule.

The method definition is considered as in violation only if the collection type is the main return type. Methods for which the collection type is used as a parameter of a generic definition are not considered as violations. For example the following code is not considered as violating the rule, when it should since HashMap is derived from the Map interface.

public ArrayList<HashMap<String, String>> getTableRows() {

Number of Code Lines (10151) and JavaScript libraries

In previous releases of CAST AIP, although JavaScript libraries are excluded by default from the scope of an analysis, they were erroneously included in the value for the Number of Code Lines (10151) metric. This bug has now been fixed (JavaScript libraries will no longer contribute to the Number of Code Lines (10151) value), therefore after an upgrade to CAST AIP 8.1 and the generation of a new snapshot, results for this metric may change: there may be a decrease in the number of lines of code if your Application includes JavaScript libraries.

Avoid using Vector - 4704 / Avoid using Hashtable - 4706

These Quality Rules have been improved in CAST AIP 8.1. Therefore, after an upgrade to CAST AIP 8.1 and the generation of a new snapshot, results for these Quality Rule may change: there may be an increase in the number of violations returned.

Track Classes referencing Database objects - 4722

An improvement has been made to CAST AIP to increase accuracy: SQL code embedded in Java interface definitions (in string variables) is now detected for the Track Classes referencing Database objects (4722) Quality Rule. Therefore after an upgrade to CAST AIP 8.1 and the generation of a new snapshot, results for this Quality Rule may change: there may be an increase in violations due to the improved accuracy.

Links missing between field and methods

Due to bug fixing to improve CAST AIP, in some rare circumstances, links between Java Fields and Methods may be missing after an upgrade to CAST AIP 8.1 and the generation of a new snapshot. This can occur when the method call is done in an expression that initializes an array of strings: it is  initialized with a large Unicode string and the syntax used is a large number of concatenation using the "+" character. This kind of expression is handled inside the JEE analyzer via recursion: each "+" creates one additional level in the callstack. In CAST AIP 8.1, a limit has been placed on the depth of this recursion to avoid analysis failures - now set to an upper limit of 500 - and as such, any code that causes the analyzer to produce over 500 recursions is discarded and the link is not saved. The results of any Quality Rule that directly relies on the presence of these links may also be impacted.

Improvements to sizing metrics and duplicated objects

In CAST AIP 8.1.0 the detection of objects duplicated between two JEE analysis contexts has been improved. Therefore you may find that after an upgrade to CAST AIP 8.1.0 and the generation of a new snapshot, any metrics or Quality Rules that are based on object type counting (such as Number of Template Class Instances (19184) or Number of Template Interface Instances (19186)) will produce more accurate results (a reduction in the number of items returned).

Effects of changes made to J2EE Analysis Units and Execution Units in CAST AIP 8.1.x

Due to a change in the way J2EE Analysis Units containing differing analysis configurations are analyzed in CAST AIP 8.1.x - all in one Execution Unit rather than in multiple Execution Units (see Analysis Units and Execution Units below) - you may find that after an upgrade to CAST AIP 8.1.x (from 7.3.x only) a subsequent re-analysis of source code and a snapshot generation, the number of violations for the Quality Rules listed below changes (there may be more or less violations):

  • Avoid using specific logging implementation - 7678
  • Avoid using deprecated objects - 4574
  • Declare as static all Methods not using Instance Fields - 7254
  • Blocking synchronous calls should have associated timeouts - 8100

These removed and added violations are all positive improvements, in other words the list of violations is more accurate than in previous releases of CAST AIP.

PowerBuilder (PB)

A bug has been fixed that was causing the detection of dynamic links between PowerBuilder Events and SQL procedures to be missed during an analysis. For example, links are now correctly detected between the PowerBuilder event and the "getmember" SQL procedure:

declare ma_proc dynamic procedure for sqlsa ;
prepare sqlsa from "library..getmember @member_no = ? ";
execute dynamic ma_proc using :li_memberno ;

As a result of the fix, after an upgrade to CAST AIP 8.1 and the generation of a new snapshot on the same source code, you may find that your results differ as follows:

  • Additional links between objects
  • Changed Quality Rule results due to the additional links
  • Changed Function Point results due to the additional links

Other impacts of changes made in CAST AIP 8.1.0

As in any release, the heuristics implemented to propose dynamic links between entities of an Application have been improved. This can lead to new candidate links being proposed that were not identified in previous releases. These links can initially change the output of an analysis if they are taken into account by a Quality Rule or by a Transaction, but they can be reviewed and confirmed using the Dynamic Link Manager.

JEE analyzer

JAR file precedence

In CAST AIP 8.1.0, the order in which jar files are taken into account for the analysis has been reviewed. Now, libraries found in the classpath configured in the Analysis Units always have precedence over those defined in the Environment Profiles. This can lead to changes in results where duplicate jar files with the same code but with a different version number were included in the source code delivery.

  Analysis Units and Execution Units

In CAST AIP 8.1.x a change has been made to Analysis Unit grouping in Execution Units due to the move to a 64-bit architecture: instead of grouping Analysis Units in Execution Units according to a set of predefined rules, all J2EE Analysis Units in an Application are now grouped in one single Execution Unit. The effect of this change is that when re-analyzing the same source code following an upgrade to CAST AIP 8.1.x (from 7.3.x only), links between objects in different Analysis Units are now more accurately identified provided that Dependencies have been correctly identified by the CAST Delivery Manager Tool (see the dependencies marked as "Discovered" in the Dependencies tab in the CAST Management Studio Application editor), therefore some links that were previously incorrectly identified in earlier versions of CAST AIP may no longer be identified and/or new links that were not previously identified in earlier versions of CAST AIP may now be found. This will have a knock on effect on the number of violations produced by certain Quality Rules - see  Effects of changes made to J2EE Analysis Units and Execution Units in CAST AIP 8.1.x above - some violations that previously existed will be removed, and new ones may be found. These removed and added violations are all positive improvements, in other words the list of violations is more accurate than in previous releases of CAST AIP.

Oracle Forms and Reports analyzer and code and comments checksum values

In CAST AIP 8.1.0 an improvement has been made to the Oracle Forms and Reports analyzer with regard to the way in which code and comments checksum values are generated. This improvement means that any subsequent analysis of the same source code with a future release of CAST AIP will not result in a change in the code and comments checksum value of the objects involved. However, after an upgrade to CAST AIP 8.1.0 and the generation of a new snapshot, you should expect changes in the code and comments checksum values for your Oracle Forms and Reports objects due to the improvement that has been introduced. Code and comments checksum values are mainly used to determine whether an object has changed between successive analyses, therefore you may find that the CAST dashboards are reporting added/modified objects on the same source code.

CAST Transaction Configuration Center

Free Definition sets using the same name

In previous releases of CAST AIP, defining multiple Free Definition sets with the same caused the the object detection to be incorrect, thus causing incorrect results for:

  • number of Data Functions
  • number of Data Functions FP
  • number of Transactional Functions
  • number of Transactional Functions FP

This bug has now been fixed and Free Definition sets that use the same name are correctly interpreted. As such, following an upgrade to CAST AIP 8.1.0 and the computation of new results in the CAST Transaction Configuration Center using your existing Free Definition sets, you may find that the results for the list of items above have changed (i.e. they will now be correct).

Split Data Functions

Issue 1

In previous releases of CAST AIP, when a Data Function that has been automatically merged (by CAST AIP) was manually split into the main and detail objects, the main-detail link between the objects remained. This causes the following erroneous information to be calculated for the main Data Function:

  • Incorrect DET value: because it still includes the Detail element's DET and so may impact the Function Point count
  • Incorrect status: because the objects have been split, the status of the main Data Function should be set to MODIFIED following a new snapshot because Detail elements are removed, however the status remains UNCHANGED

This bug has now been fixed: the manual split (in CAST AIP 8.1.0) of a Data Function that been automatically merged by CAST AIP will now cause (after a new snapshot has been generated in CAST AIP 8.1.0) the correct DET value to be calculated for the main Data Function and for the main-detail link between the two objects to be removed correctly. This may also impact Function Point values.

Issue 2

In previous releases of CAST AIP, when two Data Functions are manually merged, the "main" object will change from EIF to ILF if the "detail" object it is being merged with is already an ILF (the two objects are considered as one and therefore the ILF type will be given to the "main" object as well. If the two objects are then split, the "main" object incorrectly remained an ILF type rather than reverting to its original EIF type.

This bug has now been fixed and after an upgrade and the generation of a snapshot the following direct impacts may be seen:

  • Some Data Functions that were (incorrectly) defined as ILF after a manual split, will become EIF.
  • The above point will have some impact on the number of Function Points.

Data Functions (tables) classed as ignored "lookup tables" created in a Free Definition set

In previous releases of CAST AIP it was possible to create a Free Definition set that included ignored "lookup SQL tables" - i.e. lookup tables that have been ignored by CAST AIP via the default configuration in the Data Entities > Built-in parameters > Names of tables to ignore section. These lookup tables defined in the Free Definition set were then contributing, incorrectly, to the Function Point count.

This bug has now been fixed, and after an upgrade to CAST AIP 8.1 and the generation of a new snapshot, any Free Definition sets defining "lookup tables" will no longer be included in the set. As such, the number of Function Points may differ.

https://confluence.castsoftware.com/display/DOCDRAFT/Upgrading+CAST+AIP+from+7.3.x+or+8.0.x+to+8.1.x#UpgradingCASTAIPfrom7.3.xor8.0.xto8.1.x-QuerytheDSS_HISTORYtabletoviewupgraderesultsonexistingsnapshots