Code smells in pull requests: An exploratory study.
Autor: | Azeem, Muhammad Ilyas, Shafiq, Saad, Mashkoor, Atif, Egyed, Alexander |
---|---|
Předmět: | |
Zdroj: | Software: Practice & Experience; Mar2024, Vol. 54 Issue 3, p419-436, 18p |
Abstrakt: | The quality of a pull request is the primary factor integrators consider for its acceptance or rejection. Code smells indicate sub‐optimal design or implementation choices in the source code that often lead to a fault‐prone outcome, threatening the quality of pull requests. This study explores code smells in 21k pull requests from 25 popular Java projects. We find that both accepted (37%) and rejected (44%) pull requests have code smells, affected mainly by god classes and long methods. Besides, we observe that smelly pull requests are more complex and challenging to understand as they have significantly large sizes, long latency times, more discussion and review comments, and are submitted by contributors with less experience. Our results show that features used in previous studies for pull request acceptance prediction could be potentially employed to predict smell in incoming pull requests. We propose a dynamic approach to predict the presence of such code smells in the newly added pull requests. We evaluate our approach on a dataset of 25 Java projects extracted from GitHub. We further conduct a benchmark study to compare the performance of eight machine learning classifiers. Results of the benchmark study show that XGBoost is the best‐performing classifier for smell prediction. [ABSTRACT FROM AUTHOR] |
Databáze: | Complementary Index |
Externí odkaz: |
načítá se...