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
关键词
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
相关论文
共 50 条
  • [31] White House supporting open source code
    不详
    COMPUTERS & SECURITY, 2000, 19 (07) : 577 - 578
  • [32] GYRE: A new open-source stellar oscillation code
    Townsend, Rich
    Teitler, Seth
    Paxton, Bill
    PRECISION ASTEROSEISMOLOGY, 2014, 9 (301): : 505 - 506
  • [33] Hybrid parallelization of the LIGGGHTS open-source DEM code
    Berger, R.
    Kloss, C.
    Kohlmeyer, A.
    Pirker, S.
    POWDER TECHNOLOGY, 2015, 278 : 234 - 247
  • [34] OSSIntegrity: Collaborative open-source code integrity verification
    Nahum, Mor
    Grolman, Edita
    Maimon, Inbar
    Mimran, Dudu
    Brodt, Oleg
    Elyashar, Aviad
    Elovici, Yuval
    Shabtai, Asaf
    COMPUTERS & SECURITY, 2024, 144
  • [35] On the nature of code cloning in open-source Java projects
    Golubev, Yaroslav
    Bryksin, Timofey
    arXiv, 2021,
  • [36] FESTIM: An open-source code for hydrogen transport simulations
    Delaporte-Mathurin, Remi
    Dark, James
    Ferrero, Gabriele
    Hodille, Etienne A.
    Kulagin, Vladimir
    Meschini, Samuele
    INTERNATIONAL JOURNAL OF HYDROGEN ENERGY, 2024, 63 : 786 - 802
  • [37] Code Ownership in Open-Source AI Software Security
    Wen, Jiawen
    Yuari, Dong
    Ma, Lei
    Chen, Huaming
    PROCEEDINGS OF THE 2024 IEEE/ACM INTERNATIONAL WORKSHOP ON RESPONSIBLE AI ENGINEERING, RAIE 2024, 2024, : 28 - 35
  • [38] The Evolution and Impact of Code Smells: A Case Study of Two Open Source Systems
    Olbrich, Steffen
    Cruzes, Daniela S.
    Basili, Victor
    Zazworka, Nico
    ESEM: 2009 3RD INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT, 2009, : 391 - +
  • [39] An empirical analysis of the open source development process based on mining of source code repositories
    Scotto, Marco
    Sillitti, Alberto
    Succi, Giancarlo
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2007, 17 (02) : 231 - 247
  • [40] A Comparison of Open-Source Static Analysis Tools for Vulnerability Detection in C/C plus plus Code
    Arusoaie, Andrei
    Ciobaca, Stefan
    Craciun, Vlad
    Gavrilut, Dragos
    Lucanu, Dorel
    2017 19TH INTERNATIONAL SYMPOSIUM ON SYMBOLIC AND NUMERIC ALGORITHMS FOR SCIENTIFIC COMPUTING (SYNASC 2017), 2017, : 161 - 168