Core Concepts
A unified prompt tuning framework (UniPCR) that effectively completes both request necessity prediction and tag recommendation subtasks in public code review.
Abstract
The paper proposes a unified framework called UniPCR to address the request quality assurance task in public code review. The task involves two subtasks: request necessity prediction and tag recommendation.
Key highlights:
- The UniPCR framework reformulates the traditional discriminative learning approaches for the two subtasks into a generative learning framework using prompt tuning.
- For the text part of the request, UniPCR applies hard prompt to construct descriptive prompt templates. For the code part, it uses soft prompt to optimize a small segment of continuous vectors as the prefix of the code representation.
- Experimental results on a public code review dataset show that UniPCR outperforms state-of-the-art methods for both subtasks, demonstrating the effectiveness of the unified prompt tuning approach.
- Ablation studies confirm the importance of both text prompt tuning and code prefix tuning components in the UniPCR framework.
The unified framework provides a simple and efficient way to address multiple subtasks in public code review, without the need for task-specific model architectures. This highlights the potential of prompt tuning techniques in software engineering applications.
Stats
The request necessity prediction subtask achieved an accuracy of 79.8%, with F1 scores of 81.7% for necessary requests and 77.5% for unnecessary requests.
The tag recommendation subtask achieved precision@3 of 61.0%, recall@3 of 68.8%, and F1@3 of 61.9%.
Quotes
"Our intuition is that well-crafted code review requests are essential to eliciting quality responses."
"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."