Automated Refactoring Using Design Differencing

  • Authors:
  • Iman Hemati Moghadam;Mel O. Cinneide

  • Affiliations:
  • -;-

  • Venue:
  • CSMR '12 Proceedings of the 2012 16th European Conference on Software Maintenance and Reengineering
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Software systems that undergo repeated addition of functionality commonly suffer a loss of quality in their underlying designs, termed design erosion. This leads to the maintenance of a system becoming increasingly difficult and time-consuming during its lifetime. Refactoring can reduce the effects of design erosion, but this process requires significant effort on the part of the maintenance programmer. Research into automated refactoring has had some success in reducing the effort involved, however source code refactoring uses refactoring steps that are too small to effect major design changes. Design-level refactoring is also possible, but these approaches operate on design models and do little to help in the subsequent refactoring of the source code. In this paper, we present a novel refactoring approach that refactors a program based both on its desired design and on its source code. The maintenance programmer first creates a desired design (a UML class model) for the software based on the current software design and their understanding of how it may be required to evolve. Then, the source code is refactored using the desired design as a target. This resulting source code has the same behavior as the original, but its design more closely correlates to the desired design. We conducted an investigation using several open source Java applications to determine how precisely it is possible to refactor program source code to a desired design. Our findings were that the original program could be refactored to the desired design with an accuracy of over 90%, hence demonstrating the viability of automated refactoring using design differencing.