Seva's notes

Wisdom, Awareness, Responsibility :)

Java Code Structure and Dependencies Analysis Tools for Eclipse

with 4 comments

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.


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.

Written by Seva

2008-02-01 (February 1) at 02:25:44

4 Responses

Subscribe to comments with RSS.

  1. 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


    2008-02-27 (February 27) at 10:22:22

  2. Hi Seva,

    If you have the time and it is still relevent to you, you might also look at Structure101,



    2008-04-17 (April 17) at 04:07:07

  3. There is another tool available by now for this kind of purpose: Degraph

    It allows to group classes in modules, layers or whatever kind of slicing you come up with.

    Jens Schauder

    2013-04-25 (April 25) at 01:42:50

  4. Johannes Zillmann

    2013-12-17 (December 17) at 11:39:39

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: