Java Code Structure and Dependencies Analysis Tools for Eclipse
One of my first assignments at the new company (remember, I left Zend previous week), was analysing existing projects structure. Which means distribution of classes into packages, package dependencies, libraries usage etc.
The results, I would say, were far from being perfect, but I can bet, most of large (and especially proprietary) projects would look similar or even worse. But this is not what I was going to say.
What I am going to say, is for this purpose I evaluated several analysis tools and I want to share my opinion about them.
Here they are (in order of evaluation).
1. Eclipse Metrics(1) (CPL)
Pros: Runs fast, provides tangle detector.
Cons: Dependencies graph is not usable with large projects. No text output of dependencies is available.
2. Eclipse Metrics(2) (CPL)
Pros: no.
Cons: Does not analyze dependencies.
2. JDepend
Pros: Nice and simple UI, fast analysis.
Cons: Provides neither graph nor detailed dependency cycles information, doesn’t provide links to source.
3. eDepend (Commercial)
Pros: full featured graphic dependency analyzer, allows filtering on dependency kind
Cons: Commercial, creates disproportedly wide graphs for large projects that are hard to maintain, very slow analyzing and graph creation, doesn’t provide info on elements which depend on selected element.
4. stan4j (Free Beta)
Pros: Full featured graphic dependency analyzer, very cute GEF based UI, cycles and tangles visualizer, very convenient eclipse integration, report/graphics export ability.
Cons: Does not provide recursive dependency paths on selected elements, does not provide inter-package class dependencies information, non graphical views improvement is suggested.
Conclusion
In the end, in order to perform my task I’ve mostly used stan4j, sometimes switched to eDepend
and once or twice times executed JDepend - each of them has its specific advantages.
Blog RSS feed
Coverity Prevent, a static source code analysis tool can fix critical defects like memory leak, array overrun, uninitialized data, dangling pointer etc.
Defects in multithreaded application development like Thread block, Dead lock and Race conditions can also be solved using Coverity Prevent.
Coverity has customers like Symbian, RIM (Blackberry), Juniper networks, Cisco, Texas instruments and is also used by the Department of Homeland security to scan lots of open source projects. You can get more info at http://www.Coverity.com.
Michael
2008-02-27 (February 27) at 10:22:22
Hi Seva,
If you have the time and it is still relevent to you, you might also look at Structure101, http://www.headwaysoftware.com/products/structure101.
Cheers,
Paul
Paul
2008-04-17 (April 17) at 04:07:07