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 条
  • [41] Understanding the code
    Nybo, Kristie
    Roberts, Sir Richard
    BIOTECHNIQUES, 2013, 54 (03) : 117 - 117
  • [42] Fine-Grained Analysis of Similar Code Snippets
    Galasso, Jessie
    Famelis, Michalis
    Sahraoui, Houari
    REUSE AND SOFTWARE QUALITY (ICSR 2022), 2022, 13297 : 3 - 21
  • [43] Understanding shared links and their intentions to meet information needs in modern code review: A case study of the OpenStack and Qt projects
    Wang, Dong
    Xiao, Tao
    Thongtanunam, Patanamon
    Kula, Raula Gaikovina
    Matsumoto, Kenichi
    EMPIRICAL SOFTWARE ENGINEERING, 2021, 26 (05)
  • [44] Understanding shared links and their intentions to meet information needs in modern code review:A case study of the OpenStack and Qt projects
    Dong Wang
    Tao Xiao
    Patanamon Thongtanunam
    Raula Gaikovina Kula
    Kenichi Matsumoto
    Empirical Software Engineering, 2021, 26
  • [45] On the estimation of the execution frequency of sequential program code snippets
    V. Yu. Korolev
    R. L. Smelyanskii
    T. R. Smelyanskii
    A. V. Shalimov
    Journal of Computer and Systems Sciences International, 2015, 54 : 540 - 545
  • [46] UNDERSTANDING THE CODE
    Davis, Michael W.
    JOURNAL OF THE AMERICAN DENTAL ASSOCIATION, 2009, 140 (11): : 1344 - +
  • [47] Towards Better Code Snippets: Exploring How Code Snippet Recall Differs with Programming Experience
    Ichinco, Michelle
    Kelleher, Caitlin
    2017 IEEE SYMPOSIUM ON VISUAL LANGUAGES AND HUMAN-CENTRIC COMPUTING (VL/HCC), 2017, : 37 - 41
  • [48] Towards automatically generating block comments for code snippets
    Huang, Yuan
    Huang, Shaohao
    Chen, Huanchao
    Chen, Xiangping
    Zheng, Zibin
    Luo, Xiapu
    Jia, Nan
    Hu, Xinyu
    Zhou, Xiaocong
    INFORMATION AND SOFTWARE TECHNOLOGY, 2020, 127
  • [49] SLAMPA: Recommending Code Snippets with Statistical Language Model
    Zhou, Shufan
    Zhong, Hao
    Shen, Beijun
    2018 25TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2018), 2018, : 79 - 88
  • [50] On the estimation of the execution frequency of sequential program code snippets
    Korolev, V. Yu.
    Smelyanskii, R. L.
    Smelyanskii, T. R.
    Shalimov, A. V.
    JOURNAL OF COMPUTER AND SYSTEMS SCIENCES INTERNATIONAL, 2015, 54 (04) : 540 - 545