文档介绍:: .
计算机科学 颖 姜淑娟 蒋婷婷
中国矿业大学矿山数字化教育部工程研究中心 江苏 徐州 221116
中国矿业大学计算机科学与技术学院 江苏 徐州 221116
摘 要 自动程序修复是近年来的研究热点并取得了一定的进展。现有的自动程序修复方法大多利用测试套
件验证补丁正确性。然而,使用测试套件验证该方法生成的大量候选补丁不仅会造成巨大的开销,不完美
的测试套件还会导致补丁的过拟合问题,因此如何提高补丁验证效率、有效验证补丁正确性成为亟待解决
的问题。为了降低补丁验证开销并提高补丁正确率,提出了结合两种嵌入技术验证补丁正确性的方法。该
方法首先利用 Doc2Vec 计算补丁与错误代码的相似性,然后使用一个基于 BERT 模型的分类器过滤通过相
似性筛选出的补丁中的错误补丁。为了验证该方法的有效性,基于 5 个开源的 Java 缺陷库进行实验。结
果表明该方法能够有效地验证补丁的正确性并提高验证效率。
关键词:自动程序修复;补丁验证;代码相似性;嵌入技术
中图法分类号 TP311 DOI:
Patch Validation Approach Combining Doc2Vec and BERT
Embedding Technologies
HUANG Ying,JIANG Shu-juan and JIANG Ting-ting
Engineering Research Center of Mine Digitalization of ministry of Education, China University of Mining and
Technology, Xuzhou , Jiangsu 221116, China
School of Computer Science and Technology,China University of Mining and Technology, Xuzhou,Jiangsu
221116,China
Abstract Automatic program repair is a research hotspot in recent years and has made some progress. Most of the existing automatic
program repair methods use the test suite to validate patch correctness. However, using the test suite to validate a large number of
candidate patches will not only bring huge costs, but also lead to the overfitting problem