Code smells in pull requests: An exploratory study

被引:0
|
作者
Azeem, Muhammad Ilyas [1 ]
Shafiq, Saad [2 ]
Mashkoor, Atif [2 ]
Egyed, Alexander [2 ]
机构
[1] Univ Luxembourg, SnT Ctr Secur Reliabil & Trust, Esch Sur Alzette, Luxembourg
[2] Johannes Kepler Univ Linz, Inst Software Syst Engn, Linz, Austria
来源
SOFTWARE-PRACTICE & EXPERIENCE | 2024年 / 54卷 / 03期
关键词
code smell; machine learning; pull-based development; pull requests; IMPACT;
D O I
10.1002/spe.3283
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:419 / 436
页数:18
相关论文
共 50 条
  • [1] How do Multiple Pull Requests Change the Same Code: A Study of Competing Pull Requests in GitHub
    Zhang, Xin
    Chen, Yang
    Gu, Yongfeng
    Zou, Weiqin
    Xie, Xiaoyuan
    Jia, Xiangyang
    Xuan, Jifeng
    [J]. PROCEEDINGS 2018 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2018, : 228 - 239
  • [2] Detecting Code Smells in Software Product Lines - An Exploratory Study
    Abilio, Ramon
    Padilha, Juliana
    Figueiredo, Eduardo
    Costa, Heitor
    [J]. 2015 12TH INTERNATIONAL CONFERENCE ON INFORMATION TECHNOLOGY - NEW GENERATIONS, 2015, : 433 - 438
  • [3] The relationship between design patterns and code smells: An exploratory study
    Walter, Bartosz
    Alkhaeir, Tarek
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2016, 74 : 127 - 142
  • [4] A longitudinal exploratory study on code smells in server side web applications
    Narjes Bessghaier
    Ali Ouni
    Mohamed Wiem Mkaouer
    [J]. Software Quality Journal, 2021, 29 : 901 - 941
  • [5] An Exploratory Study of the Impact of Code Smells on Software Change-proneness
    Khomh, Foutse
    Di Penta, Massimiliano
    Gueheneuc, Yann-Gael
    [J]. 16TH WORKING CONFERENCE ON REVERSE ENGINEERING (WCRE 2009), 2009, : 75 - +
  • [6] A longitudinal exploratory study on code smells in server side web applications
    Bessghaier, Narjes
    Ouni, Ali
    Mkaouer, Mohamed Wiem
    [J]. SOFTWARE QUALITY JOURNAL, 2021, 29 (04) : 901 - 941
  • [7] Automated Code Reviewer Recommendation for Pull Requests
    Moosareza, Mina-Sadat
    Heydarnoori, Abbas
    [J]. E-INFORMATICA SOFTWARE ENGINEERING JOURNAL, 2024, 18 (01)
  • [8] An Exploratory Study on Code Smells during Code Review in OSS Projects: A Case Study on OpenStack and WikiMedia
    Nanthaamornphong, Aziz
    Boonchieng, Ekkarat
    [J]. Recent Advances in Computer Science and Communications, 2023, 16 (07) : 20 - 33
  • [9] How Developers Modify Pull Requests in Code Review
    Jiang, Jing
    Lv, Jiangfeng
    Zheng, Jiateng
    Zhang, Li
    [J]. IEEE TRANSACTIONS ON RELIABILITY, 2022, 71 (03) : 1325 - 1339
  • [10] How do Developers Improve Code Readability? An Empirical Study of Pull Requests
    Dantas, Carlos Eduardo C.
    Rocha, Adriano M.
    Maia, Marcelo A.
    [J]. 2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION, ICSME, 2023, : 110 - 122