Concepedia

Publication | Closed Access

Can Refactoring Be Self-Affirmed? An Exploratory Study on How Developers Document Their Refactoring Activities in Commit Messages

72

Citations

23

References

2019

Year

TLDR

Refactoring is essential for maintaining software quality, yet existing studies rely on keyword lists to detect refactoring commits in limited datasets and often assume refactorings occurred without verification. This study explores how developers document refactoring activities during the software life cycle. The authors define Self‑Affirmed Refactoring and use text mining of commit messages to identify refactoring patterns exclusively among confirmed refactoring commits. They found that developers employ diverse patterns to target refactoring, explicitly mention quality improvements and code smells, and that commit messages with self‑affirmed patterns indicate more substantial refactoring activity.

Abstract

Refactoring is a critical task in software maintenance and is usually performed to enforce best design practices, or to cope with design defects. Previous studies heavily rely on defining a set of keywords to identify refactoring commits from a list of general commits extracted from a small set of software systems. All approaches thus far consider all commits without checking whether refactorings had actually happened or not. In this paper, we aim at exploring how developers document their refactoring activities during the software life cycle. We call such activity Self-Affirmed Refactoring, which is an indication of the developer-related refactoring events in the commit messages. Our approach relies on text mining refactoring-related change messages and identifying refactoring patterns by only considering refactoring commits. We found that (1) developers use a variety of patterns to purposefully target refactoring-related activities; (2) developers tend to explicitly mention the improvement of specific quality attributes and code smells; and (3) commit messages with self-affirmed refactoring patterns tend to have more significant refactoring activity than those without.

References

YearCitations

Page 1