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 条
  • [1] An Empirical Examination of the Relationship Between Code Smells and Merge Conflicts
    Ahmed, Iftekhar
    Brindescu, Caius
    Mannan, Umme Ayda
    Jensen, Carlos
    Sarma, Anita
    11TH ACM/IEEE INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT (ESEM 2017), 2017, : 58 - 67
  • [2] Empirical study of the relationship between design patterns and code smells
    Alfadel, Mahmoud
    Aljasser, Khalid
    Alshayeb, Mohammad
    PLOS ONE, 2020, 15 (04):
  • [3] An empirical investigation on the relationship between design and architecture smells
    Sharma, Tushar
    Singh, Paramvir
    Spinellis, Diomidis
    EMPIRICAL SOFTWARE ENGINEERING, 2020, 25 (05) : 4020 - 4068
  • [4] An empirical investigation on the relationship between design and architecture smells
    Tushar Sharma
    Paramvir Singh
    Diomidis Spinellis
    Empirical Software Engineering, 2020, 25 : 4020 - 4068
  • [5] Software Code Smells and Defects: An Empirical Investigation
    Brown, Reuben
    Greer, Des
    PROCEEDINGS OF THE 18TH INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING, ENASE 2023, 2023, : 570 - 580
  • [6] Building empirical knowledge on the relationship between code smells and design patterns: An exploratory study
    Santos, Jose Amancio M.
    Antunes Petronilo, Gadiel Xavier
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2022, 34 (09)
  • [7] Revisiting the Relationship Between Code Smells and Refactoring
    Yoshida, Norihiro
    Saika, Tsubasa
    Choi, Eunjong
    Ouni, Ali
    Inoue, Katsuro
    2016 IEEE 24TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2016,
  • [8] A Systematic Literature Review on Empirical Analysis of the Relationship Between Code Smells and Software Quality Attributes
    Amandeep Kaur
    Archives of Computational Methods in Engineering, 2020, 27 : 1267 - 1296
  • [9] A Systematic Literature Review on Empirical Analysis of the Relationship Between Code Smells and Software Quality Attributes
    Kaur, Amandeep
    ARCHIVES OF COMPUTATIONAL METHODS IN ENGINEERING, 2020, 27 (04) : 1267 - 1296
  • [10] An empirical investigation into code smells rectifications through ADA_BOOSTER
    Sangeetha, M.
    Chandrasekar, C.
    AIN SHAMS ENGINEERING JOURNAL, 2019, 10 (03) : 549 - 553