Skip to main navigation Skip to search Skip to main content

Improving multi-objective code-smells correction using development history

  • Ali Ouni
  • , Marouane Kessentini
  • , Houari Sahraoui
  • , Katsuro Inoue
  • , Mohamed Salah Hamdi
  • The University of Osaka
  • University of Michigan, Ann Arbor
  • University of Montreal
  • Ahmed Ben Mohamed Military College

Research output: Contribution to journal › Journal Article › peer-review

63 Citations (Scopus)

Abstract

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.

Original languageEnglish
Pages (from-to)18-39
Number of pages22
JournalJournal of Systems and Software
Volume105
DOIs
Publication statusPublished - 1 Jul 2015
Externally publishedYes

Keywords

  • Code-smells
  • Refactoring
  • Search-based software engineering

ASJC Scopus subject areas

  • Software
  • Information Systems
  • Hardware and Architecture

Fingerprint

Dive into the research topics of 'Improving multi-objective code-smells correction using development history'. These topics are generated from the title and abstract of the publication. Together, they form a unique fingerprint.

Cite this