Automated Program Repair (APR) techniques have shown more and more promising results in fixing real-world bugs. Despite the effectiveness, APR techniques still face an overfitting problem: a generated patch can be incorrect although it passes all tests. It is time-consuming to manually evaluate the correctness of generated patches that can pass all tests. To address this problem, many approaches have been proposed to automatically assess the correctness of patches generated by APR techniques. However, existing approaches require a large set of manually labeled patches as the training data. To mitigate the issue, in this study, we propose PatchZero, the patch correctness assessment by adopting large pre-trained models. Specifically, for patches generated by a new or unseen APR tool, PatchZero does not need labeled patches of this new or unseen APR tool for training (i.e., zero-shot) but directly queries the large pre-trained model to get predictions on the correctness labels without training. In this way, PatchZero can reduce the manual labeling effort when building a model to automatically assess the correctness of generated patches of new APR tools. To provide knowledge regarding the automatic patch correctness assessment (APCA) task to the large pre-trained models, we also design an instance-wise demonstration formation strategy by using contrastive learning. Specifically, PatchZero selects semantically similar patches to help the large pre-trained model to give more accurate predictions on the unlabeled patches. Our experimental results showed that PatchZero can achieve an accuracy of 82.7% and an F1-score of 86.0% on average although no labeled patch of the new or unseen APR tool is available. In addition, our proposed technique outperformed the prior state-of-the-art by a large margin.


翻译:自动程序修补( APR) 技术在修复真实世界错误方面显示出更多、更有希望的结果。 尽管效果有效, RAPR 技术仍然面临着一个过于完善的问题: 生成的补丁虽然通过所有测试, 也可能不正确。 手动评价生成的补丁的正确性, 可以通过所有测试来完成。 为了解决这个问题, 已经提出了许多方法来自动评估 RA 技术产生的补丁的正确性。 但是, 现有的方法需要用大量手工贴上标签的补丁作为培训数据。 为了减轻问题, 我们在本研究中建议采用大型预培训模型, 补丁( PatchZero ), 补丁评估补丁是否正确。 具体来说, PatchZero 不需要手动手动评估所生成的补丁是否正确性, 而直接询问大型预训练模型, 无需培训, PatchZero 可以在建立新模型时减少手工标签的补丁, 尽管在新REAR 工具预设的补缺补丁中可以自动评估新补缺的补补缺的补缺的补, 也可以通过常规的预选的补丁 。</s>

0
下载
关闭预览

相关内容

专知会员服务
123+阅读 · 2020年9月8日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
100+阅读 · 2019年10月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
可解释的CNN
CreateAMind
17+阅读 · 2017年10月5日
【推荐】SLAM相关资源大列表
机器学习研究会
10+阅读 · 2017年8月18日
【推荐】图像分类必读开创性论文汇总
机器学习研究会
14+阅读 · 2017年8月15日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Arxiv
17+阅读 · 2021年2月15日
Arxiv
13+阅读 · 2019年11月14日
Arxiv
19+阅读 · 2018年10月25日
Arxiv
19+阅读 · 2018年5月17日
Arxiv
10+阅读 · 2017年7月4日
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
可解释的CNN
CreateAMind
17+阅读 · 2017年10月5日
【推荐】SLAM相关资源大列表
机器学习研究会
10+阅读 · 2017年8月18日
【推荐】图像分类必读开创性论文汇总
机器学习研究会
14+阅读 · 2017年8月15日
相关基金
Top
微信扫码咨询专知VIP会员