Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1109/ESEM.2017.57acmconferencesArticle/Chapter ViewAbstractPublication PagesesemConference Proceedingsconference-collections
research-article

House of cards: code smells in open-source C# repositories

Published: 09 November 2017 Publication History

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.

References

[1]
M. Fowler, Refactoring: Improving the Design of Existing Programs, 1st ed. Addison-Wesley Professional, 1999.
[2]
G. Suryanarayana, G. Samarthyam, and T. Sharma, Refactoring for Software Design Smells: Managing Technical Debt, 1st ed. Morgan Kaufmann, 2014.
[3]
M. Tufano, F. Palomba, G. Bavota, R. Oliveto, M. Di Penta, A. De Lucia, and D. Poshyvanyk, "When and why your code starts to smell bad," in Proceedings of the 37th International Conference on Software Engineering-Volume 1. IEEE Press, 2015, pp. 403--414.
[4]
A. Yamashita and L. Moonen, "To what extent can maintenance problems be predicted by code smell detection? - An empirical study," Information and Software Technology, vol. 55, no. 12, pp. 2223--2242, 2013.
[5]
A. Yamashita and S. Counsell, "Code smells as system-level indicators of maintainability: An empirical study," The Journal of System and Software, vol. 86, no. 10, pp. 2639--2653, Oct. 2013.
[6]
F. A. Fontana, V. Ferme, A. Marino, B. Walter, and P. Martenka, "Investigating the Impact of Code Smells on System's Quality: An Empirical Study on Systems of Different Application Domains," in 2013 IEEE International Conference on Software Maintenance (ICSM). IEEE, Sep. 2013, pp. 260--269.
[7]
G. Bavota, A. De Lucia, M. Di Penta, R. Oliveto, and F. Palomba, "An experimental investigation on the innate relationship between quality and refactoring," Journal of Systems and Software, vol. 107, pp. 1--14, Jan. 2015.
[8]
S. Fu and B. Shen, "Code Bad Smell Detection through Evolutionary Data Mining," in International Symposium on Empirical Software Engineering and Measurement. IEEE, Nov. 2015, pp. 41--49.
[9]
T. Saika, E. Choi, N. Yoshida, S. Haruna, and K. Inoue, "Do Developers Focus on Severe Code Smells?" in 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER). IEEE, 2016, pp. 1--3.
[10]
S. Olbrich, D. S. Cruzes, V. Basili, and N. Zazworka, "The evolution and impact of code smells: A case study of two open source systems," in 2009 3rd International Symposium on Empirical Software Engineering and Measurement (ESEM). IEEE, Aug. 2009, pp. 390--400.
[11]
F. Khomh, M. Di Penta, and Y.-G. Guéhéneuc, "An Exploratory Study of the Impact of Code Smells on Software Change-proneness," in 2009 16th Working Conference on Reverse Engineering, Ecole Polytechnique de Montreal, Montreal, Canada. IEEE, Dec. 2009, pp. 75--84.
[12]
W. Li and R. Shatnawi, "An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution," Journal of Systems and Software, vol. 80, no. 7, pp. 1120--1128, Jul. 2007.
[13]
L. Guerrouj, Z. Kermansaravi, V. Arnaoudova, B. C. M. Fung, F. Khomh, G. Antoniol, and Y.-G. Guéhéneuc, "Investigating the relation between lexical smells and change- and fault-proneness: an empirical study," Software Quality Journal, pp. 1--30, May 2016.
[14]
J. Garcia, D. Popescu, G. Edwards, and N. Medvidovic, "Identifying Architectural Bad Smells," in CSMR '09: Proceedings of the 2009 European Conference on Software Maintenance and Reengineering. IEEE Computer Society, Mar. 2009, pp. 255--258.
[15]
F. Buschmann, R. Meunier, H. Rohnert, P. Sommerlad, and M. Stal, Pattern-Oriented Software Architecture Volume 1: A System of Patterns, 1st ed. Wiley, 1996.
[16]
N. Munaiah, S. Kroh, C. Cabrey, and M. Nagappan, "Curating github for engineered software projects," preprint available at PeerJ Preprints 4:e2617v1
[17]
T. Sharma, "Designite: A Customizable Tool for Smell Mining in C# Repositories," 10th Seminar on Advanced Techniques and Tools for Software Evolution, Madrid, Spain, 2017.
[18]
A. v. Deursen, L. Moonen, A. v. d. Bergh, and G. Kok, "Refactoring test code," in Proceedings of the 2nd International Conference on Extreme Programming and Flexible Processes (XP2001), M. Marchesi, Ed. University of Cagliari, 2001, pp. 92--95.
[19]
S. Chidamber and C. Kemerer, "A metrics suite for object oriented design," Software Engineering, IEEE Transactions on, vol. 20, no. 6, pp. 476--493, Jun 1994.
[20]
S. L. Abebe, S. Haiduc, P. Tonella, and A. Marcus, "The effect of lexicon bad smells on concept location in source code," in Proceedings - 11th IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2011, Fondazione Bruno Kessler, Trento, Italy. IEEE, Nov. 2011, pp. 125--134.
[21]
J. Bloch, Effective Java (2Nd Edition) (The Java Series), 2nd ed. Prentice Hall PTR, 2008.
[22]
T. Sharma, M. Fragkoulis, and D. Spinellis, "Does your configuration code smell?" in Proceedings of the 13th International Workshop on Mining Software Repositories, ser. MSR'16, 2016, pp. 189--200.
[23]
E. Connor and D. Simberloff, "Species number and compositional similarity of the galapagos flora and avifauna," Ecological Monographs, no. 48, pp. 219--248, 1978.
[24]
G. Czibula, Z. Marian, and I. G. Czibula, "Detecting software design defects using relational association rule mining," Knowledge and Information Systems, vol. 42, no. 3, pp. 545--577, Mar. 2015.
[25]
M. Abbes, F. Khomh, Y.-G. Gueheneuc, and G. Antoniol, "An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension," in 15th European Conference on Software Maintenance and Reengineering, ser. CSMR '11. IEEE Computer Society, 2011, pp. 181--190.
[26]
S. Counsell, R. M. Hierons, H. Hamza, S. Black, and M. Durrand, "Exploring the eradication of code smells: An empirical and theoretical perspective," Adv. Software Engineering, vol. 2010, pp. 820103:1--820103:12, 2010.
[27]
M. Gatrell, S. Counsell, and T. Hall, "Empirical Support for Two Refactoring Studies Using Commercial C# Software," in Proceedings of the 13th International Conference on Evaluation and Assessment in Software Engineering, ser. EASE'09. British Computer Society, 2009, pp. 1--10.

Cited By

View all
  • (2024)Multi-faceted Code Smell Detection at Scale using DesigniteJava 2.0Proceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3644881(284-288)Online publication date: 15-Apr-2024
  • (2024)Actionable code smell identification with fusion learning of metrics and semanticsScience of Computer Programming10.1016/j.scico.2024.103110236:COnline publication date: 1-Sep-2024
  • (2022)Analyzing the Relationship between Community and Design Smells in Open-Source Software Projects: An Empirical StudyProceedings of the 16th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3544902.3546249(23-33)Online publication date: 19-Sep-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ESEM '17: Proceedings of the 11th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement
November 2017
481 pages
ISBN:9781509040391

Sponsors

Publisher

IEEE Press

Publication History

Published: 09 November 2017

Check for updates

Author Tags

  1. C#
  2. code quality
  3. code smells
  4. design smells
  5. implementation smells
  6. maintainability

Qualifiers

  • Research-article

Conference

ESEM '17
Sponsor:

Acceptance Rates

Overall Acceptance Rate 130 of 594 submissions, 22%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Multi-faceted Code Smell Detection at Scale using DesigniteJava 2.0Proceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3644881(284-288)Online publication date: 15-Apr-2024
  • (2024)Actionable code smell identification with fusion learning of metrics and semanticsScience of Computer Programming10.1016/j.scico.2024.103110236:COnline publication date: 1-Sep-2024
  • (2022)Analyzing the Relationship between Community and Design Smells in Open-Source Software Projects: An Empirical StudyProceedings of the 16th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3544902.3546249(23-33)Online publication date: 19-Sep-2022
  • (2020)On the use of C# Unsafe Code ContextProceedings of the 14th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)10.1145/3382494.3422165(1-6)Online publication date: 5-Oct-2020
  • (2019)How deep is the mudProceedings of the Second International Conference on Technical Debt10.1109/TechDebt.2019.00018(59-60)Online publication date: 26-May-2019

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media