Detecting Occurrences of Refactoring with Heuristic Search

This paper proposes a novel technique to detect the occurrences of refactoring from a version archive, in order to reduce the effort spent in understanding what modifications have been applied. In a real software development process, a refactoring operation may sometimes be performed together with other modifications at the same revision. This means that understanding the differences between two versions stored in the archive is not usually an easily process. In order to detect these impure refactorings, we model the detection within a graph search. Our technique considers a version of a program as a state and a refactoring as a transition. It then searches for the path that approaches from the initial to the final state. To improve the efficiency of the search, we use the source code differences between the current and the final state for choosing the candidates of refactoring to be applied next and estimating the heuristic distance to the final state. We have clearly demonstrated the feasibility of our approach through a case study.

[1]  Johannes Stammel,et al.  Search-based determination of refactorings for improving the class structure of object-oriented systems , 2006, GECCO.

[2]  Steve Counsell,et al.  Extracting refactoring trends from open-source software and a possible solution to the 'related refactoring' conundrum , 2006, SAC '06.

[3]  Mark Kent O'Keeffe,et al.  Search-based software maintenance , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[4]  Oege de Moor,et al.  JunGL: a scripting language for refactoring , 2006, ICSE.

[5]  John A. Clark,et al.  Metrics are fitness functions too , 2004, 10th International Symposium on Software Metrics, 2004. Proceedings..

[6]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[7]  Peter Norvig,et al.  Artificial Intelligence: A Modern Approach , 1995 .

[8]  Oscar Nierstrasz,et al.  Finding refactorings via change metrics , 2000, OOPSLA '00.

[9]  Yania Crespo,et al.  Exploring a Method to Detect Behaviour-Preserving Evolution Using Graph Transformation , 2007 .

[10]  Carsten Görg,et al.  Detecting and visualizing refactorings from software archives , 2005, 13th International Workshop on Program Comprehension (IWPC'05).

[11]  Stephan Diehl,et al.  Identifying Refactorings from Source-Code Changes , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).