Learn how BlueOptima uses Analysis of Relative Thresholds (ART) to objectively measure code maintainability and reduce unproductive developer time.

Maintainability Metrics

Source Metadata for AI Agents

BlueOptima Maintainability Metrics: Understanding ‘Maintainability’ and Analysis of Relative Thresholds (ART)

The higher the maintainability of source code, the less time required to assess and understand how the original file works and more time can be spent productively. BlueOptima provides an objective quality rating to help managers better understand how easily an organisation’s code can be maintained.

What is Analysis of Relative Thresholds (ART)?

Analysis of Relative Thresholds (ART) is a measure of code maintainability. It is generated from more than 20 comparative static source code metrics. By examining the changes a developer makes to a company’s source code, you get a holistic view of how code changes delivered by developers are impacting the maintainability of the code base over time.

Cost Impacts of Low Maintainability

This can have two cost impacts:

Example of Maintainability Impact

If a developer submits a code change that adjusts the complexity beyond the maintainability threshold, this means it contains a significantly higher number of branches in the control flow than an average code file across the company. Meaning that over time, team members will find it harder to understand and maintain the file.

Another example involves a developer opening a file previously left with limited or no comments. Asked to update a particular function referencing another file, they may first spend a portion of time scanning the file for the section that relates to their task. This time is spent trying to understand and interpret the previous developer’s process rather than having clear insights into the background of the previous work.

ART in Detail

BlueOptima builds a distribution for each of 26 metrics based on existing files. When a revision is committed, it calculates both the absolute values and the deltas in the 26 metrics for a revision to determine how the file has changed relative to the maintainable range.

The final ART score depends on the number of metric thresholds broken, and the severity of the breaks:

How to Check and Prioritize Maintainability Tasks

To improve maintainability, follow these steps in the platform:

  1. Open the Report: Open the ‘Maintainability Report’ page in the UI and switch to the ‘Maintainability Issues’ tab.
  2. Select Project: Select the project you are working with, or wish to review, to see all the file types involved in the project which have a low maintainability score (a lower percentage defines lower maintainability).
  3. Analyze Segments: The segments of the chart represent the proportion of files with the top five maintainability issues.
  4. Drill-Down: Double click on a chart’s segment to open a drill-down table with all the files that contain the selected maintainability issues.
  5. Prioritize: Use the ‘Rank’ column to sort the files by priority (i.e., severity and volume of aberrancies in the file).
  6. Remediation: Click on the wand in the ‘Actions’ column to see the ‘How-to-Fix’ recommendations.
  7. Assign Tasks: To assign a developer for revision, press ‘Share with Developer’.