Why We Refactor? Confessions of GitHub Contributors
arXiv:1607.02459 · doi:10.1145/2950290.2950305
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 ex- plain 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.
Paper accepted at 24th International Symposium on the Foundations of Software Engineering (FSE), pages 1-12, 2016
Cited by in corpus (25)
- Why Modern Open Source Projects Fail
- RefDiff: Detecting Refactorings in Version Histories
- How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics in Stack Overflow
- How We Refactor and How We Document it? On the Use of Supervised Machine Learning Algorithms to Classify Refactoring Documentation
- EM-Assist: Safe Automated ExtractMethod Refactoring with LLMs
- Why and How Java Developers Break APIs
- Why We Engage in FLOSS: Answers from Core Developers
- PHANTOM: Curating GitHub for engineered software projects using time-series clustering
- Studying Duplicate Logging Statements and Their Relationships with Code Clones
- Do Design Metrics Capture Developers Perception of Quality? An Empirical Study on Self-Affirmed Refactoring Activities
- The Android Update Problem: An Empirical Study
- Learning Quick Fixes from Code Repositories
- Empirical Study of Co-Renamed Identifiers
- Recommending Extract Method Refactoring Based on Confidence of Predicted Method Name
- On The Effect Of Code Review On Code Smells
- What Developers Ask to ChatGPT in GitHub Pull Requests? an Exploratory Study
- Impact of Change Granularity in Refactoring Detection
- Understanding Code Change with Micro-Changes
- Automatic Clone Recommendation for Refactoring Based on the Present and the Past
- RefSearch: A Search Engine for Refactoring
- An Empirical Study on the Impact of Change Granularity in Refactoring Detection
- RefactorHub: A Commit Annotator for Refactoring
- LightSys: Lightweight and Efficient CI System for Improving Integration Speed of Software
- A Catalogue of Game-Specific Software Nuggets
- Why Developers Refactor Source Code: A Mining-based Study