House of Cards: Code Smells in Open-source C# Repositories

被引:16
作者
Sharma, Tushar [1 ]
Fragkoulis, Marios [1 ]
Spinellis, Diomidis [1 ]
机构
[1] Athens Univ Econ & Business, Dept Management Sci & Technol, Athens, Greece
来源
11TH ACM/IEEE INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT (ESEM 2017) | 2017年
关键词
Code smells; Implementation smells; Design smells; Code quality; Maintainability; C#; BAD SMELLS; IMPACT;
D O I
10.1109/ESEM.2017.57
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Background: Code smells are indicators of quality problems that make a software hard to maintain and evolve. Given the importance of smells in the source code's maintainability, many studies have explored the characteristics of smells and analyzed their effects on the software's quality. Aim: We aim to investigate fundamental characteristics of code smells through an empirical study on frequently occurring smells that examines inter-category and intra-category correlation between design and implementation smells. Method: The study mines 19 design smells and 11 implementation smells in 1988 C# repositories containing more than 49 million lines of code. The mined data are statistically analyzed using methods such as Spearman's correlation and presented through hexbin and scatter plots. Results: We find that unutilized abstraction and magic number smells are the most frequently occurring smells in C# code. Our results also show that implementation and design smells exhibit strong inter-category correlation. The results of co-occurrence analysis imply that whenever unutilized abstraction or magic number smells are found, it is very likely to find other smells from the same smell category in the project. Conclusions: Our experiment shows high average smell density (1 4 : 7 and 5 5 : 8 for design and implementation smells respectively) for open source C# programs. Such high smell densities turn a software system into a house of cards reflecting the fragility introduced in the system. Our study advocates greater awareness of smells and the adoption of regular refactoring within the developer community to avoid turning software into a house of cards.
引用
收藏
页码:424 / 429
页数:6
相关论文
共 27 条
[11]   Investigating the Impact of Code Smells on System's Quality: An Empirical Study on Systems of Different Application Domains [J].
Fontana, Francesca Arcelli ;
Ferme, Vincenzo ;
Marino, Alessandro ;
Walter, Bartosz ;
Martenka, Pawel .
2013 29TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE (ICSM), 2013, :260-269
[12]  
Fowler M., 1999, Refactoring: Improving the design of existing code
[13]  
Fu SZ, 2015, INT SYMP EMP SOFTWAR, P41
[14]   Identifying Architectural Bad Smells [J].
Garcia, Joshua ;
Popescu, Daniel ;
Edwards, George ;
Medvidovic, Nenad .
13TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING: CSMR 2009, PROCEEDINGS, 2009, :255-258
[15]  
Gatrell M., 2009, P 13 INT C EV ASS SO, P1
[16]   An Exploratory Study of the Impact of Code Smells on Software Change-proneness [J].
Khomh, Foutse ;
Di Penta, Massimiliano ;
Gueheneuc, Yann-Gael .
16TH WORKING CONFERENCE ON REVERSE ENGINEERING (WCRE 2009), 2009, :75-+
[17]   An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution [J].
Li, Wei ;
Shatnawi, Raed .
JOURNAL OF SYSTEMS AND SOFTWARE, 2007, 80 (07) :1120-1128
[18]  
Munaiah N., PEERJ PREPRINTS, V4
[19]  
Olbrich S, 2009, INT SYMP EMP SOFTWAR, P391
[20]   Do Developers Focus on Severe Code Smells? [J].
Saika, Tsubasa ;
Choi, Eunjong ;
Yoshida, Norihiro ;
Haruna, Shusuke ;
Inoue, Katsuro .
2016 IEEE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), VOL 4, 2016, :1-3