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 条
  • [21] SENSORY: Leveraging Code Statement Sequence Information for Code Snippets Recommendation
    Ai, Lei
    Huang, Zhiqiu
    Li, Weiwei
    Zhou, Yu
    Yu, Yaoshen
    2019 IEEE 43RD ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), VOL 1, 2019, : 27 - 36
  • [22] An Exploratory Study on Code Smells during Code Review in OSS Projects: A Case Study on OpenStack and WikiMedia
    Nanthaamornphong A.
    Boonchieng E.
    Recent Advances in Computer Science and Communications, 2023, 16 (07) : 20 - 33
  • [23] An empirical study of sentiments in code reviews
    El Asri, Ikram
    Kerzazi, Noureddine
    Uddin, Gias
    Khomh, Foutse
    Idrissi, M. A. Janati
    INFORMATION AND SOFTWARE TECHNOLOGY, 2019, 114 : 37 - 54
  • [24] An exploratory study on confusion in code reviews
    Ebert, Felipe
    Castor, Fernando
    Novielli, Nicole
    Serebrenik, Alexander
    EMPIRICAL SOFTWARE ENGINEERING, 2021, 26 (01)
  • [25] An exploratory study on confusion in code reviews
    Felipe Ebert
    Fernando Castor
    Nicole Novielli
    Alexander Serebrenik
    Empirical Software Engineering, 2021, 26
  • [26] Code Review Practices for Refactoring Changes: An Empirical Study on OpenStack
    AlOmar, Eman Abdullah
    Chouchen, Moataz
    Mkaouer, Mohamed Wiem
    Ouni, Ali
    2022 MINING SOFTWARE REPOSITORIES CONFERENCE (MSR 2022), 2022, : 689 - 701
  • [27] Does Code Review Promote Conformance? A Study of OpenStack Patches
    Sri-iesaranusorn, Panyawut
    Kula, Raula Gaikovina
    Ishio, Takashi
    2021 IEEE/ACM 18TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2021), 2021, : 444 - 448
  • [28] Multilingual Code Snippets Training for Program Translation
    Zhu, Ming
    Suresh, Karthik
    Reddy, Chandan K.
    THIRTY-SIXTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE / THIRTY-FOURTH CONFERENCE ON INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE / TWELVETH SYMPOSIUM ON EDUCATIONAL ADVANCES IN ARTIFICIAL INTELLIGENCE, 2022, : 11783 - 11790
  • [29] Machine learning code snippets semantic classification
    Berezovskiy, Valeriy
    Gorodilova, Anastasia
    Trofimova, Ekaterina
    Ustyuzhanin, Andrey
    PEERJ COMPUTER SCIENCE, 2023, 9
  • [30] CodeHint: Dynamic and Interactive Synthesis of Code Snippets
    Galenson, Joel
    Reames, Philip
    Bodik, Rastislav
    Hartmann, Bjorn
    Sen, Koushik
    36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, : 653 - 663