一句话:提出可解释的概念模型与基于多标签学习的EvaCRC,用于自动评估代码审查评论质量并给出评级理由。
代码审查中开发者通过评论给出反馈,但评论质量缺乏公认评估方法。本文提出EvaCRC:先通过混合方法,三角验证权威代码审查标准与学术文献,收集并综合评论质量属性,再用真实实例验证,并请领域专家建立质量属性与等级的映射,形成可解释的概念模型;随后利用多标签学习实现评论的自动评估。为评估和改进EvaCRC,作者在一家全球ICT企业开展工业案例研究。结果表明,EvaCRC能有效评估审查评论,同时为所得等级提供理由,兼顾自动化与可解释性。
In code reviews, developers examine code changes authored by peers and provide feedback through comments. Despite the importance of these comments, no accepted approach currently exists for assessing their quality. Therefore, this study has two main objectives: (1) to devise a conceptual model for an explainable evaluation of review comment quality, and (2) to develop models for the automated evaluation of comments according to the conceptual model. To do so, we conduct mixed-method studies and propose a new approach: EvaCRC (Evaluating Code Review Comments). To achieve the first goal, we collect and synthesize quality attributes of review comments, by triangulating data from both authoritative documentation on code review standards and academic literature. We then validate these attributes using real-world instances. Finally, we establish mappings between quality attributes and grades by inquiring domain experts, thus defining our final explainable conceptual model. To achieve the second goal, EvaCRC leverages multi-label learning. To evaluate and refine EvaCRC, we conduct an industrial case study with a global ICT enterprise. The results indicate that EvaCRC can effectively evaluate review comments while offering reasons for the grades. Data and materials: https://doi.org/10.5281/zenodo.8297481