D
Diomidis Spinellis
Following a lengthy beta testing period, I'm happy to announce the
public availability of the ckjm Java metrics tool. The tool is
available as open-source software at <http://www.spinellis.gr/sw/ckjm/>.
Ckjm calculates Chidamber and Kemerer object-oriented metrics by
processing the bytecode of compiled Java files. The program calculates
for each class the following six metrics proposed by Chidamber and Kemerer.
* WMC: Weighted methods per class
* DIT: Depth of Inheritance Tree
* NOC: Number of Children
* CBO: Coupling between object classes
* RFC: Response for a Class
* LCOM: Lack of cohesion in methods
In addition it also calculates for each class
* Ca: Afferent couplings
* NPM: Number of public methods
I wrote this program out of frustration over the lack of reliable
programs to calculate the Chidamber and Kemerer object-oriented metrics
I needed to illustrate some concepts in my new and recently published
book Code Quality: The Open Source Perspective (Addison-Wesley 2006)
<http://www.spinellis.gr/codequality?ckjm>. The programs I found on the
web were either incomplete (they calculated only some of the metrics),
or unreliable (they calculated results that were obviously wrong), or
extremely inefficient (they required GB of RAM and hours of processing).
Ckjm is mean and lean, following the Unix tradition of doing one thing
well. It will not automatically recurse directories looking for the
files you want measured and it does not offer a GUI. However, it does
this job thoroughly, and efficiently: on a 1.6GHz Pentium-M machine it
will process the 33MB of the Eclipse 3.0 jar files (19717 classes) in 95
seconds.
public availability of the ckjm Java metrics tool. The tool is
available as open-source software at <http://www.spinellis.gr/sw/ckjm/>.
Ckjm calculates Chidamber and Kemerer object-oriented metrics by
processing the bytecode of compiled Java files. The program calculates
for each class the following six metrics proposed by Chidamber and Kemerer.
* WMC: Weighted methods per class
* DIT: Depth of Inheritance Tree
* NOC: Number of Children
* CBO: Coupling between object classes
* RFC: Response for a Class
* LCOM: Lack of cohesion in methods
In addition it also calculates for each class
* Ca: Afferent couplings
* NPM: Number of public methods
I wrote this program out of frustration over the lack of reliable
programs to calculate the Chidamber and Kemerer object-oriented metrics
I needed to illustrate some concepts in my new and recently published
book Code Quality: The Open Source Perspective (Addison-Wesley 2006)
<http://www.spinellis.gr/codequality?ckjm>. The programs I found on the
web were either incomplete (they calculated only some of the metrics),
or unreliable (they calculated results that were obviously wrong), or
extremely inefficient (they required GB of RAM and hours of processing).
Ckjm is mean and lean, following the Unix tradition of doing one thing
well. It will not automatically recurse directories looking for the
files you want measured and it does not offer a GUI. However, it does
this job thoroughly, and efficiently: on a 1.6GHz Pentium-M machine it
will process the 33MB of the Eclipse 3.0 jar files (19717 classes) in 95
seconds.