Loading…

Automated scheduling for clone-based refactoring using a competent GA

Refactoring is a widely accepted technique to improve the software quality by restructuring its design without changing its behavior. In general, a sequence of refactorings needs to be applied until the quality of the code is improved satisfactorily. In this case, the final design after refactoring...

Full description

Saved in:
Bibliographic Details
Published in:Software, practice & experience practice & experience, 2011-04, Vol.41 (5), p.521-550
Main Authors: Lee, Sukhee, Bae, Gigon, Chae, Heung Seok, Bae, Doo-Hwan, Kwon, Yong Rae
Format: Article
Language:English
Subjects:
Citations: Items that this one cites
Items that cite this one
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Refactoring is a widely accepted technique to improve the software quality by restructuring its design without changing its behavior. In general, a sequence of refactorings needs to be applied until the quality of the code is improved satisfactorily. In this case, the final design after refactoring can vary with the application order of refactorings, thereby producing different quality improvements. Therefore, it is necessary to determine a proper refactoring schedule to obtain as many benefits as possible. However, there is little research on the problem of generating appropriate schedules to maximize quality improvement. In this paper, we propose an approach to automatically determine an appropriate schedule to maximize quality improvement through refactoring. We first detect code clones that are suitable for refactoring and generate the most beneficial refactoring schedule to remove them. It is straightforward to select the best from the exhaustively enumerated schedules. However, such a technique becomes NP‐hard, as the number of available refactorings increases. We apply a genetic algorithm (GA) to generate the best refactoring schedule within a reasonable time to cope with this problem. We compare the GA‐based approach with manual scheduling, greedy heuristic‐based, and exhaustive approaches for four open systems. The results show that the proposed GA‐based approach generates more beneficial schedules than the others. Copyright © 2010 John Wiley & Sons, Ltd.
ISSN:0038-0644
1097-024X
1097-024X
DOI:10.1002/spe.1031