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 条
  • [21] Empirical Study on Code Smells in iOS Applications
    Rahkema, Kristiina
    Pfahl, Dietmar
    2020 IEEE/ACM 7TH INTERNATIONAL CONFERENCE ON MOBILE SOFTWARE ENGINEERING AND SYSTEMS, MOBILESOFT, 2020, : 61 - 65
  • [22] The Relationship Between Code Smells and Traceable Patterns - Are They Measuring the Same Thing?
    Codabux, Zadia
    Sultana, Kazi Zakia
    Williams, Byron J.
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2017, 27 (9-10) : 1529 - 1547
  • [23] An Empirical Investigation into the Nature of Test Smells
    Tufano, Michele
    Palomba, Fabio
    Bavota, Gabriele
    Di Penta, Massimiliano
    Oliveto, Rocco
    De Lucia, Andrea
    Poshyvanyk, Denys
    2016 31ST IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2016, : 4 - 15
  • [24] An Empirical Study of the Performance Impacts of Android Code Smells
    Hecht, Geoffrey
    Moha, Naouel
    Rouvoy, Romain
    2016 IEEE/ACM INTERNATIONAL CONFERENCE ON MOBILE SOFTWARE ENGINEERING AND SYSTEMS (MOBILESOFT 2016), 2016, : 59 - 69
  • [25] An empirical study of Android behavioural code smells detection
    Prestat, Dimitri
    Moha, Naouel
    Villemaire, Roger
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (07)
  • [26] An empirical study of Android behavioural code smells detection
    Dimitri Prestat
    Naouel Moha
    Roger Villemaire
    Empirical Software Engineering, 2022, 27
  • [27] An Empirical Study of Code Smells in Java']JavaScript Projects
    Saboury, Amir
    Musavi, Pooya
    Khomh, Foutse
    Antoniol, Giulio
    2017 IEEE 24TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), 2017, : 294 - 305
  • [28] Empirical Software Evolvability - Code Smells and Human Evaluations
    Mantyla, Mika V.
    2010 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, 2010,
  • [29] A taxonomy and an initial empirical study of bad smells in code
    Mäntylä, M
    Vanhanen, J
    Lassenius, C
    INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 2003, : 381 - 384
  • [30] Interactive Code Smells Detection: An Initial Investigation
    Mkaouer, Mohamed Wiem
    SEARCH BASED SOFTWARE ENGINEERING, SSBSE 2016, 2016, 9962 : 281 - 287