Code Smells Incidence: Does It Depend on the Application Domain?

Background: Code smells are considered detrimental to maintainability. To plan QA preventive initiatives (e.g. refactoring actions) it is important to know if the application domain is likely to affect the incidence of those problems. Objective: The main goal of this paper is to check if the application domain has a statistically significant impact on the incidence of code smells. Methods: We conducted a quasi-experiment using 118 Java applications, classified into 6 application domains, and including 7 types of code smells. To test the formulated hypotheses, we used the Kruskal-Wallis and ANOVA tests. Results: Our results show that the incidence of most code smells does not depend on the application domain, with the exception of Duplicated Code smell, where it was found that its incidence in the domain Home & Education is superior to the others. Limitations: This study was based on medium sized open source applications written in Java. Therefore, its external validity will be questionable outside this scope. Conclusions: For 6 out of 7 code smell types, our results corroborate previous studies where no difference could be found on code smells incidence across applications. However, statistically significant differences were found for the Duplicated Code (aka Clone) smell. This result confirmed the claim produced by Martin Fowler almost 20 years ago that software clones may be induced by the application domain.

[1]  Eleni Stroulia,et al.  JDeodorant: identification and application of extract class refactorings , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[2]  Tracy Hall,et al.  Code Bad Smells: a review of current knowledge , 2011, J. Softw. Maintenance Res. Pract..

[3]  Miryung Kim,et al.  A field study of refactoring challenges and benefits , 2012, SIGSOFT FSE.

[4]  Taghi M. Khoshgoftaar,et al.  Comparative Assessment of Software Quality Classification Techniques: An Empirical Case Study , 2004, Empirical Software Engineering.

[5]  Hiroaki Kobayashi,et al.  Identification and Elimination of Platform-Specific Code Smells in High Performance Computing Applications , 2015, Int. J. Netw. Comput..

[6]  Janice Singer,et al.  Guide to Advanced Empirical Software Engineering , 2007 .

[7]  Alexander Chatzigeorgiou,et al.  JDeodorant: Identification and Removal of Feature Envy Bad Smells , 2007, ICSM.

[8]  Carlos Fabio Ramos Conceicao,et al.  Streamlining Code Smells: Using Collective Intelligence and Visualization , 2014, 2014 9th International Conference on the Quality of Information and Communications Technology.

[9]  Linda H. Rosenberg,et al.  SOFTWARE METRICS AND RELIABILITY , 1998 .

[10]  Elisabetta Ronchieri,et al.  A Software Quality Model by Using Discriminant Analysis Predictive Technique , 2014, J. Integr. Des. Process. Sci..

[11]  Alexander Chatzigeorgiou,et al.  JDeodorant: Identification and Removal of Type-Checking Bad Smells , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[12]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[13]  Mangey Ram,et al.  A review on software reliability: metrics, models and tools , 2015 .

[14]  Frank Houdek,et al.  Empirical Studies of Object-Oriented Artifacts, Methods, and Processes: State of the Art and Future Directions , 1999, Empirical Software Engineering.

[15]  Stéphane Ducasse,et al.  Object-Oriented Metrics in Practice , 2005 .

[16]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[17]  Sébastien Gérard,et al.  First Experiments Using the UML Profile for MARTE , 2008, 2008 11th IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing (ISORC).

[18]  Forrest Shull,et al.  Domain-specific tailoring of code smells: an empirical study , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[19]  Martin Fowler,et al.  Analysis patterns - reusable object models , 1996, Addison-Wesley series in object-oriented software engineering.

[20]  Yann-Gaël Guéhéneuc,et al.  Domain matters: bringing further evidence of the relationships among anti-patterns, application domains, and quality-related metrics in Java mobile apps , 2014, ICPC 2014.

[21]  Bill Curtis,et al.  A field study of the software design process for large systems , 1988, CACM.

[22]  Dietmar Pfahl,et al.  Reporting Experiments in Software Engineering , 2008, Guide to Advanced Empirical Software Engineering.

[23]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[24]  Fernando Brito e Abreu,et al.  Streamlining Code Smells: Using Collective Intelligence and Visualization , 2014, QUATIC.

[25]  Francesca Arcelli Fontana,et al.  Investigating the Impact of Code Smells on System's Quality: An Empirical Study on Systems of Different Application Domains , 2013, 2013 IEEE International Conference on Software Maintenance.