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 条
  • [1] Collecting Vulnerable Source Code from Open-Source Repositories for Dataset Generation
    Raducu, Razvan
    Esteban, Gonzalo
    Rodriguez Lera, Francisco J.
    Fernandez, Camino
    APPLIED SCIENCES-BASEL, 2020, 10 (04):
  • [2] OCTSharp: An Open-Source C# Software for OCT
    Chen, Weihao
    Wang, Hui
    OPTICAL COHERENCE TOMOGRAPHY AND COHERENCE DOMAIN OPTICAL METHODS IN BIOMEDICINE XXVII, 2023, 12367
  • [4] Open-source software for repositories
    Vasilyeva, Natalya V.
    NAUCHNYE I TEKHNICHESKIE BIBLIOTEKI-SCIENTIFIC AND TECHNICAL LIBRARIES, 2023, (03): : 102 - 119
  • [5] Code smells and their collocations: A large-scale experiment on open-source systems
    Walter, Bartosz
    Fontana, Francesca Arcelli
    Ferme, Vincenzo
    JOURNAL OF SYSTEMS AND SOFTWARE, 2018, 144 : 1 - 21
  • [6] Detecting Security Fixes in Open-Source Repositories using Static Code Analyzers
    Fehrer, Therese
    Lozoya, Rocio Cabrera
    Sabetta, Antonino
    Di Nucci, Dario
    Tamburri, Damian A.
    PROCEEDINGS OF 2024 28TH INTERNATION CONFERENCE ON EVALUATION AND ASSESSMENT IN SOFTWARE ENGINEERING, EASE 2024, 2024, : 429 - 432
  • [7] Exploring Community Smells in Open-Source: An Automated Approach
    Tamburri, Damian A.
    Palomba, Fabio
    Kazman, Rick
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (03) : 630 - 652
  • [8] Evaluating the Data Inconsistency of Open-Source Vulnerability Repositories
    Jiang, Yuning
    Jeusfeld, Manfred
    Ding, Jianguo
    ARES 2021: 16TH INTERNATIONAL CONFERENCE ON AVAILABILITY, RELIABILITY AND SECURITY, 2021,
  • [9] Refactoring Test Smells: A Perspective from Open-Source Developers
    Soares, Elvys
    Ribeiro, Marcio
    Amaral, Guilherme
    Gheyi, Rohit
    Fernandes, Leo
    Garcia, Alessandro
    Fonseca, Baldoino
    Santos, Andre
    PROCEEDINGS OF THE 5TH BRAZILIAN SYMPOSIUM ON SYSTEMATIC AND AUTOMATED SOFTWARE TESTING, SAST 2020, 2020, : 50 - 59
  • [10] Flame simulations with an open-source code
    Dasgupta, Adhiraj
    Gonzalez-Juez, Esteban
    Haworth, Daniel C.
    COMPUTER PHYSICS COMMUNICATIONS, 2019, 237 : 219 - 229