An empirical investigation of the relationship between pattern grime and code smells

被引:0
|
作者
Alharbi, Maha [1 ,2 ]
Alshayeb, Mohammad [1 ,3 ,4 ]
机构
[1] King Fahd Univ Petr & Minerals, Informat & Comp Sci Dept, Dhahran, Saudi Arabia
[2] Umm Al Qura Univ, Univ Coll Al Jamoum, Dept Comp Sci, Mecca, Saudi Arabia
[3] King Fahd Univ Petr & Minerals, Interdisciplinary Res Ctr Intelligent Secure Syst, Dhahran, Saudi Arabia
[4] King Fahd Univ Petr & Minerals, Interdisciplinary Res Ctr Intelligent Secure Syst, Dhahran, Saudi Arabia
关键词
code smells; design patterns; pattern grime; software quality; DESIGN PATTERNS; BAD SMELLS; IMPACT;
D O I
10.1002/smr.2666
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Developers are encouraged to adopt good design practices to maintain good software quality during the system's evolution. However, some modifications and changes to the system could cause code smells and pattern grime, which might incur more maintenance effort. As the presence of both code smells and pattern grime is considered a bad sign and raises a flag at code segments that need more careful examination, a potential connection between them may exist. Therefore, the main objective of this paper is to (1) empirically investigate the potential relationship between the accumulation of pattern grime and the presence of code smells and (2) evaluate the significance of individual code smells when they appear in a specific pattern grime category. To achieve this goal, we performed an empirical study using six-grime metrics and 10 code smells on five Java open-source projects ranging from 217 to 563 classes. Our statistical results indicate that, in general, the growth of grime is more likely to co-occur with code smells using Spearman's correlation and Odd Ratio test. Specifically, there is a strong positive association between the growth of pattern grime at the class level and the presence of Shotgun Surgery smell according to the result of applying the Apriori algorithm, which gives conviction values equal to 1.66. The findings in this paper are helpful for developers and researchers as the presence of pattern grime could be considered a factor in improving the performance of existing smell detection methods. Furthermore, the link between grime and smells can be exploited as a hint for smell distribution in the system. The results indicate that, in general, the growth of grime is more likely to co-occur with code smells. Specifically, there is a strong positive association between the growth of pattern grime at the class level and the presence of Shotgun Surgery. image
引用
收藏
页数:19
相关论文
共 50 条
  • [31] An Empirical Study of Code Smells in Transformer-based Code Generation Techniques
    Siddiq, Mohammed Latif
    Majumder, Shafayat H.
    Mim, Maisha R.
    Jajodia, Sourov
    Santos, Joanna C. S.
    2022 IEEE 22ND INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2022), 2022, : 71 - 82
  • [32] An empirical catalog of code smells for the presentation layer of Android apps
    Suelen Goularte Carvalho
    Maurício Aniche
    Júlio Veríssimo
    Rafael S. Durelli
    Marco Aurélio Gerosa
    Empirical Software Engineering, 2019, 24 : 3546 - 3586
  • [33] Examining the Relationship of Code and Architectural Smells with Software Vulnerabilities
    Sultana, Kazi Zakia
    Codabux, Zadia
    Williams, Byron
    2020 27TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2020), 2020, : 31 - 40
  • [34] On the Effectiveness of Concern Metrics to Detect Code Smells: An Empirical Study
    Padilha, Juliana
    Pereira, Juliana
    Figueiredo, Eduardo
    Almeida, Jussara
    Garcia, Alessandro
    Sant'Anna, Claudio
    ADVANCED INFORMATION SYSTEMS ENGINEERING (CAISE 2014), 2014, 8484 : 656 - 671
  • [35] An empirical catalog of code smells for the presentation layer of Android apps
    Carvalho, Suelen Goularte
    Aniche, Mauricio
    Verissimo, Julio
    Durelli, Rafael S.
    Gerosa, Marco Aurelio
    EMPIRICAL SOFTWARE ENGINEERING, 2019, 24 (06) : 3546 - 3586
  • [36] Are Existing Code Smells Relevant in Web Games? An Empirical Study
    Khanve, Vaishali
    ESEC/FSE'2019: PROCEEDINGS OF THE 2019 27TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2019, : 1241 - 1243
  • [37] Are existing code smells relevant in web games? An empirical study
    Khanve, Vaishali
    ESEC/FSE 2019 - Proceedings of the 2019 27th ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2019, : 1241 - 1243
  • [38] Generating Relationship between Design Pattern and Source Code
    Ohstuki, Mika
    Kakeshita, Tetsuro
    CSEDU: PROCEEDINGS OF THE 13TH INTERNATIONAL CONFERENCE ON COMPUTER SUPPORTED EDUCATION - VOL 2, 2021, : 288 - 293
  • [39] An empirical investigation of the impact of architectural smells on software maintainability
    Jolak, Rodi
    Karlsson, Simon
    Dobslaw, Felix
    JOURNAL OF SYSTEMS AND SOFTWARE, 2025, 225
  • [40] Code smells as system-level indicators of maintainability: An empirical study
    Yamashita, Aiko
    Counsell, Steve
    JOURNAL OF SYSTEMS AND SOFTWARE, 2013, 86 (10) : 2639 - 2653