Refactoring is a common activity in software development. Developers make changes in the code in order to achieve a desired effect such as better performance, conformance to new business rules, or the removal of code anti-patterns such as code smells. However, refactoring operations often fail to achieve the results that are expected of them. There have been many studies conducted to assess their impact and effectiveness in different scenarios, but they have not returned consistent results. At times, studies have even shown decreasing and increasing in code quality from the same operation.
This study investigated whether a common set of well-known refactoring actions defined by Fowler aligned with the terms and actions discussed by developers in the process of refactoring. It obtained these scenarios by looking into Stack Overflow posts discussing refactoring to see what actions and goals users were pursing. We hypothesis that there may be discrepancies between the actions discussed and the context (i.e., web-development vs. database) or technology (i.e., Java, PHP, Python) where different refactorings are more easily implemented.
It was found that the number of identifiable refactoring scenarios increases when the scenario contains matching components described in the methods (i.e., Extract Method, Rename Class, etc.). Additionally, developers often only have a vague conception of what actions they believe will achieve the goals of their refactor. The conclusion drawn from these results is that refactoring suggestions must be aware of the context they will be applied to in order to align with the developer's expectations. These methods also must be explicitly aligned with specific quality improvements or changes in order for developers to feel more comfortable using them to communicate their refactoring intentions.
Library of Congress Subject Headings
Software refactoring; Computer storage devices; Error messages (Computer science); Computer software--Quality control
Software Engineering (MS)
Department, Program, or Center
Software Engineering (GCCIS)
Mohamed Wiem Mkaouer
J. Scott Hawker
Simmons, Steven David, "Conceptions of Refactoring: An Investigation of Stack Overflow Posts" (2020). Thesis. Rochester Institute of Technology. Accessed from
RIT – Main Campus