Abstract

Over the past decades, many techniques and tools have been developed to support maintenance activities in order to improve software quality. One of the most efficient ones is software refactoring to eliminate bad smells. A majority of existing work propose "standard" refactoring solutions that can be applied by hand for each kind of defect. However, it is difficult to prove or ensure the generality of these solutions to any kind of bad-smells or software codes. In this paper, we propose an approach to correct bad smells using well-designed code. We use genetic algorithms to generate correction solutions defined as a combination of refactoring operations that maximize, as much as possible, the similarity between the corrected bad-smells and examples of well-designed code. We report the results of an evaluation of our approach using four open-source projects. Our proposal achieved high correction scores by fixing the majority of expected bad smells. © 2012 Springer Science + Business Media New York.

Department(s)

Computer Science

Keywords and Phrases

Genetic algorithm; Refactoring; Software maintenance

International Standard Serial Number (ISSN)

1573-1367; 0963-9314

Document Type

Article - Journal

Document Version

Citation

File Type

text

Language(s)

English

Rights

© 2024 Springer, All rights reserved.

Publication Date

01 Dec 2013

Share

 
COinS