Understanding Code Snippets in Code Reviews: A Preliminary Study of the OpenStack Community

03/29/2022
by   Liming Fu, et al.
0

Code review is a mature practice for software quality assurance in software development with which reviewers check the code that has been committed by developers, and verify the quality of code. During the code review discussions, reviewers and developers might use code snippets to provide necessary information (e.g., suggestions or explanations). However, little is known about the intentions and impacts of code snippets in code reviews. To this end, we conducted a preliminary study to investigate the nature of code snippets and their purposes in code reviews. We manually collected and checked 10,790 review comments from the Nova and Neutron projects of the OpenStack community, and finally obtained 626 review comments that contain code snippets for further analysis. The results show that: (1) code snippets are not prevalently used in code reviews, and most of the code snippets are provided by reviewers. (2) We identified two high-level purposes of code snippets provided by reviewers (i.e., Suggestion and Citation) with six detailed purposes, among which, Improving Code Implementation is the most common purpose. (3) For the code snippets in code reviews with the aim of suggestion, around 68.1 by developers. The results highlight promising research directions on using code snippets in code reviews.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/21/2021

Understanding Code Smell Detection via Code Review: A Study of the OpenStack Community

Code review plays an important role in software quality control. A typic...
research
06/29/2022

Potential Technical Debt and Its Resolution in Code Reviews: An Exploratory Study of the OpenStack and Qt Communities

Technical Debt (TD) refers to the situation where developers make trade-...
research
05/10/2023

Suggestion Bot: Analyzing the Impact of Automated Suggested Changes on Code Reviews

Peer code reviews are crucial for maintaining the quality of the code in...
research
10/02/2021

Recommending Code Understandability Improvements based on Code Reviews

Developers spend 70 read can save time, while hard-to-read code can lead...
research
01/14/2022

Interpersonal Conflicts During Code Review

Code review consists of manual inspection, discussion, and judgment of s...
research
12/20/2019

On The Effect Of Code Review On Code Smells

Code smells are symptoms of poor design quality. Since code review is a ...
research
07/24/2022

Example Driven Code Review Explanation

Background: Code reviewing is an essential part of software development ...

Please sign up or login with your details

Forgot password? Click here to reset