Newsgroup: comp.software-eng


Date: Fri, 14 Apr 2006 09:33:48 +0300
From: Diomidis Spinellis <dds@aueb.gr>
Organization: Athens University of Economics and Business
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0
MIME-Version: 1.0
Newsgroups: comp.software-eng,comp.lang.java.programmer
Subject: Open source Java metrics tool
Content-Type: text/plain; charset=ISO-8859-7; format=flowed
Content-Transfer-Encoding: 7bit
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.

-- 
Diomidis Spinellis                      Associate Professor
Department of Management Science and Technology      (DMST)
Athens University of Economics and Business          (AUEB)
http://www.dmst.aueb.gr/dds/             mailto:dds@aueb.gr



Newsgroup comp.software-eng contents
Newsgroup list
Diomidis Spinellis home page

Creative Commons License Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.