Extension ID
com.castsoftware.omg-atdm
What's new?
Please see OMG-CTDM - 2.0 - Release Notes for more information.
Description
Release ≥ 2.x of this extension uses CTDM (Contextual Technical Debt Measure) to calculate Technical Debt values. CTDM is a recognized nomenclature for a customized ATDM (Automated Technical Debt Measure) as described in chapter 6.3 of the OMG ATDM specification 1.0, see: https://www.omg.org/spec/ATDM/1.0/PDF. For this extension, CTDM uses a combination of remediation effort produced by the ISO-5055 measure and remediation effort produced by AIP Core. This means that the number of rules taken in to account by this release of the extension is higher than in release 1.x of the extension (ATDM), which only considered "CISQ" Business Criteria. As a direct result, Technical Debt values will be higher for release ≥ 2.x of the extension and are therefore not comparable with release 1.x. You can see a list of Technical Criteria used by the extension in Scope below.
The technical debt values are computed for all violations which have an entry with a remediation effort at Business Criteria or Rule level. Effort is taken in to account in the following order:
- Rule
- CISQ index (if the CISQ Index extension is installed)
- ISO-5055 index
- AIP Core (TQI)
Therefore:
- If an effort exists at rule level, then this effort is applied for the rule
- If an effort exists at CISQ level then this effort is applied
- if an effort exists for the rule at ISO-5055 level then this effort is applied
- otherwise effort from AIP Core is applied.
Technical Debt is calculated the same way as for v 1.x (ATDM), i.e. at the object/rule level and then aggregated at Rule, Technical Criterion, Business Criterion, Module and Application level. The details at rule level are computed on demand by default, this means the results are not stored at the object and rule level - this is to reduce the volume of generated data and to improve performance.
Compatibility and requirements
Product | Release | Required | Notes |
---|---|---|---|
AIP Core | ≥ 8.3.34 | For AIP Core 8.3.34 - 8.3.36, ISO remediation efforts are not available, however, default ISO remediation efforts (as provided in AIP Core 8.3.37) will be used instead. | |
Dashboard/RestAPI | ≥ 2.3.1 | - | |
ISO-5055 Index extension | Any | Recommended | If the ISO-5055 extension is not installed, only the Technical Criteria from AIP Core will be used to generate the Technical Debt values. |
Any | Optional | Only required if you want to ALSO view ATDM values (which are based on CISQ Index) as in version 1.x. |
OMG-ATDM version
2.0 (October 2021) |
Dependencies with other extensions
None.
Download and installation instructions
Assessment Model
The extension calculates the following metrics as Sizing Measures:
Metric ID | Name | Description |
---|---|---|
1062010 | OMG-ATDM: Number of occurrences | An occurrence (or Pattern Occurrence) designates a single instance of a Source Code Pattern (or Pattern) representing a weakness that has been implemented in the measured software. This sizing measure keeps, per snapshot, the number of occurrences per object, rule, Technical Criterion and Business Criterion.
|
1062011 | OMG-ATDM: Complexity | The Complexity - or Effort Complexity - of the code elements implementing an Occurrence is qualification information that is measured according to the Effort Complexity definition from the Automated Enhancement Points (AEP) specification. (AEP). |
1062012 | OMG-ATDM: Exposure | The Exposure of an Occurrence is qualification information that measures the level of connectedness of the Occurrence with the rest of the software, both directly and indirectly through call paths. |
1062013 | OMG-ATDM: Concentration | Concentration is qualification information that measures the number of Occurrences within any Code Element in the software. |
1062014 | OMG-ATDM: Technological Diversity | The Technological Diversity of an Occurrence is qualification information that measures the number of distinct programming languages in which the code elements included in a single occurrence of a source code pattern are written. |
1062015 | OMG-ATDM: Gap Size | In the context of patterns which rely on roles that model values and threshold values that are not to be exceeded, the gap between these values must be closed to remediate this weakness; the Occurrence Gap Size is the extent of the gap, measured as the difference between the values and the thresholds. |
1062016 | OMG-ATDM: Adjustment Factor | Adjustment Factor is computed based on qualification measures. |
1062020 | OMG-ATDM: Adjusted Remediation Effort | Remediation Effort designates the time required to remove an occurrence – or a set of occurrences – of a Technical Debt Item from the software. It covers the coding activity as well as unit/non-regression testing activities. |
1062030 | OMG-ATDM: Remediation Effort ADDED | - |
1062032 | OMG-ATDM: Remediation Effort DELETED | - |
How are results calculated?
Predefined Un-Adjusted Remediation Effort
Configuration data is loaded to have the remediation effort for each pattern ( CISQ, ISO-5055, CAST TQI ) . This is called Un-Adjusted Remediation Effort. The unit of effort is minute. The effort taken in to account by CTDM for each pattern is EFFORT_DEFAULT.
E.g.:
Un-Adjusted Remediation Effort STANDARD : CISQ PATTERN : ASCPEM-PRF-15 EFFORT_DEFAULT: 90 EFFORT_MIN: 30 EFFORT_MAX: 210 EFFORT_UNIT: MIN Un-Adjusted Remediation Effort STANDARD : ISO-5055 PATTERN : CWE-125 EFFORT : 30
For all violations of pattern ASCPEM-PRF-15, the Un-Adjusted Remediation Effort is equal to 90 minutes.
for all violations of pattern CWE-125 , the Un-Adjusted Remediation Effort is equal to 30 minutes.
Scope
- For each of the violations, the number of occurrences and related objects are collected, with related technologies.
- For a violation of type Bookmark, the number of occurrences corresponds to the number of bookmarks and the related object is the main object of the violation.
- For a violation of type Path, the number of occurrences corresponds to the number of paths, and the related objects are the main object of the violation, plus all related objects in the path(s)
The table in the expandable section below lists the Technical Criteria used by this extension:
Qualification information
Complexity
The Complexity - or Effort Complexity - of the code elements implementing an Occurrence is qualification information that is measured according to the Effort Complexity definition from Automated Enhancement Points:
EC/LowEffortComplexity
EC is computed by the following metrics:
- 10351: EC ADDED
- 10353: EC UPDATED
- 10354: EC UNCHANGED
LowEffortComplexity
The technology related Low Complexity column for ADDED artifacts ( from COST_CONFIG ). When the violation has related objects, then the average EC of all objects is taken in to account. The complexity is computed for the main object violating a rule:
Complexity = AVG ( Effort Complexity all objects of the violation )/ Low Complexity for the related technology
Concentration
Concentration is qualification information that measures the number of Occurrences within any Code Element in the software:
1/nb of time the object violates any rule
Exposure
The Exposure of an Occurrence is qualification information that measures the level of contentedness of the Occurrence with the rest of the software, both directly and indirectly through call paths:
1+log(nb paths)
Technical diversity
The Technological Diversity of an Occurrence measures the number of distinct technologies in which the code elements included in a single occurrence of a source code pattern are written. This is set to 1.
Gap size
In the context of patterns which rely on roles that model values and threshold values that are not to be exceeded, the gap between these values must be closed to re-mediate this weakness. This is set to 1.
Adjustment Factor
The adjustment factor is computed based on qualification information, as follows:
AVG(Complexity) X AVG(Exposure) X Count(Technological diversity) X AVG(Concentration) X Sum(Gap size)
Technical debt
Finally the technical debt is computed by:
Nb Of Occurrences X Adjustment Factor X Un-adjusted Remediation Effort
Result storage
Default result storage method - high level data only
By default only data aggregated at the following level is available and is stored in the Dashboard schema table DSS_METRIC_RESULTS:
- Application
- Module
- Technical Criteria
- Business Criteria
Detailed information at Object and Rule level can be generated and made available to the dashboard on demand by executing the following query against the Dashboard schema:
select OMG_ATDM_COMPUTE_DETAILS (SNAPSHOT_ID, OBJECT_ID, RULE_ID)
Where:
SNAPSHOT_ID | Is the ID of the snapshot you want to generate detailed object and rule level information for. |
---|---|
RULE_ID | The ID of the rule you want to generate detailed information for. Note that if RULE_ID = -1, detailed information will be generated for all rules. |
OBJECT_ID | The ID of the object you want to generate detailed information for. Note that if OBJECT_ID = -1, detailed information will be generated for all objects. |
When the next snapshot is generated, detailed object/rule level information will be saved in the table OMGTD_RESULTS.
Alternative result storage method - all data
This method is not recommended for very large Applications, since the impact on performance of generating all data for every snapshot will be significant.
It is possible to change the behaviour and choose to always save all results (including Object and Rule level information) for every snapshot that is generated. To do so, execute the following query against the Dashboard schema:
select OMG_ATDM_DETAILSALL();
This option will be taken in account when a new snapshot is generated and as a result all information is saved as follows:
- Application, Module, Technical Criteria, Business Criteria - aggregated in the table DSS_METRIC_RESULTS
- Details for Object and Rule levels stored in the table OMGTD_RESULTS
To disable the storage of all details, execute the following query against the Dashboard schema:
select OMG_ATDM_DETAILSONDEMAND();
What results can you expect?
Health Dashboard
When the ISO-5055 view is selected, two tiles are available out of the box in the Overview and Trends sections respectively, at Multi-Application level (the tiles will display no value if the OMG Technical Debt extension is not installed and no snapshot has been generated):
At single Application level, one tile is available out of the box in the Overview section when the ISO-5055 view is selected:
Switch between the AIP and ISO-5055 views using the drop down in the home page:
Clicking the tiles will provide more detailed information:
Click to enlarge - multi Application level
Click to enlarge - single Application level
In addition, at single Application level drill down, for each of the Source Code Pattern Names, it is possible to navigate to the details of the violations in the Engineering Dashboard (where this has been setup):
By default, these tiles are configured to display ISO-5055 index data (using the OMG_TECHNICAL_DEBT_ISO ID). If you want to display either TQI (AIP Core) or CISQ Index values (if the extension is installed), you will need to manually edit the configuration in the cmp-ISO.json or app-ISO.json file and change the ID used in the tile (i.e. for SizingMeasureEvolution and/or SizingMeasureResult / SizingMeasureResults) - see Health Dashboard tile management for more information:
- OMG_TECHNICAL_DEBT_ISO - based on ISO-5055 index data, installed by default in AIP Console
- OMG_TECHNICAL_DEBT_CISQ - based on CISQ Index data, requires that the CISQ Index is installed
- OMG_TECHNICAL_DEBT - based on TQI from AIP Core.
For example:
Tile drill down is tailored to the data chosen in the tile, for example:
Tile configuration examples:
SizingMeasureResult (app-ISO.json) / SizingMeasureResults (cmp-ISO.json): { "id": 208, "plugin": "SizingMeasureResult", "color": "yellow", "parameters": { "title": "Technical Debt (OMG) by ISO-5055", "sizingMeasure": {"id": "OMG_TECHNICAL_DEBT_ISO", "format": "0,0", "description": "Days"} } }, { "id": 998, "plugin": "SizingMeasureResult", "color": "yellow", "parameters": { "title": "Technical Debt (OMG) by CISQ", "sizingMeasure": {"id": "OMG_TECHNICAL_DEBT_CISQ", "format": "0,0", "description": "Days"} } }, { "id": 999, "plugin": "SizingMeasureResult", "color": "yellow", "parameters": { "title": "Technical Debt (OMG) by TQI", "sizingMeasure": {"id": "OMG_TECHNICAL_DEBT", "format": "0,0", "description": "Days"} } }, SizingMeasureEvolution (app-ISO.json and cmp-ISO.json): { "id": 2103, "plugin": "SizingMeasureEvolution", "color": "yellow", "parameters": { "widget":"line", "title": "Technical Debt (OMG) by ISO-5055", "sizingMeasure": {"id": "OMG_TECHNICAL_DEBT_ISO", "format": "0,0"} } }, { "id": 9998, "plugin": "SizingMeasureEvolution", "color": "yellow", "parameters": { "widget":"line", "title": "Technical Debt (OMG) by CISQ", "sizingMeasure": {"id": "OMG_TECHNICAL_DEBT_CISQ", "format": "0,0"} } }, { "id": 9999, "plugin": "SizingMeasureEvolution", "color": "yellow", "parameters": { "widget":"line", "title": "Technical Debt (OMG) by TQI", "sizingMeasure": {"id": "OMG_TECHNICAL_DEBT", "format": "0,0"} } },
Engineering Dashboard
A tile is available out of the box displaying the Total Technical Debt (OMG) in days for the current Application, as well as Added and Removed OMG Technical Debt in days for the current snapshot:
You can change the specific Technical Criteria used to display the values in the tile, using the drop down option:
By default, this tile is configured to display ISO-5055 index data (using the 1061000 metric ID). If you want to display either TQI (AIP Core) or CISQ Index values (if the extension is installed), you will need to manually edit the configuration in the ed.json file and change the ID used - see Engineering Dashboard tile management for more information:
- 1061000 - based on ISO-5055 index data, installed by default in AIP Console
- 1062100 - based on CISQ Index data, requires that the CISQ Index is installed
- 60017 (based on TQI from AIP Core)
Clicking this tile will drill down to the Risk investigation view with Technical Debt (OMG) with the ISO-5055 Assessment Model selected. If the tile has been manually edited and re-configured to show either TQI (AIP Core) or CISQ Index data, the drill down will also change as shown below:
Click to enlarge
ISO-5055 data (default) | |
---|---|
TQI data (AIP Core) | |
CISQ Index data |
You can also switch to showing Violations instead of Technical Debt (OMG) values from the drop-down list:
In the rule details section, there is a dedicated section called "Technical Debt (OMG)", which will show the details (Total, Added, Removed, and No. of occurrences):
Click to enlarge
In the source code view, a Technical Debt (OMG) section is displayed, showing object level details on the Adjustment Factor, Unadjusted Effort (in mins) and Adjusted Efforts (in mins):
Click to enlarge
Using the RestAPI to obtain results
Total Technical Debt by Application, Module
Results can be obtained using a RestAPI query. For example, to obtain technical debt as a remediation effort use the metric #1062020 (you can replace this ID with other supported Sizing Measure IDs):
AAD/results?metrics=1062020&modules=$all&technologies=$all
Example showing the technical debt for all applications, with a breakdown by technology and by module for an example Application called "shopizer8321":
C:>curl -H "Accept: text/csv" -u admin:cast "http://localhost:9190/CAST-RESTAPI/rest/AAD/results?metrics=1062020&modules=$all&technologies=$all"
Results:
Application Name;Module Name;Technology;Metric Name;Metric Id;Metric Type;Critical;Snapshot Date #1;Result #1 shopizer8321;null;null;OMG-ATDM: Remediation Effort;1062020;technical-debt-statistics;N/A;2020-03-27;387350.0 shopizer8321;null;HTML5;OMG-ATDM: Remediation Effort;1062020;technical-debt-statistics;N/A;2020-03-27;770.0 shopizer8321;null;JEE;OMG-ATDM: Remediation Effort;1062020;technical-debt-statistics;N/A;2020-03-27;386580.0 shopizer8321;shopizer8321 full content;null;OMG-ATDM: Remediation Effort;1062020;technical-debt-statistics;N/A;2020-03-27;387350.0 shopizer8321;shopizer8321 full content;HTML5;OMG-ATDM: Remediation Effort;1062020;technical-debt-statistics;N/A;2020-03-27;770.0 shopizer8321;shopizer8321 full content;JEE;OMG-ATDM: Remediation Effort;1062020;technical-debt-statistics;N/A;2020-03-27;386580.0
In other words, the "shopizer8321" application has a technical debt of 387350 minutes, which is equivalent to 387350 ÷ 60 ÷ 8 = 806 workload days. The remediation effort is dispatched between HTML5 code and Java Code as follows:
Technology | Remediation effort |
---|---|
HTML | 770 minutes |
JEE | 386,580 minutes |
Total Technical Debt by Business Criterion, Technical Criterion, Rule
With a CISQ Business Criterion ID, you can obtain the technical debt for this Quality Indicator and all related indicators (ie CISQ Measure Elements):
CISQ Business Criterion ID | Name |
---|---|
1062100 | CISQ-Index |
1062101 | CISQ-Maintainability |
1062102 | CISQ-Performance-Efficiency |
1062103 | CISQ-Reliability |
1062104 | CISQ-Security |
Example:
C:>curl -H "Accept: text/csv" -u admin:cast "http://localhost:9190/CAST-RESTAPI/rest/SHOPIZER/applications/3/results?metrics=c:1062100&select=omgTechnicalDebt" Application Name;Technical Criterion;Metric Id;Metric Type;Critical;Snapshot Date #1;Result #1;OMG Technical Debt (Result #1);OMG Occurrences (Result #1);OMG Added Technical Debt (Result #1);OMG Removed Technical Debt (Result #1) shopizer8321;ASCMM-MNT-1 - Control Flow Transfer Control Element outside Switch Block;1062110;technical-criteria;false;2020-05-15;4.0;0;2;0;0 shopizer8321;ASCMM-MNT-11 - Callable and Method Control Element Excessive Cyclomatic Complexity Value;1062112;technical-criteria;false;2020-05-15;3.58017346587814;null;null;null;null shopizer8321;ASCMM-MNT-12 - Named Callable and Method Control Element with Layer-skipping Call;1062113;technical-criteria;false;2020-05-15;4.0;null;null;null;null shopizer8321;ASCMM-MNT-13 - Callable and Method Control Element Excessive Number of Parameters;1062114;technical-criteria;false;2020-05-15;4.0;null;null;null;null shopizer8321;ASCMM-MNT-15 - Public Member Element;1062116;technical-criteria;false;2020-05-15;4.0;40;1;0;0 ...
You can get also the technical debt for a single rule, as long as this rule is identified as a CISQ rule by the CISQ Index:
C:>curl -H "Accept: application/json" -u admin:cast "http://localhost:9190/CAST-RESTAPI/rest/SHOPIZER/applications/3/results?metrics=8216&select=omgTechnicalDebt,violationRatio" ... "result": { "grade": 4, "omgTechnicalDebt": { "total": 11040, "numberOccurrences": 176, "added": 0, "removed": 0 }, "violationRatio": { "totalChecks": 7411, "failedChecks": 33, "successfulChecks": 7378, "ratio": 0.9955471596275807 } },
Detailed Technical Debt for a violation
As we refer to findings from a snapshot ID, and object ID and a rule ID with URI such as:
TINY/components/568/snapshots/8/findings/8216
We can refer technical debt details in a similar Web Service:
TINY/components/568/snapshots/8/omg-technical-debt/8216
E.g.:
C:>curl -H "Accept: application/json" -u admin:cast "http://localhost:9190/CAST-RESTAPI/rest/TINY/components/568/snapshots/8/omg-technical-debt/8216" { "total": 180, "numberOccurrences": 3, "complexity": 1, "exposure": 1, "concentration": 0, "technologicalDiversity": 1, "gapSize": 1, "unadjustedEffort": 60, "added": 0, "removed": 0, "adjustmentFactor": 3 }