Why Developers Refactor Source Code: A Mining-based Study

01/05/2021
by   Jevgenija Pantiuchina, et al.
0

Refactoring aims at improving code non-functional attributes without modifying its external behavior. Previous studies investigated the motivations behind refactoring by surveying developers. With the aim of generalizing and complementing their findings, we present a large-scale study quantitatively and qualitatively investigating why developers perform refactoring in open source projects. First, we mine 287,813 refactoring operations performed in the history of 150 systems. Using this dataset, we investigate the interplay between refactoring operations and process (e.g., previous changes/fixes) and product (e.g., quality metrics) metrics. Then, we manually analyze 551 merged pull requests implementing refactoring operations and classify the motivations behind the implemented refactorings (e.g., removal of code duplication). Our results led to (i) quantitative evidence of the relationship existing between certain process/product metrics and refactoring operations and (ii) a detailed taxonomy, generalizing and complementing the ones existing in the literature, of motivations pushing developers to refactor source code.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/10/2022

Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship Between Technical Debt and Refactoring

To meet project timelines or budget constraints, developers intentionall...
research
04/29/2023

Leveraging Data Mining Algorithms to Recommend Source Code Changes

Context: Recent research has used data mining to develop techniques that...
research
03/10/2020

Refactoring Graphs: Assessing Refactoring over Time

Refactoring is an essential activity during software evolution. Frequent...
research
08/19/2022

Fixing Dockerfile Smells: An Empirical Study

Background. Containerization technologies are widely adopted in the DevO...
research
10/28/2021

On the Importance and Shortcomings of Code Readability Metrics: A Case Study on Reactive Programming

Well structured and readable source code is a pre-requisite for maintain...
research
10/24/2019

How Do Code Changes Evolve in Different Platforms? A Mining-based Investigation

Code changes are performed differently in the mobile and non-mobile plat...
research
05/26/2019

Improving Change Prediction Models with Code Smell-Related Information

Code smells represent sub-optimal implementation choices applied by deve...

Please sign up or login with your details

Forgot password? Click here to reset