| Categorizing Code Using Software Metrics |
|
|
Categorizing Code Using Software MetricsIn general categorizing or stereotyping things, places or objects enables us to imagine common properties of a thing by just referring to the category. In way categorization helps to predict what can be expected from a category of objects, and prediction helps us in planning. So, categorizing code using metrics or quality attributes of code would help us predict and plan no matter if the project is in development, maintenance, open source or bought out. For eg. categorizing files based on their "Maintainability Index" metric would help us predict the future maintainability of the system. Analys4j's automated software metrics, graphs and categorization interface helps you to categorize code based on metrics.(List of metrics) Lets study this using 'SEI Maintainability Index' SEI Maintainability Index Metric, is being widely use to understand the maintainability by analyzing the source code. Analyst4j automates the measurement of MI. Though categorization is useful, the thresholds which are used to categorize is of prime importance because we intend to make important decision based on these categorization. Metrics threshold can be set using empirical methods or well citied research works. Empirical methods could be time consuming, Analyst4j saves time by sourcing the metrics and providing an environment to find,visualize and analyze software metrics. A quicker methods to find a threshold for a metric would be adopt other research works carried on the metric in concern. For eg. In a major research effort due to Hewlett Packard, the following thresholds for the evaluation of the maintainability index, calculated by means of the previous models, have been determined:
Reference: http://www.stsc.hill.af.mil/crosstalk/2001/08/liso.html Categorizing MI using the above thresholds with Analyst4j. JFreechart is a well maintained free charting component written using Java, infact Analyst4j uses JFreechart for visualizing metrics distribution, comparison and analysis. Analysis report of two version of JFreechart source
Categorized results and Comparison
(*)junit testing packages/files were excluded. (+) On Pentium IV, 2.66 G Hz, 512 MB Ram It can be conclude that JFreechart seems to have excellent maintainability, and improvements(changes) does not deter the maintainability. However the following cases has to be in safe hands during changes and improvement.
The above was prepared using "Copy to Clipboard" option, in QA Cases View of Analyst4j. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < Prev | Next > |
|---|