Improving multi-objective code-smells correction using development history

被引:47
|
作者
Ouni, Ali [1 ]
Kessentini, Marouane [2 ]
Sahraoui, Houari [3 ]
Inoue, Katsuro [1 ]
Hamdi, Mohamed Salah [4 ]
机构
[1] Osaka Univ, Grad Sch Informat Sci & Technol, Osaka, Japan
[2] Univ Michigan, Comp & Informat Sci Dept, Ann Arbor, MI 48109 USA
[3] Univ Montreal, DIRO, Montreal, PQ H3C 3J7, Canada
[4] Ahmed Ben Mohamed Mil Coll, IT Dept, Doha, Qatar
基金
日本学术振兴会;
关键词
Search-based software engineering; Refactoring; Code-smells; DEFECTS DETECTION; DESIGN QUALITY; BAD SMELLS; TAXONOMY; METRICS;
D O I
10.1016/j.jss.2015.03.040
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
One of the widely used techniques to improve the quality of software systems is refactoring. Software refactoring improves the internal structure of the system while preserving its external behavior. These two concerns drive the existing approaches to refactoring automation. However, recent studies demonstrated that these concerns are not enough to produce correct and consistent refactoring solutions. In addition to quality improvement and behavior preservation, studies consider, among others, construct semantics preservation and minimization of changes. From another perspective, development history was proven as a powerful source of knowledge in many maintenance tasks. Still, development history is not widely explored in the context of automated software refactoring. In this paper, we use the development history collected from existing software projects to propose new refactoring solutions taking into account context similarity with situations seen in the past. We propose a multi-objective optimization-based approach to find good refactoring sequences that (1) minimize the number of code-smells, and (2) maximize the use of development history while (3) preserving the construct semantics. To this end, we use the non-dominated sorting genetic algorithm (NSGA-II) to find the best trade-offs between these three objectives. We evaluate our approach using a benchmark composed of five medium and large-size open-source systems and four types of code-smells (Blob, spaghetti code, functional decomposition, and data class). Our experimental results show the effectiveness of our approach, compared to three different state-of-the-art approaches, with more than 85% of code-smells fixed and 86% of suggested refactorings semantically coherent when the change history is used. (c) 2015 Elsevier Inc. All rights reserved.
引用
收藏
页码:18 / 39
页数:22
相关论文
共 50 条
  • [1] Multi-objective code-smells detection using good and bad design examples
    Usman Mansoor
    Marouane Kessentini
    Bruce R. Maxim
    Kalyanmoy Deb
    [J]. Software Quality Journal, 2017, 25 : 529 - 552
  • [2] Multi-objective code-smells detection using good and bad design examples
    Mansoor, Usman
    Kessentini, Marouane
    Maxim, Bruce R.
    Deb, Kalyanmoy
    [J]. SOFTWARE QUALITY JOURNAL, 2017, 25 (02) : 529 - 552
  • [3] Prioritizing code-smells correction tasks using chemical reaction optimization
    Ouni, Ali
    Kessentini, Marouane
    Bechikh, Slim
    Sahraoui, Houari
    [J]. SOFTWARE QUALITY JOURNAL, 2015, 23 (02) : 323 - 361
  • [4] Prioritizing code-smells correction tasks using chemical reaction optimization
    Ali Ouni
    Marouane Kessentini
    Slim Bechikh
    Houari Sahraoui
    [J]. Software Quality Journal, 2015, 23 : 323 - 361
  • [5] MORE: A multi-objective refactoring recommendation approach to introducing design patterns and fixing code smells
    Ouni, Ali
    Kessentini, Marouane
    Cinneide, Mel O.
    Sahraoui, Houari
    Deb, Kalyanmoy
    Inoue, Katsuro
    [J]. JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2017, 29 (05)
  • [6] Improving evolutionary multi-objective optimization using genders
    Kowalczuk, Zdzislaw
    Bialaszewski, Tomasz
    [J]. ARTIFICIAL INTELLIGENCE AND SOFT COMPUTING - ICAISC 2006, PROCEEDINGS, 2006, 4029 : 390 - 399
  • [7] The Use of Development History in Software Refactoring Using a Multi-Objective Evolutionary Algorithm
    Ouni, Ali
    Kessentini, Marouane
    Sahraoui, Houari
    Hamdi, Mohamed Salah
    [J]. GECCO'13: PROCEEDINGS OF THE 2013 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE, 2013, : 1461 - 1468
  • [8] Improving multi-objective evolutionary algorithms using Grammatical Evolution
    Rodriguez, Amin V. Bernabe
    Alejo-Cerezo, Braulio I.
    Coello, Carlos A. Coello
    [J]. SWARM AND EVOLUTIONARY COMPUTATION, 2024, 84
  • [9] Improving performance in swarm robots using multi-objective optimization
    Ordaz-Rivas, Erick
    Torres-Trevino, Luis
    [J]. MATHEMATICS AND COMPUTERS IN SIMULATION, 2024, 223 : 433 - 457
  • [10] Developing a multi-objective decision approach to select source-code improving transformations
    Tahvildari, L
    Kontogiannis, K
    [J]. 20TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 2004, : 427 - 431