Enhancing Recommendations of Composite Refactorings based in the Practice

This website contains complementary data to the paper.

Abstract

Refactoring is a non-trivial maintenance activity. Developers spend time and effort refactoring code to remove structural problems, i.e., code smells. Recent studies indicated that developers often apply composite refactoring (composite, for short), i.e., two or more interrelated refactorings. However, previous studies revealed that only 10% of composite refactorings are considered complete, i.e., those fully removing code smells. Many of the incomplete refactorings end up even introducing or replacing smells, which have to be further removed later in the project. However, developers are missing catalogs that guide them to fully refactor code smells out, alerting them about possible side effects of alternative composite recommendations. To fill this gap, we performed a mixed-matched study to create an enhanced catalog of complete composites derived from their recurring application across software projects. The derived catalog includes empirically-observed side effects for each alternative composite and proposes refactoring combinations to fully remove more than one code smell, minimizing those side effects. The recommendations were extracted from 42 software projects, both open and closed-source, with more than 250K refactorings. Then, our catalog recommendations were evaluated by nine software developers. The evaluation indicates that 78% of developers reported that their solutions could have worse side effects without our recommendations, increasing the effort to remove smells critical to them. Thus, our catalog can guide both developers and researchers on how to better combine refactorings in composites that effectively reduce side effects in the practice.

Artifacts

# Artifact Description
1 Information of Software Projects General information about the software projects that were investigated in this study.
2 Refactorings All Refactorings collected in this study.
3 Composite Refactorings All Composite Refactorings collected in this study.
4 Complete Composite Refactorings All Complete Composite Refactorings collected in this study.
5 Most Common Combinations of Composites Most common combinations of Composite Refactorings collected in this study.
6 Side Effects per Composite Combination (Side) Effects of Combinations of Complete Composites investigated in this study.
7 Interviews - Answers The questions, answers and summarization of our interviews.
8 Interviews - Sample Code The smelly code that was presented for subjects
9 Full Paper Version Full paper version with additional information