Why we refactor? confessions of GitHub contributors
Open accessThe DOI matches its Crossref record; 36 of the 36 references it cites were found in a registry or an index.
Abstract
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.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Extreme Programming Explained: Embrace Change
Beck, K. L., & Andres, C. (2000) · Cited by 5,902
Refactoring: Improving the Design of Existing Code
Fowler, M. (2002) · Lecture Notes in Computer Science · doi:10.1007/3-540-45672-4_31 · Cited by 5,591
Violin Plots: A Box Plot-Density Trace Synergism
Hintze, J. L., & Nelson, R. D. (1998) · The American Statistician · doi:10.1080/00031305.1998.10480559 · Cited by 1,802 · cited 1×
“Figure 1 shows violin plots [11] with the distribution of”
BackgroundA survey of software refactoring
Mens, T., & Tourwe, T. (2004) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2004.1265817 · Cited by 1,193
Recommended Steps for Thematic Synthesis in Software Engineering
Cruzes, D. S., & Dyba, T. (2011) · 2011 International Symposium on Empirical Software Engineering and Measurement · doi:10.1109/esem.2011.36 · Cited by 960 · cited 2×
“After collecting all responses, we analyzed the answers using thematic analysis [6], a technique for identifying and recording patterns (or “themes”) within a collection of documents.”
MethodFeature location in source code: a taxonomy and survey
Dit, B., Revelle, M., Gethers, M., & Poshyvanyk, D. (2013) · Journal of Software: Evolution and Process · doi:10.1002/smr.567 · Cited by 583
How We Refactor, and How We Know It
Murphy-Hill, E., Parnin, C., & Black, A. P. (2012) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2011.41 · Cited by 547
How are Java software developers using the Eclipse IDE?
Murphy, G. C., Kersten, M., & Findlater, L. (2006) · IEEE Software · doi:10.1109/ms.2006.105 · Cited by 413 · cited 1×
“maintain a healthy code base [10, 4, 27, 19]. For this reason, vast empirical research was recently conducted to extend our knowledge on this practice. Studies on refactoring practices: Murphy et al. [20] record the rst results on refactoring usage, collected using the Mylar Monitor, a standalone framework that collec…”
MethodRecommendation Systems for Software Engineering
Robillard, M., Walker, R., & Zimmermann, T. (2010) · IEEE Software · doi:10.1109/ms.2009.161 · Cited by 388
UMLDiff: an algorithm for object-oriented design differencing
Xing, Z., & Stroulia, E. (2005) · Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/1101908.1101919 · Cited by 374
Cited by
What’s in a GitHub Star? Understanding Repository Starring Practices in a Social Coding Platform
Borges, H., & Tulio Valente, M. (2018) · Journal of Systems and Software · doi:10.1016/j.jss.2018.09.016 · Cited by 317
Accurate and efficient refactoring detection in commit history
Tsantalis, N., Mansouri, M., Eshkevari, L. M., Mazinanian, D., & Dig, D. (2018) · Proceedings of the 40th International Conference on Software Engineering · doi:10.1145/3180155.3180206 · Cited by 300
Self-citationWhy modern open source projects fail
Coelho, J., & Valente, M. T. (2017) · Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering · doi:10.1145/3106237.3106246 · Cited by 160
“is project. (R6) Therefore, for the first survey question, we collected 154 answers (118 answers by e-mail and 36 answers from the projects’ README). We analyzed these answers using thematic analysis [10, 33], a technique for identifying and recording “themes” (i.e., patterns) in textual documents. Thematic analysis i…”
MethodSelf-citationChatGPT: A Study on its Utility for Ubiquitous Software Engineering Tasks
Sridhara, G., G., R. H., & Mazumdar, S. (2023) · arXiv · doi:10.48550/arxiv.2305.16837 · Cited by 68
“Background: Code refactoring is a software maintenance activity in which developers modify the code to make it more readable and hence increase maintainability [Silva et al.(2016)].”
PYEVOLVE: Automating Frequent Code Changes in Python ML Systems
Dilhara, M., Dig, D., & Ketkar, A. (2023) · 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE) · doi:10.1109/icse48619.2023.00091 · Cited by 46
“Thus, they will appeal to developers who might not like hard-coded refactoring tools that automate code changes [45], [84] without any intervention from the developer.”
BackgroundIndustry experiences with large-scale refactoring
Ivers, J., Nord, R. L., Ozkaya, I., Seifried, C., Timperley, C. S., & Kessentini, M. (2022) · Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3540250.3558954 · Cited by 19
“Furthermore, studies analyzing GitHub contributions reveal that refactorings are driven more often by changing requirements than by code smells [34].”
BackgroundFerino, S., Hoda, R., Grundy, J., & Treude, C. (2025) · arXiv · doi:10.48550/arxiv.2503.07556 · Cited by 1
Metadata
- Authors
- Silva, D., Tsantalis, N., & Valente, M. T.
- Venue
- Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering
- Publisher
- ACM
- Published
- 2016-11
- Pages
- 858-870
- OpenAlex
- W2476494490
- Cited by
- 280
- References
- 36
- FWCI
- 20.80
- Type
- conference paper
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.