Unique renaming of Java using source transformation

We present a method for unique renaming declarations and references in Java programs using source transformation to XML markup. Each entity declaration and reference in the Java program is assigned a globally unique identifier (UID) based on its declaration scope and file. The UID serves as a key by which the entity's original declaration and all references can be found, and more importantly, by which information about the entity can be stored or retrieved from the design database. The resulting uniquely renamed source code makes it convenient and efficient to do further business logic and technical analysis that crosses the boundary between source code and the design database. UIDs are attached to entity references in the source code using XML markup, so that both the UID and the original source text of the declaration or reference are available in the renamed source program. While it is possible to generate unique names in an ad hoc manner, we show how to generate them using a combination of source transformations and design database inferences. This ensures that the notion of UID is consistent and well defined.

[1]  Brian A. Malloy,et al.  Program annotation in XML: a parse-tree based approach , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[2]  Charles L. A. Clarke,et al.  Representing and accessing extracted information , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[3]  Kevin A. Schneider,et al.  Grammar programming in TXL , 2002, Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation.

[4]  Kostas Kontogiannis,et al.  Towards portable source code representations using XML , 2000, Proceedings Seventh Working Conference on Reverse Engineering.

[5]  Hausi A. Müller,et al.  Rigi: A Visualization Environment for Reverse Engineering , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[6]  John Mylopoulos,et al.  An extensible tool for source code representation using XML , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[7]  Yaojin Yang,et al.  Generation of architectural documentation using XML , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[8]  Harry M. Sneed,et al.  Comparing graph-based program comprehension tools to relational database-based tools , 2001, Proceedings 9th International Workshop on Program Comprehension. IWPC 2001.

[9]  Kevin A. Schneider,et al.  Source transformation in software engineering using the TXL transformation system , 2002, Inf. Softw. Technol..

[10]  Margaret-Anne Storey,et al.  Manipulating And Documenting Software Structures , 1995 .

[11]  Kevin A. Schneider,et al.  Architectural design recovery using source transformations , 1995 .

[12]  Hausi A. Müller,et al.  The Software Bookshelf , 1997, IBM Syst. J..

[13]  Richard C. Holt Structural manipulations of software architecture using Tarski relational algebra , 1998, Proceedings Fifth Working Conference on Reverse Engineering (Cat. No.98TB100261).

[14]  James R. Cordy,et al.  The TXL Programming Language-Version 10 , 2000 .

[15]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[16]  Kevin A. Schneider,et al.  Using design recovery techniques to transform legacy systems , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[17]  Kevin A. Schneider,et al.  HSML: design directed source code hot spots , 2001, Proceedings 9th International Workshop on Program Comprehension. IWPC 2001.

[18]  Hausi A. Müller,et al.  Integrating information sources for visualizing Java programs , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[19]  Greg J. Badros JavaML: a markup language for Java source code , 2000, Comput. Networks.

[20]  Richard C. Holt,et al.  Union schemas as a basis for a C++ extractor , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[21]  Jürgen Ebert,et al.  GUPRO - Generic Understanding of Programs , 2002, Electron. Notes Theor. Comput. Sci..

[22]  Ted J. Biggerstaff,et al.  Design recovery for maintenance and reuse , 1989, Computer.

[23]  Derek Rayside,et al.  Change and adaptive maintenance detection in Java software systems , 1998, Proceedings Fifth Working Conference on Reverse Engineering (Cat. No.98TB100261).

[24]  Jeffrey L. Korn,et al.  Chava: reverse engineering and tracking of Java applets , 1999, Sixth Working Conference on Reverse Engineering (Cat. No.PR00303).

[25]  David R. Harris,et al.  Relating expectations to automatically recovered design patterns , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[26]  James H. Cross,et al.  Extraction and use of class dependency information for Java , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[27]  D. B. Davis,et al.  Sun Microsystems Inc. , 1993 .