Roots, as well as anti-patterns, can be considered as design debt, a type of technical debt (TD). The rationale is that if these design problems are not fixed, they may continue to generate additional maintenance costs, the same way that a monetary debt accumulates interest. Using DV8, the user can calculate (1) the added maintenance costs due to each instance of each anti-pattern and (2) the extra maintenance costs of each root. 

(1) The maintenance costs of design debt:  As an example, the following tables summarizes the anti-patterns detected in a real industrial project [9] , their scopes, and maintenance costs. The first line shows 322 files (21% of all the files) involved in 26 Clique instances. These files were changed 1,790 times involving 26,294 LOC, 41% of all the LOC altered for the entire project. 643 of the changes are for bug fixing, involving 16,557 LOC, 45% of all the LOC spent for bug fixing. This table shows that Cliques are very expensive to maintain in this project. The table below indicates that Clique1 involves 99 files and incurred the most maintenance costs, definitely worth attention. Clique5, although it contains just 16 files, also appears to be very costly. 

Using this table, the user can prioritize which flaws need to be addressed in which order. By comparing with system average bug and change rates, we can see that files involved in these flaws are causing high maintenance difficulty.

Table: Design anti-patterns

Pt. : Percentage; Flaw CF - BC : maintenance costs, quantified by CF, CC, BF and BC, of the files in each flaw

Table: Maintenance costs of Clique instances

We can similarly calculate the maintenance costs incurred on each root, as exemplified in the following table. The first row shows that the first root involves 147 files. These files were changed 1,109 times, consuming 13,487 LOC. Of these changes, 414 were bug fixes involving 9,347 LOC. As we can see from the table, even though a Root only covers a small portion of the system, it is a hotspot where much maintenance effort was spent.

Table: Maintenance costs of each root

%: percentage; Rt. CF - BC: the total CF - BC of all files in each root

(2) Extra maintenance costs of a design debt: For each design debt, in the form of a root, an anti-pattern instance, or a hotspot, DV8 provides a debt calculator to compute the penalty it incurred. This penalty is calculated as the difference between the actual maintenance effort spent on the debt, and the expected maintenance effort. We use the average change/bug rate of all the project files as its expected maintenance effort [2]. For example, the columns "ExtraCF "- "ExtraBC" in the following table represent the debt's cumulative maintenance penalty. For example,"615" in the second row of "ExtraBF " column indicates that the 222 files in root1 and root2 are involved in bug fixes 615 times more often than average files. The "Percentage" row presents the percentage of the extra maintenance effort as compared with project averages. The last row indicates that 28% of all the changes, 41% of all the LOC, 40% of bug-fixing changes, and 47% of bug-fixing LOC spent on the entire project are incurred by these roots.

These extra maintenance costs can be considered as expected savings once these debts are removed. All these data are aggregated into Return on Investment (ROI) spreadsheets in the root, anti-pattern, and hotspot folders, respectively. 

Table: Extra maintenance costs of architecture roots.