An Interactive and Dynamic Search-Based Approach to Software Refactoring Recommendations
Authors:
- Vahid AlizadehVAVahid Alizadeh
- Marouane KessentiniMKMarouane Kessentini
- Mohamed Wiem MkaouerMMMohamed Wiem Mkaouer
- Mel O CinneideMCMel O Cinneide
- Ali OuniAOAli Ouni
- Yuanfang CaiYCYuanfang Cai
- 1 October 2018
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 46 (9) , 932-961
Abstract
Successful software products evolve through a process of continual change. However, this process may weaken the design of the software and make it unnecessarily complex, leading to significantly reduced productivity and increased fault-proneness. Refactoring improves the software design while preserving overall functionality and behavior, and is an important technique in managing the growing complexity of software systems. Most of the existing work on software refactoring uses either an entirely manual or a fully automated approach. Manual refactoring is time-consuming, error-prone and unsuitable for large-scale, radical refactoring. On the other hand, fully automated refactoring yields a static list of refactorings which, when applied, leads to a new and often hard to comprehend design. Furthermore, it is difficult to merge these refactorings with other changes performed in parallel by developers. In this paper, we propose a refactoring recommendation approach that dynamically adapts and interactively suggests refactorings to developers and takes their feedback into consideration. Our approach uses NSGA-II to find a set of good refactoring solutions that improve software quality while minimizing the deviation from the initial design. These refactoring solutions are then analyzed to extract interesting common features between them such as the frequently occurring refactorings in the best non-dominated solutions. Based on this analysis, the refactorings are ranked and suggested to the developer in an interactive fashion as a sequence of transformations. The developer can approve, modify or reject each of the recommended refactorings, and this feedback is then used to update the proposed rankings of recommended refactorings. After a number of introduced code changes and interactions with the developer, the interactive NSGA-II algorithm is executed again on the new modified system to repair the set of refactoring solutions based on the new changes and the feedback received from the developer. We evaluated our approach on a set of eight open source systems and two industrial projects provided by an industrial partner. Statistical analysis of our experiments shows that our dynamic interactive refactoring approach performed significantly better than four existing search-based refactoring techniques and one fully-automated refactoring tool not based on heuristic search.Keywords
Funding Information
- Ford Motor Company (PF10934)
This publication has 42 references indexed in Scilit:
- Parameter tuning or default values? An empirical investigation in search-based software engineeringEmpirical Software Engineering, 2013
- A Comparative Study of Manual and Automated Refactorings2013
- Search-based software engineeringACM Computing Surveys, 2012
- Maintainability defects detection and correction: a multi-objective approachAutomated Software Engineering, 2012
- Evolutionary multiobjective optimization using an outranking-based dominance generalizationComputers & Operations Research, 2010
- Search-based refactoring for software maintenanceJournal of Systems and Software, 2008
- Dynamic Multiobjective Optimization Problems: Test Cases, Approximations, and ApplicationsIEEE Transactions on Evolutionary Computation, 2004
- A hierarchical model for object-oriented design quality assessmentIEEE Transactions on Software Engineering, 2002
- A fast and elitist multiobjective genetic algorithm: NSGA-IIIEEE Transactions on Evolutionary Computation, 2002
- TRIAL-AND-ERROR SOLVING OF A CONFINEMENT PROBLEM BY A JUMPING SPIDER, PORTIA FIMBRIATABehaviour, 2001