On the role of data balancing for machine learning-based code smell detection

Fabiano Pecorelli, D. Di Nucci, Coen De Roover, Andrea De Lucia

Research output: Chapter in Book/Report/Conference proceedingConference contributionScientificpeer-review

31 Citations (Scopus)


Code smells can compromise software quality in the long term by inducing technical debt. For this reason, many approaches aimed at identifying these design flaws have been proposed in the last decade. Most of them are based on heuristics in which a set of metrics (e.g., code metrics, process metrics) is used to detect smelly code components. However, these techniques suffer of subjective interpretation, low agreement between detectors, and threshold dependability. To overcome these limitations, previouswork applied Machine Learning techniques that can learn from previous datasets without needing any threshold definition. However, more recent work has shown that Machine Learning is not always suitable for code smell detection due to the highly unbalanced nature of the problem. In this study we investigate several approaches able to mitigate data unbalancing issues to understand their impact on MLbased approaches for code smell detection. Our findings highlight a number of limitations and open issues with respect to the usage of data balancing in ML-based code smell detection.
Original languageEnglish
Title of host publicationMaLTeSQuE 2019 - Proceedings of the 3rd ACM SIGSOFT International Workshop on Machine Learning Techniques for Software Quality Evaluation, co-located with ESEC/FSE 2019
Publication statusPublished - 2019


Dive into the research topics of 'On the role of data balancing for machine learning-based code smell detection'. Together they form a unique fingerprint.

Cite this