Counting Constructors per Class

30 views
Skip to first unread message

Carina Oberle

unread,
Aug 25, 2016, 6:52:12 AM8/25/16
to Boa Language and Infrastructure User Forum
Hi,

I would like to know the average number of methods and constructors per class. 

For this I wrote a small Boa script, which outputs: 
  • ~7.3 methods per class
  • ~0.0006 constructors per class
I expected the number of constructors to be much higher and am wondering if I am missing something. Are the numbers reliable?

I identified constructors by matching method names with the current class name, since I did not find a way to check whether a method has no return type (also no void).

- Carina

Robert E Dyer

unread,
Aug 25, 2016, 8:57:59 AM8/25/16
to boa-...@googlegroups.com
Hi Carina,

In Boa, constructor methods are named ‘<init>’.  So that is how you can search for constructors!

We really should document this stuff better… I don’t think our Java -> Boa translation strategy is really obvious!

- Robert

--
More information about Boa: http://boa.cs.iastate.edu/
---
You received this message because you are subscribed to the Google Groups "Boa Language and Infrastructure User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boa-user+u...@googlegroups.com.
To post to this group, send email to boa-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

________________________________________________
Robert Dyer | Assistant Professor | Department of Computer Science
BGSU | rd...@bgsu.edu | 419.372.3469 | 244 Hayes | Bowling Green, OH

Want to mine ultra-large-scale software repositories with minimal initial
investment? Check out Boa! http://boa.cs.iastate.edu/

Reply all
Reply to author
Forward
0 new messages