IBM releases new Java structure analysis tool


News: IBM releases new Java structure analysis tool

  1. IBM releases new Java structure analysis tool (16 messages)

    IBM has released a preview of a new free tool called Structural Analysis for Java (SA4J). The tools aims to automatically detect and pinpoint architectural weaknesses. This tool is a collaboration between the expertise of Rational with IBM's testing and analysis know-how. It uses algorithms to hunt out antipatterns.

    "SA4J provides mathematically proven ways of determining the quality of the architecture, and this assessment can be used as a basis for deciding whether to reuse or modify existing Java code. If code is marked as unstable, even the smallest change in the architecture can result in unexpected delays in development as well as potentially more defects."


    IBM looks to boost Java apps analysis

    IBM releases new Java structure analysis tool

    Structural Analysis for Java Home Page

    Threaded Messages (16)

  2. What happened to SmallWorlds?[ Go to top ]

    Is this tool from the SmallWorlds codebase? After IBM bought the company, I haven't heard anything about the SmallWorlds product suite? As a former user, I think SmallWorlds was one the best graphical code analysis tools ever.
  3. Architectural flaw detected[ Go to top ]

    Architectural flaw detected: You are using Entity Beans!

  4. This sounds like SmallWorlds II[ Go to top ]

    After reading the BIOs of the software authors, one could presume that this is the follow-on to SmallWorlds after IBM bought it.
  5. Yep, it is SmallWorlds[ Go to top ]

    I guess it is Smallworlds, UI hasn't changed at all. Seems to be faster than the previous version. Still need to see how it performs with a larger code base. But, glad to see it availble again.
  6. In other news...[ Go to top ]

    IBM develops internal version of JDepend, packages it with a windows only installation tool, and releases it with accompanying fanfare and marketecture.

    Oh wait, sorry for the duplicate posting. ;)

    (On the plus side, hopefully this gets more people thinking about the importance of minimizing dependencies as it relates to future enhancements and maintenance. In a word: "architecture".)
  7. just tested it. it's a tool that will help a lot on redesigning apps.
  8. Anyone care to share their thoughts on this tool versus Jdepend and Pasta/Optimal Advisor? I really like Optimal Advisor but we could never get it to work under AIX as it seemed to be reliant on Sun.* classes that don't exist on IBM's AIX JDK.
  9. Is this to compete with Wily and JProbe? Is the most common error message, you are using Websphere, run:) This looks interesting, as I have to use websphere a lot.
  10. I have been trying to sell a project to rewrite a very poorly designed component of one of our clients' Enterprise Apps.

    Now I can actually show my boss that this particular component has a stability rating of 62% according to SA4J, compared to 96% of the entire system.

    And, now on the other end... I have been playing with it for a while, and I noticed something - this system cannot account for all relationships between object - in particular, it cannot weigh the dependency on constants: in the above system there are several instances of classes containing a large number of constants used throughout the application.

    Due to the fact that Java resolves constants during compile time and does not store constant reference info in the .class files, the only thing that SA4J shows is that package A uses package B (i.e. a class in package A references a constant from a class in package B - I am guessing that the Java stores info about the "import B.*" declaration in the .class file).

    ...Anyway, I think this is a great tool, and luckily tiger comes right on time to save us from having to resort to poor practices like that with the introduction of enums. So that instead of writing (C/C++ style, in our case derived from a Win32 API practice):

    class Constants
      // SomeThings
      final ST_A;
      final ST_B;

      // OtherThings
      final OT_A;
      final OT_B;

    we can do

    enum SomeThing

    enum OtherThing

    and even distribute those enums into different packages (where they would most naturally belong).

    I know somebody might say we could have done the same thing with two classes, but the fact of the matter is this was not really the accepted practice so far, at least if you adhere the practices the core J2SDK APIs - just look at the Calendar class for an example...
  11. Not very stable[ Go to top ]

    It crashes on a 40M ear file.
  12. Re: Not very stable[ Go to top ]

    I had to raise the heap to 768M and correct the W32-batch-file (Wrong main class stated in there) to get it our project analyzed (15k classes). For large code-bases you may also have a look at the Sotograph (, which simply fills a database with the metadata of your classes. You can then run your own or predefines queries on this db.
  13. Not very stable[ Go to top ]

    It crashes on a 40M ear file.

    Maybe that it crashed on your app is analysis enough? :)

    40Mb? Wow. What you got in there?
  14. Re: Not Very Stable[ Go to top ]

    40Mb is not that big. Considering you'll have all the libraries used, all the wars , etc. 100Mb still wouldn't be that big. Think about all the images in just one war.
  15. Wonder if they ran the tool on itslef first to see how efficient it is before using on other's applications.
  16. In fact yes. :) Interesting comments... It's always good to hear different opinions. The more constructive the better. ;-)

  17. A free tool that has all the salient features that SA4J does is DependencyFinder: JDepend is similar, but not as accurate in dependency analysis, and doesn't have a GUI or a flexible suite of tools like DependencyFinder. Pasta (, a free tool from Compuware, is similar and provides some refactoring support (that you'd probably never want to use), but the output graphs are nice looking. These all report on the same metrics that Robert Martin devised, and have varying degrees of finesses in displaying and reporting on the dependencies in your code. In my experience, DependencyFinder is by far the best.

    Tools like this have been around for years for C++ and Java. Package dependency analysis and metrics based on packages' directional relationships and contents of abstract classes, interfaces, and concrete classes goes back to Robert Martin's 1996 "C++ Report" articles: All rehashed in his recent "Agile Software Development: Principles, Patterns and Practices" book.