Multi-Criteria Code Refactoring Using Search-Based Software Engineering: An Industrial Case Study

被引:94
|
作者
Ouni, Ali [1 ]
Kessentini, Marouane [2 ]
Sahraoui, Houari [3 ]
Inoue, Katsuro [1 ]
Deb, Kalyanmoy [4 ]
机构
[1] Osaka Univ, Suita, Osaka 565, Japan
[2] Univ Michigan Dearborn, Dearborn, MI USA
[3] Univ Montreal, Montreal, PQ H3C 3J7, Canada
[4] Michigan State Univ, E Lansing, MI 48824 USA
基金
日本学术振兴会;
关键词
Search-based software engineering; refactoring; software maintenance; multi-objective optimization; software evolution; DESIGN QUALITY; BAD SMELLS; IDENTIFICATION; OPPORTUNITIES;
D O I
10.1145/2932631
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
One of the most widely used techniques to improve the quality of existing software systems is refactoring-the process of improving the design of existing code by changing its internal structure without altering its external behavior. While it is important to suggest refactorings that improve the quality and structure of the system, many other criteria are also important to consider, such as reducing the number of code changes, preserving the semantics of the software design and not only its behavior, and maintaining consistency with the previously applied refactorings. In this article, we propose a multi-objective search-based approach for automating the recommendation of refactorings. The process aims at finding the optimal sequence of refactorings that (i) improves the quality by minimizing the number of design defects, (ii) minimizes code changes required to fix those defects, (iii) preserves design semantics, and (iv) maximizes the consistency with the previously code changes. We evaluated the efficiency of our approach using a benchmark of six open-source systems, 11 different types of refactorings (move method, move field, pull up method, pull up field, push down method, push down field, inline class, move class, extract class, extract method, and extract interface) and six commonly occurring design defect types (blob, spaghetti code, functional decomposition, data class, shotgun surgery, and feature envy) through an empirical study conducted with experts. In addition, we performed an industrial validation of our technique, with 10 software engineers, on a large project provided by our industrial partner. We found that the proposed refactorings succeed in preserving the design coherence of the code, with an acceptable level of code change score while reusing knowledge from recorded refactorings applied in the past to similar contexts.
引用
收藏
页数:53
相关论文
共 50 条
  • [41] An Empirical Study About Search-Based Refactoring Using Alternative Multiple and Population-Based Search Techniques
    Koc, Ekin
    Ersoy, Nur
    Andac, Ali
    Camlidere, Zelal Seda
    Cereci, Ibrahim
    Kilic, Hurevren
    COMPUTER AND INFORMATION SCIENCES II, 2012, : 59 - +
  • [42] Improving Case Based Software Effort Estimation Using a Multi-criteria Decision Technique
    Fellir, Fadoua
    Nafil, Khalid
    Touahni, Rajaa
    Chung, Lawrence
    SOFTWARE ENGINEERING AND ALGORITHMS IN INTELLIGENT SYSTEMS, 2019, 763 : 438 - 451
  • [43] Multi-criteria decision making in industrial engineering - Preface
    Triantaphyllou, E
    Evans, GW
    COMPUTERS & INDUSTRIAL ENGINEERING, 1999, 37 (03) : 505 - 506
  • [44] A Systematic Mapping Study of Search-Based Software Engineering for Enterprise Application Integration
    Mazzonetto, Angela
    Frantz, Rafael Z.
    Roos-Frantz, Fabricia
    Molina-Jimenez, Carlos
    Sawicki, Sandro
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2022, 32 (02) : 163 - 191
  • [45] Exploiting Antipheromone in Ant Colony Optimisation for Interactive Search-Based Software Design and Refactoring
    Simons, Chris
    Smith, Jim
    PROCEEDINGS OF THE 2016 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE (GECCO'16 COMPANION), 2016, : 143 - 144
  • [46] Incorporating user preferences in search-based software engineering: A systematic mapping study
    Ferreira, Thiago Nascimento
    Vergilio, Silvia Regina
    de Souza, Jerffeson Teixeira
    INFORMATION AND SOFTWARE TECHNOLOGY, 2017, 90 : 55 - 69
  • [47] Search-Based Software Re-Modularization: A Case Study at Adyen
    Schroder, Casper
    van der Feltz, Adriaan
    Panichella, Annibale
    Aniche, Mauricio
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: SOFTWARE ENGINEERING IN PRACTICE (ICSE-SEIP 2021), 2021, : 81 - 90
  • [48] Search-Based Parallel Refactoring Using Population-Based Direct Approaches
    Kilic, Hurevren
    Koc, Ekin
    Cereci, Ibrahim
    SEARCH BASED SOFTWARE ENGINEERING, 2011, 6956 : 271 - +
  • [49] A guest editorial: special section on search-based software engineering
    Kessentini, Marouane
    Ruhe, Gunther
    EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (06) : 2456 - 2458
  • [50] A Review of Ten Years of the Symposium on Search-Based Software Engineering
    Colanzi, Thelma Elita
    Guez Assuncao, Wesley Klewerton
    Farah, Paulo Roberto
    Vergilio, Silvia Regina
    Guizzo, Giovani
    SEARCH-BASED SOFTWARE ENGINEERING, SSBSE 2019, 2019, 11664 : 42 - 57