Year: 2024
Type: conference-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 in practice are considered complete, i.e., those fully removing code smells. However, the literature is scarce to catalog the most common complete composites and their side effects. Aim: To fill this gap, we performed a mixed-method study to create an enhanced catalog of complete composites derived from practice knowledge. Method: We empirically collected the most common complete composites and their side effects applied in 42 open and closed-source projects, generating a catalog of composite recommendations. Then, our catalog was evaluated by 21 software developers. Results: The derived catalog includes four recommendations to fully remove multiple code smells, minimizing possible side effects. The evaluation indicates that 85% of developers reported that their own solutions could have worse side effects without our recommendations, increasing the effort to remove smells critical to them. Conclusion: Our catalog can guide both developers and researchers on how to better combine refactorings in composites that effectively reduce side effects in the practice.
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: gold
OpenAlex ID: W4403511676
