| Name | Toxicty Chart Plugin |
| Latest version | Trunk |
| Requires Sonar version | 3.0 or higher |
| License | GNU LGPL v3 |
| Developers | Cezar Coca |
| Issue Tracker | SONARPLUGINS/component/430621 |
| Sources | https://svn.codehaus.org/sonar-plugins/trunk/toxicity-chart |
Description / Features
This Sonar Plugin is an implementation of Toxicity Chart visualization technique presented by Erik Dörnenburg on his blog. This technique is very useful to quickly get an idea about the general quality of the large existing code base.

In a Toxicity Chart each bar represents a class and the height of the bar shows the toxicity score for that class. The score is based on 11 rules (see Axes of quality section) and different colours are used to represent each one. This makes it possible to easily spot not only how toxic a code base is, but also how the problems are distributed and what the preponderant "code smell" is. The classes that score zero points are left off the chart. The metrics are computed using the threshold value set for corresponding Checkstyle rule.

For example if the Method Length metric has a threshold of 30 and a class comprises three methods, one that is 25 lines, one that is 45 lines and another that is 60 lines long, then the score is calculated to be proportional to the length of the method in relation to the threshold and for the given scenario the class gets 1.5 + 2 = 3.5 points.
Axes of quality
All the metrics are computed using the approach presented above.
File Length
The total numberTotal of points accumulated due to the violation of Checkstyle File Length rule. The possible associated technical debts are: Understandability, Maintainability and Single Responsibility Principle violation.
Method Length
The total numberTotal of points accumulated due to the violation of Checkstyle Method Length rule. The possible associated technical debts are: Understandability, Maintainability and Single Responsibility Principle violation.
Cyclomatic Complexity
Total of points accumulated due to the violation of Checkstyle Cyclomatic Complexity rule. The possible associated technical debts are: Understandability, Maintainability and Testability.
Parameter Number
The total numberTotal of points accumulated due to the violation of Checkstyle Parameter Number rule. The possible associated technical debts are: Understandability, Maintainability and Testability.
Boolean Expression Complexity
The total numberTotal of points accumulated due to the violation of Checkstyle Boolean Expression Complexity rule. The possible associated technical debts are: Understandability, Maintainability and Testability.
Nested If Depth
The total numberTotal of points accumulated due to the violation of Checkstyle Nested If Depth rule. The possible associated technical debts are: Understandability, Maintainability and Testability.
Nested Try Depth
The total numberTotal of points accumulated due to the violation of Checkstyle Nested Try Depth rule. The possible associated technical debts are: Understandability, Maintainability and Testability.
Missing Switch Default
The total numberTotal of points accumulated due to the violation of Checkstyle Missing Switch Default rule. The possible associated technical debt is: Correctness.
Class Fan Out Complexity
The total numberTotal of points accumulated due to the violation of Checkstyle Class Fan out Complexity rule. The possible associated technical debts are: Understandability, Maintainability, Testability and High Coupling.
Class Data Abstraction Coupling
The total numberTotal of points accumulated due to the violation of Checkstyle Class Data Abstraction Coupling rule. The possible associated technical debts are: Understandability, Maintainability, Testability and High Coupling.
Anon Inner Length
The total numberTotal of points accumulated due to the violation of Checkstyle Anon Inner Length rule. The possible associated technical debt is: Maintainability.
Average value
The total numberTotal of points accumulated due violation of all above rules divided by the number of classes that score more than one point.

