Are SonarQube Rules Inducing Bugs?
- 1 February 2020
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 501-511
Abstract
The popularity of tools for analyzing Technical Debt, and particularly the popularity 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, our local companies were not confident in the usefulness of the rules proposed by SonarQube and contracted us to investigate the fault-proneness of these rules. In this work we aim at understanding which SonarQube rules are actually fault-prone and to understand which machine learning models can be adopted to accurately identify fault-prone rules. We designed and conducted an empirical study on 21 well-known mature open-source projects. We applied the SZZ algorithm to label the fault-inducing commits. We analyzed the fault-proneness by comparing the classification power of seven machine learning models. Among the 202 rules defined for Java by SonarQube, only 25 can be considered to have relatively low fault-proneness. Moreover, violations considered as “bugs” by SonarQube were generally not fault-prone and, consequently, the fault-prediction power of the model proposed by SonarQube is extremely low. 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 19 references indexed in Scilit:
- Code smell severity classification using machine learning techniquesKnowledge-Based Systems, 2017
- A Continuous Software Quality Monitoring Approach for Small and Medium Enterprises2017
- XGBoost2016
- Towards an open-source tool for measuring and visualizing the interest of technical debt2015
- Guidelines for conducting and reporting case study research in software engineeringEmpirical Software Engineering, 2008
- Extremely randomized treesMachine Learning, 2006
- Random ForestsMachine Learning, 2001
- A Decision-Theoretic Generalization of On-Line Learning and an Application to BoostingJournal of Computer and System Sciences, 1997
- Bagging predictorsMachine Learning, 1996
- The strength of weak learnabilityMachine Learning, 1990