An analytical study of metrics and refactoring

Access full-text files

Date

2009-05

Authors

Iyer, Suchitra S.

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

Object-oriented systems that undergo repeated modifications commonly endure a loss of quality and design decay. This problem is often remedied by applying refactorings. Refactoring is one of the most important and commonly used techniques to improve the quality of the code by eliminating redundancy and reducing complexity; frequently refactored code is believed to be easier to understand, maintain and test. Object-oriented metrics provide an easy means to extract useful and measurable information about the structure of a software system. Metrics have been used to identify refactoring opportunities, detect refactorings that have previously been applied and gauge quality improvements after the application of refactorings.

This thesis provides an in-depth analytical study of the relationship between metrics and refactorings. For this purpose we analyzed 136 versions of 4 different open source projects. We used RefactoringCrawler, an automatic refactoring detection tool to identify refactorings and then analyzed various metrics to study whether metrics can be used to (1) reliably identify refactoring opportunities, (2) detect refactorings that were previously applied, and (3) estimate the impact of refactoring on software quality.

In conclusion, our study showed that metrics cannot be reliably used to either identify refactoring opportunities or detect refactorings. It is very difficult to use metrics to estimate the impact of refactoring, however studying the evolution of metrics at a system level indicates that refactoring does improve software quality and reduce complexity.

Description

text

LCSH Subject Headings

Citation