- Extension ID
- What's new?
- Description
- Compatibility
- OMG-ATDM version
- Dependencies with other extensions
- Download and installation instructions
- Assessment Model
- How are results calculated?
- Result storage
- What results can you expect?
Extension ID
com.castsoftware.omg-atdm
What's new?
Please see OMG-ATDM - 1.0 - Release Notes for more information.
Description
ATDM (Automated Technical Debt Measure), is an OMG standard that has been submitted by the CISQ Consortium. This extension implements the OMG Automated Technical Debt Measure to estimate future corrective maintenance costs, i.e. the technical debt of the application in number of minutes, as described in the OMG ATDM specification 1.0, see: https://www.omg.org/spec/ATDM/1.0/PDF.
Compatibility
Product | Release | Supported |
---|---|---|
AIP Core | ≥ 8.3.21 for 1.0.0-beta releases and 1.0.0-funcrel | |
≥ 8.3.24 for ≥ 1.0.1-funcrel | ||
CAST RestAPI | ||
CAST Engineering Dashboard |
| |
CAST Health Dashboard | - | |
CAST Security Dashboard | ≥ 1.19 |
OMG-ATDM version
1.0 (September 2018) |
Dependencies with other extensions
Some CAST extensions require the presence of other CAST extensions in order to function correctly. The OMG-ATDM extension requires that the following other CAST extensions are also installed - these will be installed automatically when you install OMG-ATDM Index:
- CISQ-Index (≥ 1.0.0-funcrel when using OMG-ATDM ≥ 1.0.1-funcrel)
Download and installation instructions
Assessment Model
The extension calculates the following metrics as a Sizing Measures:
Release | Metric ID | Name | Description |
---|---|---|---|
≥ beta3 | 1062030 | OMG-ATDM: Remediation Effort ADDED | Measures the added remediation effort in number of minutes between two snapshots. Results are available at Application, Module, CISQ Business Criteria, CISQ Technical Criteria, Rule and Object level. |
≥ beta3 | 1062032 | OMG-ATDM: Remediation Effort DELETED | Measures the removed remediation effort in number of minutes between two snapshots. Results are available at Application, Module, CISQ Business Criteria, CISQ Technical Criteria, Rule and Object level. |
≥ beta2 | 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. (ASCMM, ASCRM, ASCPEM, ASCSM). This sizing measure keeps, per snapshot, the number of occurrences per object, rule, CISQ Technical Criterion and CISQ Business Criterion. |
≥ beta2 | 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). |
≥ beta2 | 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. |
≥ beta2 | 1062013 | OMG-ATDM: Concentration | Concentration is qualification information that measures the number of Occurrences within any Code Element in the software. |
≥ beta2 | 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. |
≥ beta2 | 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. |
≥ beta2 | 1062016 | OMG-ATDM: Adjustment Factor | Adjustment Factor is computed based on qualification measures. |
≥ beta1 | 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. |
How are results calculated?
Predefined Un-Adjusted Remediation Effort
Configuration data is loaded to have the remediation effort for each CISQ Pattern. This is called Un-Adjusted Remediation Effort. The unit of effort is minute. The effort taken in to account by ATDM for each pattern is EFFORT_DEFAULT.
E.g.:
UNADJ_REMEDIATION_EFFORT STANDARD : CISQ PATTERN : ASCPEM-PRF-15 EFFORT_DEFAULT: 90 EFFORT_MIN: 30 EFFORT_MAX: 210 EFFORT_UNIT: MIN
Scope
All CAST rules mapped to the CISQ 1.0 (December 2016) standard.
- 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)
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 tiles
Two tiles are available out of the box (in v. ≥ 1.17) in the Overview and Trends sections respectively (the tiles will display no value if the OMG-ATDM extension is not installed and no snapshot has been generated):
Clicking these tiles will provide more detailed information:
Click to enlarge
Engineering Dashboard tile
This tile:
- needs to be configured manually in ed.json - see Engineering Dashboard tile management.
- requires the OMG Technical Debt extension to be installed.
This tile displays Total Added and Removed OMG Technical Debt and the number of days taken for the same:
Clicking these tiles will provide more detailed information:
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
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 }