Understanding Practitioners' Expectations on Clear Code Review Comments

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Chen, Junkai, Li, Zhenhao, Mao, Qiheng, Hu, Xing, Liu, Kui, Xia, Xin
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866908335459008512
author Chen, Junkai
Li, Zhenhao
Mao, Qiheng
Hu, Xing
Liu, Kui
Xia, Xin
author_facet Chen, Junkai
Li, Zhenhao
Mao, Qiheng
Hu, Xing
Liu, Kui
Xia, Xin
contents The code review comment (CRC) is pivotal in the process of modern code review. It provides reviewers with the opportunity to identify potential bugs, offer constructive feedback, and suggest improvements. Clear and concise code review comments (CRCs) facilitate the communication between developers and are crucial to the correct understanding of the identified issues and proposed solutions. Despite the importance of CRCs' clarity, there is still a lack of guidelines on what constitutes a good clarity and how to evaluate it. In this paper, we conduct a comprehensive study on understanding and evaluating the clarity of CRCs. We first derive a set of attributes related to the clarity of CRCs, namely RIE attributes (i.e., Relevance, Informativeness, and Expression), as well as their corresponding evaluation criteria based on our literature review and survey with practitioners. We then investigate the clarity of CRCs in open-source projects written in nine programming languages and find that a large portion (i.e., 28.8%) of the CRCs lack the clarity in at least one of the attributes. Finally, we explore the potential of automatically evaluating the clarity of CRCs by proposing ClearCRC. Experimental results show that ClearCRC with pre-trained language models is promising for effective evaluation of the clarity of CRCs, achieving a balanced accuracy up to 73.04% and a F-1 score up to 94.61%.
format Preprint
id arxiv_https___arxiv_org_abs_2410_06515
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Understanding Practitioners' Expectations on Clear Code Review Comments
Chen, Junkai
Li, Zhenhao
Mao, Qiheng
Hu, Xing
Liu, Kui
Xia, Xin
Software Engineering
The code review comment (CRC) is pivotal in the process of modern code review. It provides reviewers with the opportunity to identify potential bugs, offer constructive feedback, and suggest improvements. Clear and concise code review comments (CRCs) facilitate the communication between developers and are crucial to the correct understanding of the identified issues and proposed solutions. Despite the importance of CRCs' clarity, there is still a lack of guidelines on what constitutes a good clarity and how to evaluate it. In this paper, we conduct a comprehensive study on understanding and evaluating the clarity of CRCs. We first derive a set of attributes related to the clarity of CRCs, namely RIE attributes (i.e., Relevance, Informativeness, and Expression), as well as their corresponding evaluation criteria based on our literature review and survey with practitioners. We then investigate the clarity of CRCs in open-source projects written in nine programming languages and find that a large portion (i.e., 28.8%) of the CRCs lack the clarity in at least one of the attributes. Finally, we explore the potential of automatically evaluating the clarity of CRCs by proposing ClearCRC. Experimental results show that ClearCRC with pre-trained language models is promising for effective evaluation of the clarity of CRCs, achieving a balanced accuracy up to 73.04% and a F-1 score up to 94.61%.
title Understanding Practitioners' Expectations on Clear Code Review Comments
topic Software Engineering
url https://arxiv.org/abs/2410.06515