Skip to main content

An Approach for Source Code Classification Using Software Metrics and Fuzzy Logic to Improve Code Quality with Refactoring Techniques

  • Conference paper

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 181))

Abstract

The problem of developing software quality is developer’s experience which has different style and does not care about coding with principle that causes error or even bad smell. To reduce the risk of causing bad smell, the developer should concern with a good design principle and coding well. In addition, knowing the qualification and the characteristic of code is also important to promptly support verifying, recovering bad smell and improving them to be a good code. This research presents an approach for source code classification using software metrics and fuzzy logic to improve code quality with refactoring techniques. Our approach composed of 3 main sections; Source code definition with metrics and evaluation to classify source code type, Source code classification with fuzzy logic and Source code improvement with refactoring. The result of our approach is able to classify source code in type correctly and improve bad smell, ambiguous code to be a clean code.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   129.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Kay, A.C.: The Early History of Smalltalk, pp. 69–95 (1993)

    Google Scholar 

  2. Boehm, B.W., Basili, V.R.: Software Defect Reduction Top 10 List.  IEEE Computer 34(1), 135–137 (2001)

    Article  Google Scholar 

  3. Meesad, P.: Fuzzy Logic. Fuzzy systems and Neural Networks Lecture. Faculty of Information Technology, King Mongkut’s University of Technology North, Bangkok

    Google Scholar 

  4. Stroggylos, K., Spinellis, D.: Refactoring-Does It Improve Software Quality? In: Stroggylos, K., Spinellis, D. (eds.) 5th International Workshop on Software Quality, vol. 10, IEEE Computer Society, Los Alamitos (2007)

    Google Scholar 

  5. Zadeh, L.A.: Fuzzy Sets.  Information and Control 8, 338–353 (1965)

    Article  MathSciNet  MATH  Google Scholar 

  6. Zadeh, L.A.: Is There a Need for Fuzzy Logic? Fuzzy Information Processing Society, Annual Meeting of the North American 178(13), 2751–2779 (2008)

    MathSciNet  MATH  Google Scholar 

  7. Zadeh, L.A.: Toward a Perception-Based Theory of Probabilistic Reasoning with imprecise probabilities. Special Issue on Imprecise Probabilities, Journal of Statistical Planning and Inference 105, 233–264 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  8. Zadeh, L.A.: Toward a theory of fuzzy information granulation and its centrality in human reasoning and fuzzy logic. Fuzzy Sets Systems 90(2), 111–127 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  9. Zadeh, L.A., Klir, G.J., Bo, Y.: Fuzzy Sets, Fuzzy Logic, and Fuzzy Systems. In: Advances in Fuzzy Systems - Applications and Theory, vol. 6, World Scientific Pub Co. Inc, Singapore (1996)

    Google Scholar 

  10. Fowler, M.: Refactoring: Improving the Design of Existing Code. XP/Agile Universe (2002)

    Google Scholar 

  11. Halstead, M.H.: Elements of Software Science. In: Operating and programming systems series, Elsevier Science Inc., New York (1977)

    Google Scholar 

  12. Mäntylä, M., Vanhanen, J., Lassenius, C.: A Taxonomy and an Initial Empirical Study of Bad Smells in Code. In: International Conference on Software Maintenance, pp. 381–384 (2003)

    Google Scholar 

  13. Fenton, N.E.: Software Metrics, A Rigorous Approach. Chapman & Hall, London (1991)

    Google Scholar 

  14. Drucker, P.: Innovation and Entrepreneurship. Collins (1985)

    Google Scholar 

  15. Crosby, P.: Quality is Free. McGraw-Hill, New York (1979)

    Google Scholar 

  16. Martin, R.C.: Clean Code. A Handbook of Agile Software Craftsmanship. Prentice-Hall, Englewood Cliffs (2008)

    Google Scholar 

  17. Chidamber, S.R., Kemerer, C.F.: A Metrics Suite for Object Oriented Design. IEEE Trans. Software Eng. 20(6), 476–493 (1994)

    Article  Google Scholar 

  18. Chidamber, S.R., Kemerer, C.F.: Towards a Metrics Suite for Object Oriented Design. In: OOPSLA, pp. 197–211 (1991)

    Google Scholar 

  19. Feldman, S.I., Kay, A.C.: A conversation with Alan Kay. ACM Queue 2(9), 20–30 (2004)

    Article  Google Scholar 

  20. McCabe, T.J.: A Complexity Measure. IEEE Trans. Software Eng. SE-2(4), 308–320 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  21. Ruhroth, T., Voigt, H., Wertheim, H.: Measure, Diagnose, Refactor: A Formal Quality Cycle for Software Models. In: 35th EUROMICRO-SEAA, pp. 360–367 (2009)

    Google Scholar 

  22. DeMarco, T.: Controlling Software Projects: Management, Measurement, and Estimates. Prentice-Hall, Englewood Cliffs (1986)

    Google Scholar 

  23. Mens, T., Tourwé, T.: A Survey of Software Refactoring.  IEEE Trans. Software Eng. 30(2), 126–139 (2004)

    Article  Google Scholar 

  24. Alan Curtis Kay, http://en.wikiquote.org/wiki/Alan_Kay

  25. Code smell, http://en.wikipedia.org/wiki/Code_smell

  26. Fuzzy Logic, http://en.wikipedia.org/wiki/Fuzzy_logic

  27. Software Quality, http://en.wikipedia.org/wiki/Software_quality

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lerthathairat, P., Prompoon, N. (2011). An Approach for Source Code Classification Using Software Metrics and Fuzzy Logic to Improve Code Quality with Refactoring Techniques. In: Zain, J.M., Wan Mohd, W.M.b., El-Qawasmeh, E. (eds) Software Engineering and Computer Systems. ICSECS 2011. Communications in Computer and Information Science, vol 181. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22203-0_42

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-22203-0_42

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-22202-3

  • Online ISBN: 978-3-642-22203-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics