“House of Cards: Code Smells in Open-source C# Repositories” – ESEM 2017

House of cards

“House of Cards: Code Smells in Open-source C# Repositories” to appear in ESEM 2017.

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 be- tween 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.

Authors

Tushar Sharma, Marios Fragkoulis, Diomidis Spinellis

Preprint

The preprint of the paper can be found here.

Author: Tushar

Tushar Sharma is a software engineering researcher, developer, and author. He is currently a Research Scientist at Siemens Corporate Technology, Charlotte, USA. The topics related to software design and architecture, refactoring, software quality (specifically code and design quality), and technical debt define his career interests. He earned PhD from Athens University of Economics and Business, Athens, Greece with specialization in software engineering in May 2019. Earlier, he obtained an MS in Computer Science from the Indian Institute of Technology-Madras, Chennai, India. His professional experience includes working with Siemens Research and Technology Center, Bangalore, India for more than seven years (2008-2015). He co-authored the book Refactoring for Software Design Smells: Managing Technical Debt and two Oracle Java certification books. He has founded and developed Designite which is a software design quality assessment tool used by many practitioners and researchers worldwide. He is an IEEE Senior Member.