This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 24244 - Add SLOC metric
Summary: Add SLOC metric
Status: RESOLVED WONTFIX
Alias: None
Product: obsolete
Classification: Unclassified
Component: metrics (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: _ tball
URL:
Keywords:
Depends on: 24246 24247
Blocks:
  Show dependency tree
 
Reported: 2002-05-30 12:53 UTC by nczempin
Modified: 2002-12-19 22:15 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nczempin 2002-05-30 12:53:51 UTC
Many uses of metrics use Source Lines of Code (SLOC) to compare things 
against.
For example, currently the Netbeans core module currently 
has by far the most defects assigned. Notwithstanding the probably 
fairly low accuracy of Issuezilla issue counts (e. g. almost all these 
core bugs are P3, so what do we need the other Ps for :-), it would be a useful 
piece of information to compare issue counts against code size. So 
perhaps the number of bugs is simply so big because there's so much 
code.
While there are many many problems with the metric, and it can 
easily be abused (this of course holds for any other metrics as well), I 
think it would make a worthy addition to the metrics module.

Even mere 
counting of lines (without needing precise definition of whether to 
include comments, blank lines, and exactly what a SLOC is) would serve as a 
good start.

Currently, the given metrics are hard-coded, and it is 
planned that they become dynamically loadable. Perhaps this metric 
would be a good testbed for that idea.

Also, the current metrics 
depend solely on analyzing the byte code. SLOC would require decoupling 
the analysis from class files.
Comment 1 _ tball 2002-05-30 18:59:30 UTC
<i>Also, the current metrics 
depend solely on analyzing the byte code. SLOC would require decoupling 
the analysis from class files.</i>

That's only true if you want a total line count of the source file. 
One can count the number of lines containing source that actually
translate into code by counting the number of line number entries in
the classfile.
Comment 2 _ tball 2002-07-12 05:49:18 UTC
I'd like to create this as an example module showing how to extend the
metrics module.
Comment 3 _ tball 2002-12-19 22:15:21 UTC
The metrics module now has the ability for developers to easily create
and plug-in new metrics without having to modify the metrics module
itself.  Check out the metrics/examples directory for an example
metric you can use to create this metric.