An Interactive and Dynamic Search-Based Approach to Software Refactoring Recommendations

被引:35
作者
Alizadeh, Vahid [1 ]
Kessentini, Marouane [2 ]
Mkaouer, Mohamed Wiem [3 ]
Ocinneide, Mel [4 ]
Ouni, Ali [5 ]
Cai, Yuanfang [6 ]
机构
[1] Univ Michigan, Dearborn, MI 48128 USA
[2] Univ Michigan, Dept Comp & Informat Sci, Dearborn, MI 48128 USA
[3] Rochester Inst Technol, B Thomas Golisano Coll Comp & Informat Sci, Software Engn Dept, Rochester, NY 14623 USA
[4] Univ Coll Dublin, Sch Comp Sci, Dublin 4, Ireland
[5] ETS, Montreal, PQ H3C 1K3, Canada
[6] Drexel Univ, Comp Sci, Philadelphia, PA 19104 USA
关键词
Manuals; Tools; Software quality; Maintenance engineering; Optimization; Electronic mail; Search-based software engineering; Refactoring; interactive optimization; software quality; MULTIOBJECTIVE EVOLUTIONARY ALGORITHMS; DEFECTS DETECTION; TOOLS;
D O I
10.1109/TSE.2018.2872711
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:932 / 961
页数:30
相关论文
共 57 条
  • [1] Parameter tuning or default values? An empirical investigation in search-based software engineering
    Arcuri, Andrea
    Fraser, Gordon
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2013, 18 (03) : 594 - 623
  • [2] A Practical Guide for Using Statistical Tests to Assess Randomized Algorithms in Software Engineering
    Arcuri, Andrea
    Briand, Lionel
    [J]. 2011 33RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2011, : 1 - 10
  • [3] A hierarchical model for object-oriented design quality assessment
    Bansiya, J
    Davis, CG
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (01) : 4 - 17
  • [4] Bavota Gabriele, 2012, Search Based Software Engineering. Proceedings of the 4th International Symposium (SSBSE 2012), P75, DOI 10.1007/978-3-642-33119-0_7
  • [5] Beck K., 2003, TEST DRIVEN DEV EXAM
  • [6] Brown William J., 1998, AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis: Refactoring Software, Architecture and Projects in Crisis, V1
  • [7] Cinnéide MO, 2012, INT SYMP EMP SOFTWAR, P49, DOI 10.1145/2372251.2372260
  • [8] Counsell S., 2010, Advances in Software Engineering, DOI 10.1155/2010/820103
  • [9] A fast and elitist multiobjective genetic algorithm: NSGA-II
    Deb, K
    Pratap, A
    Agarwal, S
    Meyarivan, T
    [J]. IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, 2002, 6 (02) : 182 - 197
  • [10] Deb K, 2006, GECCO 2006: GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE, VOL 1 AND 2, P1629