Abstract

Software defects often lead to bugs, runtime errors and software maintenance difficulties. They should be systematically prevented, found, removed or fixed all along the software lifecycle. However, detecting and fixing these defects is still, to some extent, a difficult, time-consuming and manual process. In this paper, we propose a two-step automated approach to detect and then to correct various types of maintainability defects in source code. Using Genetic Programming, our approach allows automatic generation of rules to detect defects, thus relieving the designer from a fastidious manual rule definition task. Then, we correct the detected defects while minimizing the correction effort. A correction solution is defined as the combination of refactoring operations that should maximize as much as possible the number of corrected defects with minimal code modification effort. We use the Non-dominated Sorting Genetic Algorithm (NSGA-II) to find the best compromise. For six open-source projects, we succeeded in detecting the majority of known defects, and the proposed corrections fixed most of them with minimal effort. © 2012 Springer Science + Business Media, LLC.

Department(s)

Computer Science

Keywords and Phrases

By example; Effort; Maintainability defects; Multi-objective optimization; Search-based software engineering; Software maintenance

International Standard Serial Number (ISSN)

1573-7535; 0928-8910

Document Type

Article - Conference proceedings

Document Version

Citation

File Type

text

Language(s)

English

Rights

© 2024 Springer, All rights reserved.

Publication Date

01 Mar 2013

Share

 
COinS