Relating Complexity, Explicitness, Effectiveness of Refactorings and Non-Functional Requirements: A Replication Study

📅 2025-05-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study investigates how explicitly declaring refactoring intent (Semantic-Aware Refactoring, SAR) affects refactoring complexity, effectiveness, and alignment with non-functional requirements. Method: Building upon and extending Soares et al.’s work, we empirically analyze 8,408 validated refactorings across projects twice the original scale, applying rigorous empirical software engineering methods and statistical analysis. Contribution/Results: We find that SAR frequently triggers composite refactorings involving multiple types—increasing complexity yet significantly improving internal code quality attributes; notably, more complex SARs induce fewer adverse quality effects. Furthermore, SAR’s impact on non-functional requirements partially contradicts prior findings. Explicit intent enhances refactoring precision and efficacy. Crucially, this is the first study to demonstrate that intent externalization yields dual benefits: measurable quality gains and mitigation of refactoring-related risks—thereby underscoring its central role in modern refactoring practice.

Technology Category

Application Category

📝 Abstract
Refactoring is a practice widely adopted during software maintenance and evolution. Due to its importance, there is extensive work on the effectiveness of refactoring in achieving code quality. However, developer's intentions are usually overlooked. A more recent area of study involves the concept of self-affirmed refactoring (SAR), where developers explicitly state their intent to refactor. While studies on SAR have made valuable contributions, they provide little insights into refactoring complexity and effectiveness, as well as the refactorings' relations to specific non-functional requirements. A study by Soares et al. addressed such aspects, but it relied on a quite small sample of studied subject systems and refactoring instances. Following the empirical method of replication, we expanded the scope of Soares et al.'s study by doubling the number of projects analyzed and a significantly larger set of validated refactorings (8,408). Our findings only partially align with the original study. We observed that when developers explicitly state their refactoring intent, the resulting changes typically involve a combination of different refactoring types, making them more complex. Additionally, we confirmed that such complex refactorings positively impact code's internal quality attributes. While refactorings aimed at non-functional requirements tend to improve code quality, our findings only partially align with the original study and contradict it in several ways. Notably, SARs often result in fewer negative impacts on internal quality attributes despite their frequent complexity. These insights suggest the importance of simplifying refactorings where possible and explicitly stating their goals, as clear intent helps shape more effective and targeted refactoring strategies.
Problem

Research questions and friction points this paper is trying to address.

Investigates refactoring complexity and effectiveness in software maintenance
Explores relationship between refactorings and non-functional requirements
Examines impact of developer-stated intent (SAR) on code quality
Innovation

Methods, ideas, or system contributions that make the work stand out.

Expanded study scope with more projects and refactorings
Analyzed complexity and effectiveness of self-affirmed refactorings
Linked refactorings to non-functional requirements impact
🔎 Similar Papers
No similar papers found.
V
Vinícius Soares
Pontifical Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil
L
Lawrence Arkoh
North Carolina State University, Raleigh, U.S.A
P
Paulo Roberto Farah
Santa Catarina State University, Ibirama, Brazil
Anderson Uchôa
Anderson Uchôa
Associate Professor - Federal University of Ceará, Brazil
Software EngineeringSoftware MaintenanceSocial Software EngineeringSoftware Analytics
Alessandro Garcia
Alessandro Garcia
Associate Professor, Computer Science, Pontifical Catholic University of Rio de Janeiro
Software Engineering
W
Wesley K. G. Assunção
North Carolina State University, Raleigh, U.S.A