Abstract

Many studies reported that software maintenance, traditionally defined as any modification made on a software system after its delivery, consumes up to 90% of the total cost of a typical software project. Adding new functionalities, correcting bugs, and modifying the code to improve its quality are major parts of those costs. To ease these maintenance activities, one of the most used techniques is the refactoring which improves design structure while preserving the external behavior. In general, refactoring is performed through two main steps: (1) detection of code fragments corresponding to design defects that need to be improved/fixed and (2) identification of refactoring solutions to achieve this goal. Our research project targets the automation of these two refactoring steps. Concretely, we consider the detection step as a search-based process to find the suitable detection rules for each type of design defect, by means of a genetic algorithm. To guide the rule-derivation process, real examples of design defects are used. For the refactoring identification step, a multiobjective search-based approach is also used. The process aims at finding the optimal sequence of refactoring operations that improve the software quality by minimizing the number of detected defects. In addition, we explore other objectives to optimize: the effort needed to apply refactorings, semantic preservation, and the similarity with good refactorings applied in the past to similar contexts. Hence, the effort corresponds to the code modification/adaptation score needed to apply the suggested refactoring solutions. On the other hand, the semantic preservation insures that the refactored program is semantically equivalent to the original one, and that it models correctly the domain semantics. Indeed, we use knowledge from historical code changes to propose new refactoring solutions in similar contexts to improve the automation of refactoring.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.