Search-based Refactoring Using Recorded Code Changes

被引:37
|
作者
Ouni, Ali [1 ,2 ]
Kessentini, Marouane [2 ]
Sahraoui, Houari [1 ]
机构
[1] Univ Montreal, DIRO, Montreal, PQ H3C 3J7, Canada
[2] Missouri Univ Sci & Technol, CS, Rolla, MO 65409 USA
关键词
Search-based Software Engineering; Refactoring; Software Maintenance; Multi-objective Optimization;
D O I
10.1109/CSMR.2013.31
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Over the past decades, many techniques and tools have been developed to record the sequence of applied refactoring to improve design quality. We start from the observation that these recorded code changes can be used to propose new refactoring solutions in similar contexts. In addition, this knowledge can be combined with structural and semantic information, used by existing work, to improve the automation of refactoring. In this paper, we propose a multi-objective optimization approach to find the best sequence of refactorings that maximizes the use of refactoring applied in the past to similar contexts, minimizes semantic errors and minimizes the number of defects (improve code quality). To this end, we use the non-dominated sorting genetic algorithm (NSGA-II) to find the best trade-off between these three objectives. We report the results of our experiments on different open source java projects.
引用
收藏
页码:221 / 230
页数:10
相关论文
共 50 条
  • [41] A Search-Based Testing Framework for Deep Neural Networks of Source Code Embedding
    Pour, Maryam Vahdat
    Li, Zhuo
    Ma, Lei
    Hemmati, Hadi
    2021 14TH IEEE CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2021), 2021, : 36 - 46
  • [42] Checking Refactoring Detection Results Using Code Changes Encoding for Improved Accuracy
    Tan, Liang
    Bockisch, Christoph
    2022 IEEE 22ND INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2022), 2022, : 94 - 104
  • [43] WhoReview: A multi-objective search-based approach for code reviewers recommendation in modern code review
    Chouchen, Moataz
    Ouni, Ali
    Mkaouer, Mohamed Wiem
    Kula, Raula Gaikovina
    Inoue, Katsuro
    APPLIED SOFT COMPUTING, 2021, 100
  • [44] Locating dependence structures using search-based slicing
    Jiang, Tao
    Gold, Nicolas
    Harman, Mark
    Li, Zheng
    INFORMATION AND SOFTWARE TECHNOLOGY, 2008, 50 (12) : 1189 - 1209
  • [45] Search-based testing using constraint-based mutation
    Malburg, Jan
    Fraser, Gordon
    SOFTWARE TESTING VERIFICATION & RELIABILITY, 2014, 24 (06): : 472 - 495
  • [46] On the use of many quality attributes for software refactoring: a many-objective search-based software engineering approach
    Mkaouer, Mohamed Wiem
    Kessentini, Marouane
    Bechikh, Slim
    Cinneide, Mel O.
    Deb, Kalyanmoy
    EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (06) : 2503 - 2545
  • [47] Using Search-Based Software Engineering to Handle the Changes with Uncertainties for Self-Adaptive Systems
    Wang, Lu
    ESEC/FSE 2017: PROCEEDINGS OF THE 2017 11TH JOINT MEETING ON FOUNDATIONS OF SOFTWARE ENGINEERING, 2017, : 1014 - 1017
  • [48] On the use of many quality attributes for software refactoring: a many-objective search-based software engineering approach
    Mohamed Wiem Mkaouer
    Marouane Kessentini
    Slim Bechikh
    Mel Ó Cinnéide
    Kalyanmoy Deb
    Empirical Software Engineering, 2016, 21 : 2503 - 2545
  • [49] Search-Based Model Optimization Using Model Transformations
    Denil, Joachim
    Jukss, Maris
    Verbrugge, Clark
    Vangheluwe, Hans
    SYSTEM ANALYSIS AND MODELING: MODELS AND REUSABILITY, 2014, 8769 : 80 - +
  • [50] Technical debt reduction using search based automated refactoring
    Mohan, Michael
    Greer, Des
    McMullan, Paul
    JOURNAL OF SYSTEMS AND SOFTWARE, 2016, 120 : 183 - 194