Drivers for software refactoring decisions

  • Authors:
  • Mika V. Mäntylä;Casper Lassenius

  • Affiliations:
  • Helsinki University of Technology;Helsinki University of Technology

  • Venue:
  • Proceedings of the 2006 ACM/IEEE international symposium on Empirical software engineering
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents an empirical study of drivers for software refactoring decisions. We studied the refactoring decisions made by 37 students evaluating ten methods of a purposefully constructed Java program. The decision rationales reported by the evaluators were coded to identify the drivers behind the decisions. The identified drivers were categorized into Structure, Documentation, Visual Representation, and General drivers. The evaluators had conflicting opinions both regarding the internal quality of the methods and refactoring decisions. Complex code problems were detected only by experienced evaluators. Using regression analysis, we looked at the predictive value of drivers explaining the refactoring decisions. The most salient driver leading to a favourable refactoring decision was method size. This study provides information of the refactoring decisions and helps form a basis for creating code problem detectors. By comparing automatic detection and the identified drivers we gained understanding of code problems that are difficult or impossible to detect automatically, for example Poor Algorithm. Issues detected only by experienced developers, and code problems for which the human eye surpasses automatic detection indicate good areas for developer education.