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 条
[1]   An Empirical Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, On Program Comprehension [J].
Abbes, Marwen ;
Khomh, Foutse ;
Gueheneuc, Yann-Gael ;
Antoniol, Giuliano .
2011 15TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING (CSMR), 2011, :181-190
[2]   The Effect of Lexicon Bad Smells on Concept Location in Source Code [J].
Abebe, Surafel Lemma ;
Haiduc, Sonia ;
Tonella, Paolo ;
Marcus, Andrian .
11TH IEEE INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2011), 2011, :125-134
[3]  
[Anonymous], SOFTW QUAL J
[4]  
[Anonymous], 1996, PATTERN ORIENTED SOF
[5]   An experimental investigation on the innate relationship between quality and refactoring [J].
Bavota, Gabriele ;
De Lucia, Andrea ;
Di Penta, Massimiliano ;
Oliveto, Rocco ;
Palomba, Fabio .
JOURNAL OF SYSTEMS AND SOFTWARE, 2015, 107 :1-14
[6]  
Bloch Joshua., 2008, The Java Series, V2nd
[7]   A METRICS SUITE FOR OBJECT-ORIENTED DESIGN [J].
CHIDAMBER, SR ;
KEMERER, CF .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1994, 20 (06) :476-493
[8]   SPECIES NUMBER AND COMPOSITIONAL SIMILARITY OF GALAPAGOS FLORA AND AVIFAUNA [J].
CONNOR, EF ;
Simberloff, D .
ECOLOGICAL MONOGRAPHS, 1978, 48 (02) :219-248
[9]  
Counsell S., 2010, ADV SOFTWARE ENG, V2010
[10]   Detecting software design defects using relational association rule mining [J].
Czibula, Gabriela ;
Marian, Zsuzsanna ;
Czibula, Istvan Gergely .
KNOWLEDGE AND INFORMATION SYSTEMS, 2015, 42 (03) :545-577