Code smells are symptoms of poor design choices. Previous studies assessed the impact of smells on bug-proneness of classes. In this paper, we build a specialized bug prediction model for smelly classes. We evaluate the contribution of a measure of the severity of code smells by adding it to existing models based on both product and process metrics, and comparing the results of the new model against the baseline ones. Results indicate that the accuracy of a bug prediction model increases by adding the code smell intensity as predictor. We also compare our results with the ones of an alternative technique which considers historical metrics of code smells, finding that our model works better. By evaluating the 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. Thus, we devised a combined bug prediction. We observed an improvement of 13% of the baselines.

Toward a Smell-aware Bug Prediction Model

Palomba, Fabio;De Lucia, Andrea;
2019-01-01

Abstract

Code smells are symptoms of poor design choices. Previous studies assessed the impact of smells on bug-proneness of classes. In this paper, we build a specialized bug prediction model for smelly classes. We evaluate the contribution of a measure of the severity of code smells by adding it to existing models based on both product and process metrics, and comparing the results of the new model against the baseline ones. Results indicate that the accuracy of a bug prediction model increases by adding the code smell intensity as predictor. We also compare our results with the ones of an alternative technique which considers historical metrics of code smells, finding that our model works better. By evaluating the 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. Thus, we devised a combined bug prediction. We observed an improvement of 13% of the baselines.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11386/4704749
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 75
  • ???jsp.display-item.citation.isi??? 63
social impact