Determining detailed structural correspondence for generalization tasks

Generalization tasks are important for continual improvement to the design of an evolving code base, eliminating redundancy where it has accumulated. An important step in generalization is identifying the detailed structural correspondence between two pieces of code being considered for generalization. Unfortunately, tool support for this step is insufficient, leaving the developer to resort to tedious and error-prone manual determination of correspondence. This paper presents an approach for automatically determining correspondences as an early step in a generalization task. The approach is implemented in a proof-of-concept plug-in to the Eclipse integrated development environment. Two small empirical evaluations of the tool have been conducted: a comparison between human attempts to determine detailed correspondences and those of the tool; and, a comparison of the use of the tool to the use of diff/CCFinder in performing generalization tasks.

[1]  Frank Tip,et al.  Refactoring for generalization using type constraints , 2003, OOPSLA 2003.

[2]  Martin P. Robillard,et al.  Tracking Code Clones in Evolving Software , 2007, 29th International Conference on Software Engineering (ICSE'07).

[3]  Loïc Pottier,et al.  Generalisation de termes en theorie equationnelle. Cas associatif-commutatif , 1989 .

[4]  Eleni Stroulia,et al.  Analyzing the evolutionary history of the logical design of object-oriented software , 2005, IEEE Transactions on Software Engineering.

[5]  Alessandro Orso,et al.  Efficient and precise dynamic impact analysis using execute-after sequences , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[6]  Michael D. Ernst,et al.  Dynamically discovering likely program invariants , 2000 .

[7]  Sunghun Kim,et al.  When functions change their names: automatic detection of origin relationships , 2005, 12th Working Conference on Reverse Engineering (WCRE'05).

[8]  William G. Griswold,et al.  Dynamically discovering likely program invariants to support program evolution , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[9]  Robert J. Walker,et al.  Strathcona example recommendation tool , 2005, ESEC/FSE-13.

[10]  Shinji Kusumoto,et al.  CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code , 2002, IEEE Trans. Software Eng..

[11]  Jochen Burghardt,et al.  E-generalization using grammars , 2005, Artif. Intell..

[12]  U. Sinha,et al.  Program Reuse and Abstraction by Anti{uniication , 2007 .

[13]  Gordon Plotkin,et al.  A Note on Inductive Generalization , 2008 .

[14]  J. W. Hunt,et al.  An Algorithm for Differential File Comparison , 2008 .

[15]  Michael W. Godfrey,et al.  Using origin analysis to detect merging and splitting of source code entities , 2005, IEEE Transactions on Software Engineering.

[16]  Stan Jarzabek,et al.  Detecting higher-level similarity patterns in programs , 2005, ESEC/FSE-13.

[17]  Thomas Kolbe,et al.  Proving theorems by reuse , 2000, Artif. Intell..

[18]  Abraham Bernstein,et al.  Detecting similar Java classes using tree algorithms , 2006, MSR '06.

[19]  Miryung Kim,et al.  Program element matching for multi-version program analyses , 2006, MSR '06.

[20]  Miryung Kim,et al.  Automatic Inference of Structural Changes for Matching across Program Versions , 2007, 29th International Conference on Software Engineering (ICSE'07).