RealTime IT News

New IBM Tool a Real Code Fixer

Developers at Armonk, N.Y.-based IBM have released what they say is a first-of-its-kind structural analysis tool for Java architects.

Now available for download at its alphaWorks Web site for emerging technologies, the tool lets the people who design and build new Java applications test the code for architectural integrity.

In some ways, the tool resembles JFactor for Visual Age Java, which lets coders refactor their application in order to improve quality and reusability without changing external application behavior.

Call it building a better mousetrap, an aid for developers to design code before issues with patterns can turn into big problems later on when the application project is nearing completion.

Geoffrey Bessin, IBM market manager for software quality, said the idea behind Structural Analysis for Java, or SA4J, is to proactively weed out the bad code before it becomes a problem, whether it's at design conception or the second revision.

"Some architectural problems, if they're only discovered very late in the cycle, too much has been built, too much code exists (and) it's really too late to really address it," he told internetnews.com.

"(SA4J) fits in nicely to the larger picture of what the team can do -- starting with business processes and requirements all the way to deployment -- to ensure this is a quality product."

The tool breaks analysis into two areas: detection of structural antipatterns and impact analysis. Since classes and interfaces are the building blocks to every Java app, finding out how the relationship types -- Extends, Realizes, Contains and Uses -- interact gives the tool a starting point.

  • Detection of antipatterns -- Officials say when an application is viewed on a dependency web, bad coding patterns are often repeated over and over again. The tool weeds out (using Java's own classes) and displays those bad patterns -- whether it's a tangle, local/global breakable, local/global hub or core component.
  • Impact analysis: Every programmer has experienced it -- halfway into a program, the customer wants a new feature, or the programmer needs to do bug fixing. IBM's tool takes the code that is going to be implemented and checks it against the classes and interfaces that are going to be affected, allowing designers to see how the application will be affected by the change.

Bessin said that while the tool is primarily targeted to Java architects and is used independently of any integrated development environment , it's not a bad idea for everyone on the application team to share the same user experience.

"It makes access to artifacts a little simpler, it makes the work flows a little simpler," he said. "I would also say that although this is positioned for the architect, it would work for the developer as well."

SA4J can be downloaded for free at IBM's alphaWorks Java Web site today, though Bessin added the disclaimer that it has the usual "as is" warning. IBM also said it plans to incorporate feedback from the tool in order it into a product down the road.

He said by releasing it as an alpha project, it gives the company (and developers) more opportunity to "be adventurous" with the tool before its functionality is set in stone. The overall intent, he said is to improve code quality.

"The tool is our first foray to see what we can do with other assets, with other aspects of software development to improve quality," Bessin said.