An Empirical Study on Refactoring-Inducing Pull Requests

08/24/2021
by   Flávia Coelho, et al.
0

Background: Pull-based development has shaped the practice of Modern Code Review (MCR), in which reviewers can contribute code improvements, such as refactorings, through comments and commits in Pull Requests (PRs). Past MCR studies uniformly treat all PRs, regardless of whether they induce refactoring or not. We define a PR as refactoring-inducing, when refactoring edits are performed after the initial commit(s), as either a result of discussion among reviewers or spontaneous actions carried out by the PR developer. Aims: This mixed study (quantitative and qualitative) explores code reviewing-related aspects intending to characterize refactoring-inducing PRs. Method: We hypothesize that refactoring-inducing PRs have distinct characteristics than non-refactoring-inducing ones and thus deserve special attention and treatment from researchers, practitioners, and tool builders. To investigate our hypothesis, we mined a sample of 1,845 Apache's merged PRs from GitHub, mined refactoring edits in these PRs, and ran a comparative study between refactoring-inducing and non-refactoring-inducing PRs. We also manually examined 2,096 review comments and 1,891 detected refactorings from 228 refactoring-inducing PRs. Results: We found 30.2 in our sample and that they significantly differ from non-refactoring-inducing ones in terms of number of commits, code churn, number of file changes, number of review comments, length of discussion, and time to merge. However, we found no statistical evidence that the number of reviewers is related to refactoring-inducement. Our qualitative analysis revealed that at least one refactoring edit was induced by review in 133 (58.3 refactoring-inducing PRs examined. Conclusions: Our findings suggest directions for researchers, practitioners, and tool builders to improve practices around pull-based code review.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/05/2023

Security Defect Detection via Code Review: A Study of the OpenStack and Qt Communities

Background: Despite the widespread use of automated security defect dete...
research
07/12/2018

Predicting Usefulness of Code Review Comments using Textual Features and Developer Experience

Although peer code review is widely adopted in both commercial and open ...
research
08/08/2022

First Come First Served: The Impact of File Position on Code Review

The most popular code review tools (e.g., Gerrit and GitHub) present the...
research
07/14/2023

More Than React: Investigating The Role of Emoji Reaction in GitHub Pull Requests

Open source software development has become more social and collaborativ...
research
02/11/2021

Using Machine Intelligence to Prioritise Code Review Requests

Modern Code Review (MCR) is the process of reviewing new code changes th...
research
10/28/2021

On Wasted Contributions: Understanding the Dynamics of Contributor-Abandoned Pull Requests

Pull-based development has enabled numerous volunteers to contribute to ...
research
03/05/2021

Does chronology matter in JIT defect prediction? A Partial Replication Study

Just-In-Time (JIT) models detect the fix-inducing changes (or defect-ind...

Please sign up or login with your details

Forgot password? Click here to reset