Code evaluation using fuzzy logic

  • Authors:
  • Zikrija Avdagic;Dusanka Boskovic;Aida Delic

  • Affiliations:
  • Faculty of Electrical Engineering, University Sarajevo, Sarajevo, Bosnia and Herzegovina;Faculty of Electrical Engineering, University Sarajevo, Sarajevo, Bosnia and Herzegovina;Faculty of Electrical Engineering, University Sarajevo, Sarajevo, Bosnia and Herzegovina

  • Venue:
  • FS'08 Proceedings of the 9th WSEAS International Conference on Fuzzy Systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents application of a fuzzy logic based system to automatically evaluate the maintainability of code. Code evaluation is accomplished by rating its quality provided with bad smells in code as inputs. Straightforward bad smells with existing software metrics tools are selected as inputs: duplicated code, long methods, large classes having a high cyclomatic complexity, or a large number of parameters and temporary fields. Removing these bad smells can result in significant code improvements concerning readability and maintainability. However, the precise definition of attributes like small, long, large or high is not clear, and their identification is rather subjective. Fuzzy logic values are suitable for capturing partial correspondence to attributes and fuzzy rules model have been used to describe the relation between bad smells and code quality. Model supporting the experimental evaluation of the fuzzy based code evaluation is implemented in Java.