Understanding Practitioners' Expectations on Clear Code Review Comments
Junkai Chen, Zhenhao Li, Qiheng Mao, Xing Hu, Kui Liu, Xin Xia
摘要
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%.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- From Static to Dynamic: Benchmarking Real-World Code Review with MCR-Bench 引用了 Using Pre-Trained Models to Boost Code Review Automation
- From Static to Dynamic: Benchmarking Real-World Code Review with MCR-Bench 引用了 SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-Aware Fine-Tuning
- From Static to Dynamic: Benchmarking Real-World Code Review with MCR-Bench 引用了 Automating code review activities by large-scale pre-training
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs 引用了 Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning
- SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-Aware Fine-Tuning 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
- SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-Aware Fine-Tuning 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-Aware Fine-Tuning 引用了 Using Pre-Trained Models to Boost Code Review Automation
- SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-Aware Fine-Tuning 引用了 Automating code review activities by large-scale pre-training
- Automating code review activities by large-scale pre-training 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Automating code review activities by large-scale pre-training 引用了 Using Pre-Trained Models to Boost Code Review Automation
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study 引用了 Using Pre-Trained Models to Boost Code Review Automation
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study 引用了 Automating code review activities by large-scale pre-training
引用它的顶会 Paper4
- Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and ReasoningXin Wang, Zhenhao Li, Zishuo DingASE 2025 · 1 次引用
- From Static to Dynamic: Benchmarking Real-World Code Review with MCR-BenchDewu Zheng, Yanlin Wang, Xiwen Wang, Kefeng Duan 等ISSTA 2026
- Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMsHe Yang Yuan, Xin Wang, Kundi Yao, An Ran Chen 等FSE 2026
- SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-Aware Fine-TuningFang Liu, Simiao Liu, Yinghao Zhu, Xiaoli Lian 等ICSE 2026
它引用的 Paper15
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
- Automating code review activities by large-scale pre-trainingZhiyu Li, Shuai Lu, Daya Guo, Nan Duan 等FSE 2022 · 195 次引用
- Using Pre-Trained Models to Boost Code Review AutomationRosalia Tufano, Simone Masiero, Antonio Mastropaolo, Luca Pascarella 等ICSE 2022 · 149 次引用
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical StudyQi Guo, Junming Cao, Xiaofei Xie, Shangqing Liu 等ICSE 2024 · 107 次引用
相关 Paper
- EvaCRC: Evaluating Code Review CommentsLanxin Yang, Jinwei Xu, Yifan Zhang, He Zhang 等FSE 2023 · 14 次引用
- Towards Automating Code Review ActivitiesRosalia Tufano, Luca Pascarella, Michele Tufano, Denys Poshyvanyk 等ICSE 2021 · 4 次引用
- CodeReviewQA: The Code Review Comprehension Assessment for Large Language ModelsHong Yi Lin, Chunhua Liu, Haoyu Gao, Patanamon Thongtanunam 等ACL Findings 2025 · 7 次引用
- Are They All Good? Studying Practitioners' Expectations on the Readability of Log MessagesZhenhao Li, An Ran Chen, Xing Hu, Xin Xia 等ASE 2023 · 6 次引用
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context LearningMingyang Geng, Shangwen Wang, Dezun Dong, Haotian Wang 等ICSE 2024 · 124 次引用
