Abstract
Software that is badly written and prone to design problems often smells. Code smells results in design anomalies that make software hard to understand and maintain. Several tools and techniques available in literature helps in detection of code smells. But the severity of the smells in the code is often not known immediately as it lacks visualization. In this paper, two method level code smells namely long method and feature envy are visualized using chernoff faces. Techniques proposed in literature either use knowledge driven approach or data driven approach for code smell detection. In the proposed approach a fusion of both knowledge and data driven approach is used to identify the most relevant features. These most relevant features are mapped to the 15 desired features of chernoff faces to visualize the behavior of the code. The result shows that almost 95% of the smells are visualized correctly. This helps in analyzing the programmer’s capability in maintaining quality of source code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Chernoff H (1973) The use of faces to represent points in K-dimensional space graphically. J Am Stat Assoc 68(342):361–368
Yang HHL (2000) Mian Xiang: the Chinese art of face-reading made easy. Element, London
Guggulothu T, Moiz SA (2019) An approach to suggest code smell order for refactoring. In: Somani A, Ramakrishna S, Chaudhary A, Choudhary C, Agarwal B (eds) Emerging technologies in computer engineering: microservices in big data analytics. ICETCE 2019. Communications in computer and information science, vol 985. Springer, Singapore
Fontana FA et al (2012) Automatic detection of bad smells in code: an experimental assessment. J Object Technol 11(2):5:1–38
Li W, Shantnawi R (2007) An empirical study of the bad smells and class error probability in the past release object oriented system evolution. J Syst Softw 80:1120–1128
Stefen et al (2010) Are all code smells harmful? a study of God classes and Brain classes in the evolution of three open source systems. In: 26th IEEE international conference of software maintenance
Fontana FA et al (2015) Automatic metric threshold deviation for code smell detection. In: 6th international workshop on emerging trends in software metrics, pp 44–53
Paiva T et al (2017) On the evaluation of code smells and detection tools. J Softw Eng Res Dev 5:7
Kessentini WA (2014) A cooperative parallel search based software engineering approach for code smells detection. IEEE Trans Softw Eng 40:841–861
Fowler MA (1999) Refactoring: improving the design of existing code. Addison-Wesley Professional, Boston
Azadi U, Fontana FA, Zanoni M (2018) Poster: machine learning based code smell detection through WekaNose. In: ICSE, pp 288–289
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Moiz, S.A., Chillarige, R.R. (2020). Method Level Code Smells: Chernoff Face Visualization. In: Satapathy, S.C., Raju, K.S., Shyamala, K., Krishna, D.R., Favorskaya, M.N. (eds) Advances in Decision Sciences, Image Processing, Security and Computer Vision. ICETE 2019. Learning and Analytics in Intelligent Systems, vol 3. Springer, Cham. https://doi.org/10.1007/978-3-030-24322-7_63
Download citation
DOI: https://doi.org/10.1007/978-3-030-24322-7_63
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-24321-0
Online ISBN: 978-3-030-24322-7
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)