Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / March 2005

Tip: Looking for answers? Try searching our database.

Java code analysis and improvement

Thread view: 
martin@skarsaune.net - 02 Mar 2005 10:19 GMT
Hi!

We are currently dealing with a huge code base of generated Java.
The translation tool produces suboptimal Java in sevaral aspects.
Any information about Java code analysis and transformation tools
that are able to enhance the code in the aspects listed below would be
highly appreciated!

1. Automatically reduce scope of local variables

2. Combine declaration and instantiation of local variables where
possible

e.g.

    String s = null;

        ...

    s = "hello";

    -> ....

    String s = "hello";

3. Automatically reduce visibility of fields and methods.
    removing methods from an interface which are only sent by the
implementor would also be nice...

4. Give a list of methods with return value that is never used

5. Make parameters and locals final.

Cheers!

Martin Skarsaune
Ira Baxter - 10 Mar 2005 03:13 GMT
> Hi!
>
[quoted text clipped - 5 lines]
>
> [optimizations deleted....]

The DMS Software Reengineering Toolkit could be used for this task.
It has a full Java front end parser, builds ASTs, lets you apply
arbitrary source-to-source transformations to the ASTs,
and then can prettyprint the result.

See http://www.semanticdesigns.com/Products/FrontEnds/JavaFrontEnd.html

Signature

Ira D. Baxter, Ph.D., CTO   512-250-1018
Semantic Designs, Inc.      www.semdesigns.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.