Simple Code Metrics - plugin detail

Simple Code Metrics measure code metrics like: lines of code, number of classes and methods, cyclomatic complexity, LCOM (Lack of Cohesion in Methods) - variants 1 to 4. It can not only work with a single java source file, but also with packages(even with a whole tree of source packages). Using it you can automatically find for example 5 methods with the highest cyclomatic complexity or 3 packages with the highest average LCOM 4 score. Behaviour of the plugin can be easily customised through options(tools-options-miscellaneous-SCM Options)

NetBeans Plugin - Simple Code Metrics
Plugin owner: k_debski
Website:
Added: 2008-05-19
License: GPL v3
Category:
Downloaded: 15,227 times
Rating:
 4.22, by 5 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.08 MB   Last Update: 1970-01-01

What's new in this version



Verifications for NetBeans versions

Plugin is not subject to any verification



Introduction

Simple Code Metrics measure code metrics and statistics like:
  • lines of code
  • number of classes
  • number of methods
  • cyclomatic complexity
  • LCOM (Lack of Cohesion in Methods) - variants 1 to 4
  • lines with imports
  • blank lines

Using it you can automatically find for example 5 methods with the highest cyclomatic complexity or 3 packages with the highest average LCOM 4 score.

Quick tutorial:
  1. Install plugin
  2. Go to tools-options-miscellaneous-SCM Options and choose metrics
  3. Open the project which is going to be measured
  4. Select a single node with java source file or a package. If it a package all packages and classes below are going to be measured. All non java files will be skipped. To measure the whole project select "Source Packages" node.
  5. Click "SCM" icon(Should be on your Edit toolbar)
  6. Open output window (CTRL+4 by default).
  7. Choose "Analyse of ...".

Limitations:
  • No support for inner classes
  • Local variables can not hide class variables

[ You have to be logged in to be able to comment. ]

User Comments

  

References to LCOM1, LCOM2, LCOM3, LCOM4

Hi

What are the definitions of the metrics LCOM1, LCOM2, LCOM3 and LCOM4?
Posted by FernandoUFLA on Jan 08, 2013
  

I have updated this plugin to work with NB 7.1

How I can do to send it? Make a project at Google Code?
Posted by mosca_morta on Mar 12, 2012
  

This doesn't work in NB 6.9.1.

There's an "SCM" icon at the top bar but it's not clickable. Then again, I see that it's been an eternity in software years since this has been updated...
Posted by Zerex71 on Sep 21, 2011
  

How can I interpret results?

Nice program thanks.This is exactly what I need to assess the OO degree of my codes.However, I dont understand the points that program gives as output.Can you explain it briefly?BTW: I have an idea about metrics as a beginner.
Posted by cananhas on Mar 07, 2011
  

Great Plugin!

Hi!

Great plugin, very interesting statistics!
Performance could be a little bit better.

Thank!
Posted by t3_chris on Nov 04, 2009
  

Doesn't work in NetBeans 6.5 RC1

Doesn't work in NetBeans 6.5 RC1. Tools->Options->SCM Options tab is broken.

Can this be configured to count all non-comment & non-blank lines. i.e include only the package definition, import statements and all non-blank lines.
Posted by darvar on Oct 22, 2008
  

How do you define LCOM

How do you define Lack of Cohesion in Methods and what are variants 1 to 4?
Posted by maksym on Jul 14, 2008
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo