Litcius/Paper detail

Why Do Developers Reject Refactorings in Open-Source Projects?

Jevgenija Pantiuchina, Bin Lin, Fiorella Zampetti, Massimiliano Di Penta, Michele Lanza, Gabriele Bavota

2021ACM Transactions on Software Engineering and Methodology12 citationsDOI

Abstract

Refactoring operations are behavior-preserving changes aimed at improving source code quality. While refactoring is largely considered a good practice, refactoring proposals in pull requests are often rejected after the code review. Understanding the reasons behind the rejection of refactoring contributions can shed light on how such contributions can be improved, essentially benefiting software quality. This article reports a study in which we manually coded rejection reasons inferred from 330 refactoring-related pull requests from 207 open-source Java projects. We surveyed 267 developers to assess their perceived prevalence of these identified rejection reasons, further complementing the reasons. Our study resulted in a comprehensive taxonomy consisting of 26 refactoring-related rejection reasons and 21 process-related rejection reasons. The taxonomy, accompanied with representative examples and highlighted implications, provides developers with valuable insights on how to ponder and polish their refactoring contributions, and indicates a number of directions researchers can pursue toward better refactoring recommenders.

Topics & Concepts

Code refactoringComputer scienceJavaCode smellSoftware engineeringQuality (philosophy)Source codeTaxonomy (biology)Code (set theory)Open sourceSoftware qualitySoftwareProgramming languageSoftware developmentSet (abstract data type)BiologyPhilosophyEpistemologyBotanySoftware Engineering ResearchAdvanced Malware Detection TechniquesSoftware Reliability and Analysis Research