Understanding Code Snippets in Code Reviews: A Preliminary Study of the OpenStack Community
Liming Fu, Peng Liang, Beiqi Zhang

TL;DR
This study investigates the use and purpose of code snippets in OpenStack community code reviews, revealing their limited prevalence, common purposes, and acceptance rates, thus providing insights for improving review practices.
Contribution
It offers the first detailed analysis of code snippets in open-source code reviews, identifying their purposes and acceptance, which informs future review process improvements.
Findings
Code snippets are not frequently used in reviews.
Most code snippets are provided by reviewers.
Approximately 68.1% of suggestion snippets are accepted by developers.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
