Increasing clone maintenance support by unifying clone detection and refactoring activities

  • Authors:
  • Robert Tairas;Jeff Gray

  • Affiliations:
  • AtlanMod, INRIA & íícole des Mines de Nantes, Nantes, France;University of Alabama, Department of Computer Science, Tuscaloosa, AL, United States

  • Venue:
  • Information and Software Technology
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Context: Clone detection tools provide an automated mechanism to discover clones in source code. On the other side, refactoring capabilities within integrated development environments provide the necessary functionality to assist programmers in refactoring. However, we have observed a gap between the processes of clone detection and refactoring. Objective: In this paper, we describe our work on unifying the code clone maintenance process by bridging the gap between clone detection and refactoring. Method: Through an Eclipse plug-in called CeDAR (Clone Detection, Analysis, and Refactoring), we forward clone detection results to the refactoring engine in Eclipse. In this case, the refactoring engine is supplied with information about the detected clones to which it can then determine those clones that can be refactored. We describe the extensions to Eclipse's refactoring engine to allow clones with additional similarity properties to be refactored. Results: Our evaluation of open source artifacts shows that this process yields considerable increases in the instances of clone groups that may be suggested to the programmer for refactoring within Eclipse. Conclusion: By unifying the processes of clone detection and refactoring, in addition to providing extensions to the refactoring engine of an IDE, the strengths of both processes (i.e., more significant detection capabilities and an established framework for refactoring) can be garnered.