arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.07942cs.SEcs.AI
收藏

公共代码审查中请求质量保证的统一提示调优研究

On Unified Prompt Tuning for Request Quality Assurance in Public Code Review

School of Computer Science and Artificial Intelligence, Wuhan University of Technology(武汉理工大学计算机科学与人工智能学院);School of Computer Science, Wuhan University(武汉大学计算机学院)

Xinyu Chen, Lin Li, Rui Zhang, Peng Liang

AI总结:

针对公共代码审查现有方法多聚焦审查者视角的问题,提出统一框架UniPCR,结合文本硬提示调优与代码软前缀调优,在MLM下完成开发者侧请求质量保证双任务,实验准确率优于现有最优方法。

摘要:

公共代码审查(Public Code Review,PCR)可通过软件问答(Software Question Answering,SQA)社区实现,有助于实现高知识传播效率。现有方法主要从审查者视角展开研究,涵盖寻找合适审查者、预测评论质量、推荐/生成审查评论等方向。我们的核心思路是:满足审查必要性的请求能获得更高曝光度,而这是得到更优审查回复的前提。为此,我们提出名为UniPCR的统一框架,在掩码语言模型(Masked Language Model,MLM)下完成基于开发者的请求质量保证任务(即预测请求必要性与标签推荐子任务)。具体而言,我们通过两种方式重构两个子任务:1)文本提示调优,采用硬提示构建提示模板,将两个子任务转化为MLM任务;2)代码前缀调优,使用软提示优化一小段生成的连续向量,作为代码表示的前缀。在时间跨度为2011-2022年的Public Code Review数据集上的实验结果表明,我们的UniPCR框架可适配两个子任务,且在请求质量保证任务上的准确率优于现有最优方法的可比结果。这些结论凸显了我们从开发者视角提出的统一框架在公共代码审查中的有效性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑