Abstract
Public Code Review (PCR) can be implemented through a Software Question Answering (SQA) community, which facilitates high knowledge dissemination. Current methods mainly focus on the reviewer's perspective, including finding a capable reviewer, predicting comment quality, and recommending/generating review comments. Our intuition is that satisfying review necessity requests can increase their visibility, which in turn is a prerequisite for better review responses. To this end, we propose a unified framework called UniPCR to complete developer-based request quality assurance (i.e., predicting request necessity and recommending tags subtask) under a Masked Language Model (MLM). Specifically, we reformulate both subtasks via 1) text prompt tuning, which converts two subtasks into MLM by constructing prompt templates using hard prompt; 2) code prefix tuning, which optimizes a small segment of generated continuous vectors as the prefix of the code representation using soft prompt. Experimental results on the Public Code Review dataset for the time span 2011-2022 demonstrate that our UniPCR framework adapts to the two subtasks and outperforms comparable accuracy-based results with state-of-the-art methods for request quality assurance. These conclusions highlight the effectiveness of our unified framework from the developer's perspective in public code review.
Abstract (translated)
公共代码审查(PCR)可以通过一个软件问题回答(SQA)社区来实现,这将促进高知识传播。目前的方法主要关注审查者的观点,包括寻找一个有能力的审查者、预测评论质量和推荐/生成评论。我们相信,满足审查者必要要求可以增加他们的可见度,从而成为更好的评论回复的前提条件。为此,我们提出了一个统一框架,名为UniPCR,以在基于掩码语言模型的(MLM)中完成开发人员为基础的请求质量保障(即预测需求和推荐标签子任务)。具体来说,我们通过1)文本提示调整,将两个子任务转化为MLM,通过使用硬提示构建提示模板;2)代码前缀调整,通过使用软提示将生成的连续向量的一部分优化为代码表示的预前缀。对2011-2022年公共代码评论数据集的实验结果表明,我们的UniPCR框架适应这两个子任务,并且与最先进的基于请求质量的保障方法相比,具有卓越的性能。这些结论突出了从开发者角度看待我们统一框架在公共代码审查中的有效性。
URL
https://arxiv.org/abs/2404.07942