RAID: Tool Support for Refactoring-Aware Code Reviews

Rodrigo Brito, Marco Tulio Valente
3/21/2021
cs.SE

Official code: rodrigo-brito/refactoring-aware-diff (86 stars, JavaScript, MIT, last commit 2021-09-19).

Abstract

Code review is a key development practice that contributes to improve software quality and to foster knowledge sharing among developers. However, code review usually takes time and demands detailed and time-consuming analysis of textual diffs.

Show full abstract

Particularly, detecting refactorings during code reviews is not a trivial task, since they are not explicitly represented in diffs. For example, a Move Function refactoring is represented by deleted (-) and added lines (+) of code which can be located in different and distant source code files. To tackle this problem, we introduce RAID, a refactoring-aware and intelligent diff tool. Besides proposing an architecture for RAID, we implemented a Chrome browser plug-in that supports our solution. Then, we conducted a field experiment with eight professional developers who used RAID for three months. We concluded that RAID can reduce the cognitive effort required for detecting and reviewing refactorings in textual diff. Besides documenting refactorings in diffs, RAID reduces the number of lines required for reviewing such operations. For example, the median number of lines to be reviewed decreases from 14.5 to 2 lines in the case of move refactorings and from 113 to 55 lines in the case of extractions.

View on arXivView PDF

Code Implementations(1)

MIT

RAID is a tool pipeline that seamlessly enriches GitHub diff results with refactoring information.

865JavaScript, HTMLJan 7, 20205 years agoMIT
actionschrome-extensionrefactoringreview-tools

Similar Papers

Cite this paper

@article{brito2021raid,
  title  = {RAID: Tool Support for Refactoring-Aware Code Reviews},
  author = {Rodrigo Brito and Marco Tulio Valente},
  year   = {2021},
  eprint = {2103.11453},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.11453}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.11453.svg)](https://codeofpaper.com/paper/2103.11453)

Discussion