On the Fault Proneness of SonarQube Technical Debt Violations: A comparison of eight Machine Learning Techniques
Preprint
Abstract
Background. The popularity of tools for analyzing Technical Debt, and particularly that of SonarQube, is increasing rapidly. SonarQube proposes a set of coding rules, which represent something wrong in the code that will soon be reflected in a fault or will increase maintenance effort. However, while the management of some companies is encouraging developers not to violate these rules in the first place and to produce code below a certain technical debt threshold, developers are skeptical of their importance. Objective. In order to understand which SonarQube violations are actually fault-prone and to analyze the accuracy of the fault-prediction model, we designed and conducted an empirical study on 21 well-known mature open-source projects. Method. We applied the SZZ algorithm to label the fault-inducing commits. We compared the classification power of eight Machine Learning models (Logistic Regression, Decision Tree, Random Forest, Extremely Randomized Trees, AdaBoost, Gradient Boosting, XGBoost) to obtain a set of violations that are correlated with fault-inducing commits. Finally, we calculated the percentage of violations introduced in the fault-inducing commit and removed in the fault-fixing commit, so as to reduce the risk of spurious correlations. Result. Among the 202 violations defined for Java by SonarQube, only 26 have a relatively low fault-proneness. Moreover, violations classified as ''bugs'' by SonarQube hardly never become a failure. Consequently, the accuracy of the fault-prediction power proposed by SonarQube is extremely low. Conclusion. The rules applied by SonarQube for calculating technical debt should be thoroughly investigated and their harmfulness needs to be further confirmed. Therefore, companies should carefully consider which rules they really need to apply, especially if their goal is to reduce fault-proneness.Keywords
All Related Versions
This publication has 38 references indexed in Scilit:
- How developers perceive smells in source code: A replicated studyInformation and Software Technology, 2017
- Code smells for Model-View-Controller architecturesEmpirical Software Engineering, 2017
- Code smell severity classification using machine learning techniquesKnowledge-Based Systems, 2017
- Are test smells really harmful? An empirical studyEmpirical Software Engineering, 2014
- To what extent can maintenance problems be predicted by code smell detection? – An empirical studyInformation and Software Technology, 2013
- Assessing the capability of code smells to explain maintenance problems: an empirical study combining quantitative and qualitative dataEmpirical Software Engineering, 2013
- Guidelines for conducting and reporting case study research in software engineeringEmpirical Software Engineering, 2008
- Extremely randomized treesMachine Learning, 2006
- A Decision-Theoretic Generalization of On-Line Learning and an Application to BoostingJournal of Computer and System Sciences, 1997
- Bagging predictorsMachine Learning, 1996