Template-based reconstruction of complex refactorings

  • Authors:
  • Kyle Prete;Napol Rachatasumrit;Nikita Sudan;Miryung Kim

  • Affiliations:
  • Electrical and Computer Engineering, The University of Texas at Austin, USA;Electrical and Computer Engineering, The University of Texas at Austin, USA;Electrical and Computer Engineering, The University of Texas at Austin, USA;Electrical and Computer Engineering, The University of Texas at Austin, USA

  • Venue:
  • ICSM '10 Proceedings of the 2010 IEEE International Conference on Software Maintenance
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Knowing which types of refactoring occurred between two program versions can help programmers better understand code changes. Our survey of refactoring identification techniques found that existing techniques cannot easily identify complex refactorings, such as an replace conditional with polymorphism refactoring, which consist of a set of atomic refactorings. This paper presents REF-FINDER that identifies complex refactorings between two program versions using a template-based refactoring reconstruction approach—REF-FINDER expresses each refactoring type in terms of template logic rules and uses a logic programming engine to infer concrete refactoring instances. It currently supports sixty three refactoring types from Fowler's catalog, showing the most comprehensive coverage among existing techniques. The evaluation using code examples from Fowler's catalog and open source project histories shows that REF-FINDER identifies refactorings with an overall precision of 0.79 and recall of 0.95.