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

被引:1
|
作者
Fu, Liming [1 ]
Liang, Peng [1 ]
Zhang, Beiqi [1 ]
机构
[1] Wuhan Univ, Sch Comp Sci, Wuhan, Peoples R China
基金
国家重点研发计划;
关键词
Code Snippet; Code Review; OpenStack;
D O I
10.1145/3524610.3527884
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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% was accepted by developers. The results highlight promising research directions on using code snippets in code reviews.
引用
收藏
页码:152 / 156
页数:5
相关论文
共 50 条
  • [1] Demystifying code snippets in code reviews: a study of the OpenStack and Qt communities and a practitioner survey
    Zhang, Beiqi
    Fu, Liming
    Liang, Peng
    Yu, Jiaxin
    Wang, Chong
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (04)
  • [2] Understanding Code Smell Detection via Code Review: A Study of the OpenStack Community
    Han, Xiaofeng
    Tahir, Amjed
    Liang, Peng
    Counsell, Steve
    Luo, Yajing
    2021 IEEE/ACM 29TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2021), 2021, : 323 - 334
  • [3] Understanding Code Understandability Improvements in Code Reviews
    Oliveira, Delano
    Santos, Reydne
    de Oliveira, Benedito
    Monperrus, Martin
    Castor, Fernando
    Madeiral, Fernanda
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2025, 51 (01) : 14 - 37
  • [4] Symptoms of Architecture Erosion in Code Reviews: A Study of Two OpenStack Projects
    Li, Ruiyin
    Soliman, Mohamed
    Liang, Peng
    Avgeriou, Paris
    IEEE 19TH INTERNATIONAL CONFERENCE ON SOFTWARE ARCHITECTURE (ICSA 2022), 2022, : 24 - 35
  • [5] Code Reviews With Divergent Review Scores: An Empirical Study of the OpenStack and Qt Communities
    Hirao, Toshiki
    McIntosh, Shane
    Ihara, Akinori
    Matsumoto, Kenichi
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (01) : 69 - 81
  • [6] Repeated Builds During Code Review: An Empirical Study of the OpenStack Community
    Maipradit, Rungroj
    Wang, Dong
    Thongtanunam, Patanamon
    Kula, Raula Gaikovina
    Kamei, Yasutaka
    McIntosh, Shane
    2023 38TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE, 2023, : 153 - 165
  • [7] Understanding Developer Commenting in Code Reviews
    Hirao, Toshiki
    Gaikovina Kula, Raula
    Ihara, Akinori
    Matsumoto, Kenichi
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2019, E102D (12): : 2423 - 2432
  • [8] On the Understanding of Programs with Continuous Code Reviews
    Bernhart, Mario
    Grechenig, Thomas
    2013 IEEE 21ST INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2013, : 192 - 198
  • [9] MACs: Mining API code snippets for code reuse
    Hsu, Sheng-Kuei
    Lin, Shi-Jen
    EXPERT SYSTEMS WITH APPLICATIONS, 2011, 38 (06) : 7291 - 7301
  • [10] Modern code reviews - Preliminary results of a systematic mapping study
    Badampudi, Deepika
    Britto, Ricardo
    Unterkalmsteiner, Michael
    PROCEEDINGS OF EASE 2019 - EVALUATION AND ASSESSMENT IN SOFTWARE ENGINEERING, 2019, : 340 - 345