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

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

11 Citations (Scopus)

Abstract

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 (14.7 and 55.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.

Original languageEnglish
Title of host publicationProceedings - 11th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2017
PublisherIEEE
Pages424-429
Number of pages6
ISBN (Electronic)9781509040391
DOIs
Publication statusPublished - 7 Dec 2017
Externally publishedYes
Event11th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2017 - Toronto, Canada
Duration: 9 Nov 201710 Nov 2017

Publication series

NameInternational Symposium on Empirical Software Engineering and Measurement
Volume2017-November
ISSN (Print)1949-3770
ISSN (Electronic)1949-3789

Conference

Conference11th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2017
CountryCanada
CityToronto
Period9/11/1710/11/17

Keywords

  • C#
  • Code quality
  • Code smells
  • Design smells
  • Implementation smells
  • Maintainability

Fingerprint

Dive into the research topics of 'House of Cards: Code Smells in Open-Source C# Repositories'. Together they form a unique fingerprint.

Cite this