arrow
Return

Why Developers Refactor Source Code: A Mining-based Study

delete2020-09-26
delete34
delete
OA
AI
J
Jevgenija Pantiuchina *
F
Fiorella Zampetti
S
Simone Scalabrino
V
Valentina Piantadosi
R
Rocco Oliveto
G
Gabriele Bavota
M
Massimiliano Di Penta
DOI:10.1145/3408302delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
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.
Keywords:
Refactoring
empirical software engineering
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

U
Universita della Svizzera Italiana
Scholars:
3.3K
Papers: 2.8K
Citations: 3
University of Sannio cover
University of Sannio
Scholars:
2.3K
Papers: 2.2K
Citations: 2.3K
U
University of Molise
Scholars:
2.6K
Papers: 2.6K
Citations: 2.8K
researcher View more organizations