Automated Multi-objective Refactoring Based on Quality and Code Element Recentness

Michael Mohan, Des Greer*

*Corresponding author for this work

Research output: Contribution to journalArticle

Abstract

Search-Based Software Engineering (SBSE) has been used to automate various aspects of the software development cycle. One particular case is refactoring, especially to improve software quality. However, often there are other factors that influence the refactoring process. One such factor, the recentness of the code elements, is identified in this paper as important. The paper describes the use of a multi-objective genetic algorithm to automate software refactoring based on a metric function for software quality and a second objective to measure the recentness of the code elements being refactored. The recentness measure is calculated from data on previous versions of the software. The multi-objective setup refactors the input program to improve its quality using the quality objective, while also focusing on the recentness of the code elements inspected. The approach is implemented in a tool, MultiRefactor and validated using a set of six open source Java programs. An experiment is described that compares the multi-objective approach against an alternative mono-objective approach that uses only the quality function. The results show that the multi-objective approach gives significantly better recentness scores without greatly degrading improvements in the quality score.

Original languageEnglish
Pages (from-to)334-351
Number of pages18
JournalCommunications in Computer and Information Science
Volume1023
Early online date29 Jun 2019
DOIs
Publication statusEarly online date - 29 Jun 2019

Keywords

  • Genetic algorithms
  • Maintenance
  • Multi-objective optimization
  • Refactoring
  • Search based software engineering
  • Software history

ASJC Scopus subject areas

  • Computer Science(all)
  • Mathematics(all)

Fingerprint Dive into the research topics of 'Automated Multi-objective Refactoring Based on Quality and Code Element Recentness'. Together they form a unique fingerprint.

  • Cite this