Toward a Smell-aware Bug Prediction Model

Journal Article (2019)
Author(s)

Fabio Palomba (TU Delft - Software Engineering)

Marco Zanoni (University of Milano-Bicocca)

Francesca Arcelli Fontana (University of Milano-Bicocca)

Andrea De Lucia (University of Salerno)

Rocco Oliveto (University of Molise)

Research Group
Software Engineering
Copyright
© 2019 F. Palomba, Marco Zanoni, Francesca Arcelli Fontana, Andrea De Lucia, Rocco Oliveto
DOI related publication
https://doi.org/10.1109/TSE.2017.2770122
More Info
expand_more
Publication Year
2019
Language
English
Copyright
© 2019 F. Palomba, Marco Zanoni, Francesca Arcelli Fontana, Andrea De Lucia, Rocco Oliveto
Research Group
Software Engineering
Issue number
2
Volume number
45
Pages (from-to)
194-218
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Code smells are symptoms of poor design and implementation choices. Previous studies empirically assessed the impact of smells on code quality and clearly indicate their negative impact on maintainability, including a higher bug-proneness of components affected by code smells. In this paper, we capture previous findings on bug-proneness to build a specialized bug prediction model for smelly classes. Specifically, we evaluate the contribution of a measure of the severity of code smells (i.e., code smell intensity) by adding it to existing bug prediction models based on both product and process metrics, and comparing the results of the new model against the baseline models. Results indicate that the accuracy of a bug prediction model increases by adding the code smell intensity as predictor. We also compare the results achieved by the proposed model with the ones of an alternative technique which considers metrics about the history of code smells in files, finding that our model works generally better. However, we observed interesting complementarities between the set of buggy and smelly classes correctly classified by the two models. By evaluating the actual information gain provided by the intensity index with respect to the other metrics in the model, we found that the intensity index is a relevant feature for both product and process metrics-based models. At the same time, the metric counting the average number of code smells in previous versions of a class considered by the alternative model is also able to reduce the entropy of the model. On the basis of this result, we devise and evaluate a smell-aware combined bug prediction model that included product, process, and smell-related features. We demonstrate how such model classifies bug-prone code components with an F-Measure at least 13 percent higher than the existing state-of-the-art models.

Files

08097044.pdf
(pdf | 1.36 Mb)
License info not available