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
相关论文
共 70 条
[21]   A novel algorithm for global optimization: Rat Swarm Optimizer [J].
Dhiman, Gaurav ;
Garg, Meenakshi ;
Nagar, Atulya ;
Kumar, Vijay ;
Dehghani, Mohammad .
JOURNAL OF AMBIENT INTELLIGENCE AND HUMANIZED COMPUTING, 2021, 12 (08) :8457-8482
[22]   ESA: a hybrid bio-inspired metaheuristic optimization approach for engineering problems [J].
Dhiman, Gaurav .
ENGINEERING WITH COMPUTERS, 2021, 37 (01) :323-353
[23]   STOA: A bio-inspired based optimization algorithm for industrial engineering problems [J].
Dhiman, Gaurav ;
Kaur, Amandeep .
ENGINEERING APPLICATIONS OF ARTIFICIAL INTELLIGENCE, 2019, 82 :148-174
[24]   Emperor penguin optimizer: A bio-inspired algorithm for engineering problems [J].
Dhiman, Gaurav ;
Kumar, Vijay .
KNOWLEDGE-BASED SYSTEMS, 2018, 159 :20-50
[25]   Spotted hyena optimizer: A novel bio-inspired based metaheuristic technique for engineering applications [J].
Dhiman, Gaurav ;
Kumar, Vijay .
ADVANCES IN ENGINEERING SOFTWARE, 2017, 114 :48-70
[26]   Towards a web of patterns [J].
Dietrich, Jens ;
Elgar, Chris .
JOURNAL OF WEB SEMANTICS, 2007, 5 (02) :108-116
[27]  
Dong J, 2007, ECBS 2007: 14TH ANNUAL IEEE INTERNATIONAL CONFERENCE AND WORKSHOPS ON THE ENGINEERING OF COMPUTER-BASED SYSTEMS, PROCEEDINGS, P371
[28]   Correlating Pattern Grime and Quality Attributes [J].
Feitosa, Daniel ;
Ampatzoglou, Apostolos ;
Avgeriou, Paris ;
Nakagawa, Lisa Y. .
IEEE ACCESS, 2018, 6 :23065-23078
[29]   The Evolution of Design Pattern Grime: An Industrial Case Study [J].
Feitosa, Daniel ;
Avgeriou, Paris ;
Ampatzoglou, Apostolos ;
Nakagawa, Elisa Yumi .
PRODUCT-FOCUSED SOFTWARE PROCESS IMPROVEMENT (PROFES 2017), 2017, 10611 :165-181
[30]  
Field A., 2009, Discovering statistics using SPSS: and sex, drugs and rock n roll