A Systematic Literature Review: Code Bad Smells in Java Source Code

Code smell is an indication of a software designing problem. The presence of code smells can have a severe impact on the software quality. Smells basically refers to the structure of the code which violates few of the design principals and so has negative effect on the quality of the software. Larger the source code, more is its presence. Software needs to be reliable, robust and easily maintainable so that it can minimize the cost of its development as well as maintenance. Smells may increase the chances of failure of the system during maintenance. A SLR has been performed based on the search of digital libraries that includes the publications since 1999 to 2016. 60 research papers are deeply analyzed that are most relevant. The objective of this paper is to provide an extensive overview of existing research in the field of bad smells, identify the detection techniques and correlation between the detection techniques, in addition to find the name of the code smells that need more attention in detection approaches. This SLR identified that code clone (code smell) receives most research attention. Our findings also show that very few papers report on the impact of code bad smells. Most of the papers focused on the detection techniques and tools. A significant correlation between detection techniques has been calculated. There are four code smells that are not yet detected are Primitive Obsession, Inappropriate Intimacy, Incomplete library class and Comments.

[1]  Bartosz Walter,et al.  The relationship between design patterns and code smells: An exploratory study , 2016, Inf. Softw. Technol..

[2]  Premkumar T. Devanbu,et al.  Clones: What is that smell? , 2010, MSR.

[3]  Francesca Arcelli Fontana,et al.  Filtering code smells detection results , 2015, ICSE 2015.

[4]  Aiko Yamashita,et al.  Assessing the capability of code smells to explain maintenance problems: an empirical study combining quantitative and qualitative data , 2013, Empirical Software Engineering.

[5]  Marouane Kessentini,et al.  What you like in design use to correct bad-smells , 2012, Software Quality Journal.

[6]  M.J. Munro,et al.  Product Metrics for Automatic Identification of "Bad Smell" Design Problems in Java Source-Code , 2005, 11th IEEE International Software Metrics Symposium (METRICS'05).

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

[8]  Zhendong Niu,et al.  Schedule of Bad Smell Detection and Resolution: A New Way to Save Effort , 2012, IEEE Transactions on Software Engineering.

[9]  Chris Parnin,et al.  A catalogue of lightweight visualizations to support code smell inspection , 2008, SOFTVIS.

[10]  M. Mäntylä,et al.  Subjective evaluation of software evolvability using code smells: An empirical study , 2006, Empirical Software Engineering.

[11]  Pearl Brereton,et al.  Performing systematic literature reviews in software engineering , 2006, ICSE.

[12]  José Amancio M. Santos,et al.  An exploratory study to investigate the impact of conceptualization in god class detection , 2013, EASE '13.

[13]  Nakarin Maneerat,et al.  Bad-smell prediction from software design model using machine learning techniques , 2011, 2011 Eighth International Joint Conference on Computer Science and Software Engineering (JCSSE).

[14]  Alexander Chatzigeorgiou,et al.  Investigating the evolution of code smells in object-oriented systems , 2014, Innovations in Systems and Software Engineering.

[15]  Aiko Fallas Yamashita,et al.  To what extent can maintenance problems be predicted by code smell detection? - An empirical study , 2013, Inf. Softw. Technol..

[16]  Zsuzsanna Marian,et al.  Detecting software design defects using relational association rule mining , 2013, Knowledge and Information Systems.

[17]  Foutse Khomh,et al.  An Empirical Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, on Program Comprehension , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[18]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[19]  Nicholas A. Kraft,et al.  Clone evolution: a systematic review , 2011, J. Softw. Evol. Process..

[20]  Michael W. Godfrey,et al.  “Cloning considered harmful” considered harmful: patterns of cloning in software , 2008, Empirical Software Engineering.

[21]  Daniela Cruzes,et al.  The evolution and impact of code smells: A case study of two open source systems , 2009, 2009 3rd International Symposium on Empirical Software Engineering and Measurement.

[22]  Wang Tiantian,et al.  Detecting Bad Smells with Weight Based Distance Metrics Theory , 2012, 2012 Second International Conference on Instrumentation, Measurement, Computer, Communication and Control.

[23]  Raed Shatnawi,et al.  An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution , 2007, J. Syst. Softw..

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

[25]  Tibor Bakota,et al.  Tracking the Evolution of Code Clones , 2011, SOFSEM.

[26]  Lerina Aversano,et al.  An empirical study on the maintenance of source code clones , 2010, Empirical Software Engineering.

[27]  Steffen Becker,et al.  Combining clustering and pattern detection for the reengineering of component-based software systems , 2011, QoSA-ISARCS '11.

[28]  Gabriele Bavota,et al.  Detecting bad smells in source code using change history information , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[29]  Daniela Cruzes,et al.  Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems , 2010, 2010 IEEE International Conference on Software Maintenance.

[30]  Steve Counsell,et al.  Code smells as system-level indicators of maintainability: An empirical study , 2013, J. Syst. Softw..

[31]  Alexander Chatzigeorgiou,et al.  Identification of Refused Bequest Code Smells , 2013, 2013 IEEE International Conference on Software Maintenance.

[32]  Tracy Hall,et al.  Improving the Precision of Fowler's Definitions of Bad Smells , 2008, 2008 32nd Annual IEEE Software Engineering Workshop.

[33]  Francesca Arcelli Fontana,et al.  Including structural factors into the metrics-based code smells detection , 2015, XP Workshops.

[34]  Yann-Gaël Guéhéneuc,et al.  From a domain analysis to the specification and detection of code and design smells , 2010, Formal Aspects of Computing.

[35]  Foutse Khomh,et al.  An Exploratory Study of the Impact of Code Smells on Software Change-proneness , 2009, 2009 16th Working Conference on Reverse Engineering.

[36]  Foutse Khomh,et al.  An exploratory study of the impact of antipatterns on class change- and fault-proneness , 2011, Empirical Software Engineering.

[37]  Yu Chin Cheng,et al.  Elsevier Editorial System(tm) for Journal of Systems and Software Manuscript Draft Exception Handling Refactorings: Directed by Goals and Driven by Bug Fixing , 2022 .

[38]  Foutse Khomh,et al.  IDS: An Immune-Inspired Approach for the Detection of Software Design Smells , 2010, 2010 Seventh International Conference on the Quality of Information and Communications Technology.

[39]  Alexander Chatzigeorgiou,et al.  Investigating the Evolution of Bad Smells in Object-Oriented Code , 2010, 2010 Seventh International Conference on the Quality of Information and Communications Technology.

[40]  Yann-Gaël Guéhéneuc,et al.  A Domain Analysis to Specify Design Defects and Generate Detection Algorithms , 2008, FASE.

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

[42]  Houari A. Sahraoui,et al.  Prioritizing code-smells correction tasks using chemical reaction optimization , 2015, Software Quality Journal.

[43]  Premkumar T. Devanbu,et al.  Clones: what is that smell? , 2010, 2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010).

[44]  Marouane Kessentini,et al.  A New Design Defects Classification: Marrying Detection and Correction , 2012, FASE.

[45]  Cláudio Sant'Anna,et al.  Identifying Code Smells with Multiple Concern Views , 2010, 2010 Brazilian Symposium on Software Engineering.

[46]  Mika Mäntylä,et al.  Comparing and experimenting machine learning techniques for code smell detection , 2015, Empirical Software Engineering.

[47]  Houari A. Sahraoui,et al.  A Cooperative Parallel Search-Based Software Engineering Approach for Code-Smells Detection , 2014, IEEE Transactions on Software Engineering.

[48]  Francesca Arcelli Fontana,et al.  An Experience Report on Using Code Smells Detection Tools , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[49]  Maninder Singh,et al.  Software clone detection: A systematic review , 2013, Inf. Softw. Technol..

[50]  S. Counsell,et al.  The ‘deception’ of code smells: An empirical investigation , 2010, Proceedings of the ITI 2010, 32nd International Conference on Information Technology Interfaces.

[51]  Foutse Khomh,et al.  Tracking Design Smells: Lessons from a Study of God Classes , 2009, 2009 16th Working Conference on Reverse Engineering.

[52]  S. A. Sahaaya Arul Mary,et al.  Agent based tool for topologically sorting badsmells and refactoring by analyzing complexities in source code , 2013, 2013 Fourth International Conference on Computing, Communications and Networking Technologies (ICCCNT).

[53]  Marouane Kessentini,et al.  Competitive Coevolutionary Code-Smells Detection , 2013, SSBSE.

[54]  Rainer Koschke,et al.  Studying clone evolution using incremental clone detection , 2013, J. Softw. Evol. Process..

[55]  Pierre Poulin,et al.  Visual Detection of Design Anomalies , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[56]  P. Danphitsanuphan,et al.  Code Smell Detecting Tool and Code Smell-Structure Bug Relationship , 2012, 2012 Spring Congress on Engineering and Technology.

[57]  A. Yamashita,et al.  Exploring the impact of inter-smell relations on software maintainability: An empirical study , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[58]  Audris Mockus,et al.  Quantifying the Effect of Code Smells on Maintenance Effort , 2013, IEEE Transactions on Software Engineering.

[59]  Nenad Medvidovic,et al.  Are automatically-detected code anomalies relevant to architectural modularity?: an exploratory analysis of evolving systems , 2012, AOSD.

[60]  Raed Shatnawi,et al.  An Investigation of Bad Smells in Object-Oriented Design , 2006, Third International Conference on Information Technology: New Generations (ITNG'06).

[61]  Jochen Kreimer,et al.  Adaptive Detection of Design Flaws , 2005, LDTA@ETAPS.

[62]  Yi Sun,et al.  Some Code Smells Have a Significant but Small Effect on Faults , 2014, TSEM.

[63]  Mehmet S. Aktas,et al.  On the Structural Code Clone Detection Problem: A Survey and Software Metric Based Approach , 2014, ICCSA.

[64]  Houari A. Sahraoui,et al.  Search-Based Design Defects Detection by Example , 2011, FASE.

[65]  Andrew P. Black,et al.  An interactive ambient visualization for code smells , 2010, SOFTVIS '10.

[66]  Aakanshi Gupta,et al.  A Survey on Code Clone, Its Behavior and Applications , 2018 .

[67]  Ghulam Rasool,et al.  A review of code smell mining techniques , 2015, J. Softw. Evol. Process..