Abstract:
Purpose: Source code is core of Software engineering. Source code of good quality can
be maintained and upgraded easily. Measurement of code quality is important from
various views like from developer’s point of view, from manager’s point of view and
from end user’s point of view. Main issue in measurement of quality is that quality it
needs to be measured from different aspects of software. Methodology: Source code
quality can be broken down in factors like maintainability, reusability, change
proneness, testability and stability. These quality factors are high level representation
of code quality and cannot be measured directly. In order to calculate quality factors
there is need for calculations for certain aspects of software code at lower level.
Research in field of source code quality has proposed enormous amount of code metrics
that measure quality in different aspects like complexity, size, coupling, cohesion and
abstractness etc. This study proposes a framework named Object Oriented Code
Quality Meter (OOCQM) for measuring source code quality of object-oriented code
using low level code metrics and high-level quality factors. Code metrics has a proven
relationship with quality factors. This relationship is used to calculate a numerical
value for quality factors based on metric values. It is observed that all selected metrics
has negative correlation with mapped quality factor. Quality factors scores are
aggregated and used to depict quality of code in numerical form. A PHP based tool is
developed to validate the results. Results: Framework results are compared with
Maintainability Index (MI) which is popular quality measure in terms of code
maintainability. OOCQM measures code quality correctly as quality results are correct
according to MI. This framework provides more detail at individual quality factors
level. OOCQM is compared with few other tools developed for quality measurement.
Comparison shows that this tool supports more quality factors analysis than other tools.