Why we refactor? confessions of GitHub contributors
By Danilo Silva, Nikolaos Tsantalis, Marco Tulio de Oliveira Valente. SIGSOFT FSE, 2016
304 citations recorded by the source corpus.
Refactoring is a widespread practice that helps developers to improve the maintainability and readability of their code. However, there is a limited number of studies empirically investigating the actual motivations behind specific refactoring operations applied by developers. To fill this gap, we monitored Java projects hosted on GitHub to detect recently applied refactorings, and asked the developers to explain the reasons behind their decision to refactor the code. By applying thematic analysis on the collected responses, we compiled a catalogue of 44 distinct motivations for 12 well-known refactoring types. We found that refactoring activity is mainly driven by changes in the requirements and much less by code smells. Extract Method is the most versatile refactoring operation serving 11 different purposes. Finally, we found evidence that the IDE used by the developers affects the adoption of automated refactoring tools.
Subfields: Computer Networks and Communications, Information Systems
View Paper: https://www.semanticscholar.org/paper/b85b942784e0a6c9d84553a1ee8b7ea090aaee84
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Computer Networks and Communications
- Tien Nhut Nguyen
- Danny Dig
- Michael C Hilton
- Marco Tulio de Oliveira Valente
- Nikolaos Tsantalis
- Hoan Anh Nguyen
- Shaohua Wang
- Yi Li
In Information Systems
- Tien Nhut Nguyen
- Danny Dig
- Hoan Anh Nguyen
- Matin Mansouri
- Son Van Nguyen
- Michael C Hilton
- Hudson Silva Borges
- Marco Tulio de Oliveira Valente
Citations in the corpus
- Accurate and Efficient Refactoring Detection in Commit History (2018, methodology): “A significant percentage (46% [57]) of refactored program entities are also edited or further refactored in the same commit, a practice commonly referred as floss refactoring [55–57, 64].”
- Graph-Based Mining of In-the-Wild, Fine-Grained, Semantic Code Change Patterns (2019, methodology): “To achieve this high response rate, we used the state-of-the-art Firehouse interview technique [24], [43], in which one would wait for an event to happen and follow up immediately with involved persons.”
- What's in a GitHub Star? Understanding Repository Starring Practices in a Social Coding Platform (2018, background): “select 748 Java projects to study refactoring practices among GitHub contributors [41] and Mazinanian study the adoption of lamba expressions in a large”