Research Questions and Findings
RQ1: What patterns do developers use to describe their refactoring activities?
Developers tend to use a variety of textual patterns to document their refactoring activities, such as "refactor", "move", "extract", "reorganize", and "fix". These patterns could provide either (1) a generic description/ motivation of the refactoring activity such as "optimize the code design", "improving code readability", and "fix long method", or (2) a specific refactoring operation name following Fowler's names such as "extract method", "extract class", and "extract interface".
RQ2: What are the quality issues that drive developers to refactor?
Our findings indicate that developers frequently state their intention behind the application of refactorings. They address quality issues that can be related to : (1) internal quality attributes, (2) external quality attributes, or (3) code smells. Furthermore, developers occasionally mention their refactoring strategy or operation performed with regard of addressing the quality issue.
RQ3: What are the top-10 patterns developers use to describe quality issues in their commits?
Our findings indicate that while there are no patterns that are restricted to a specific quality issue, developers occasionally do link the refactoring of a quality issue with a specific operation e.g., associating the correction of a feature envy by the operation move method.
RQ4: Do Commits containing the label Refactor indicate more refactoring activity than those without the label?
Our findings confirm that developers do not exclusively rely on the pattern "refactor" to describe refactoring activities. However, we found that developers do document their refactoring activities in commit messages with a variety of patterns that we identified in this study.