Advertisement

Method Level Code Smells: Chernoff Face Visualization

  • Salman Abdul MoizEmail author
  • Raghavendra Rao Chillarige
Conference paper
Part of the Learning and Analytics in Intelligent Systems book series (LAIS, volume 3)

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.

Keywords

Code smell Refactoring Long method Feature envy Chernoff faces 

References

  1. 1.
    Chernoff H (1973) The use of faces to represent points in K-dimensional space graphically. J Am Stat Assoc 68(342):361–368CrossRefGoogle Scholar
  2. 2.
    Yang HHL (2000) Mian Xiang: the Chinese art of face-reading made easy. Element, LondonGoogle Scholar
  3. 3.
    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, SingaporeGoogle Scholar
  4. 4.
    Fontana FA et al (2012) Automatic detection of bad smells in code: an experimental assessment. J Object Technol 11(2):5:1–38Google Scholar
  5. 5.
    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–1128CrossRefGoogle Scholar
  6. 6.
    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 maintenanceGoogle Scholar
  7. 7.
    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–53Google Scholar
  8. 8.
    Paiva T et al (2017) On the evaluation of code smells and detection tools. J Softw Eng Res Dev 5:7CrossRefGoogle Scholar
  9. 9.
    Kessentini WA (2014) A cooperative parallel search based software engineering approach for code smells detection. IEEE Trans Softw Eng 40:841–861CrossRefGoogle Scholar
  10. 10.
    Fowler MA (1999) Refactoring: improving the design of existing code. Addison-Wesley Professional, BostonGoogle Scholar
  11. 11.
    Azadi U, Fontana FA, Zanoni M (2018) Poster: machine learning based code smell detection through WekaNose. In: ICSE, pp 288–289Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Salman Abdul Moiz
    • 1
    Email author
  • Raghavendra Rao Chillarige
    • 1
  1. 1.School of Computer and Information SciencesUniversity of HyderabadHyderabadIndia

Personalised recommendations