期刊文献+

融合句嵌入模型和代码特征的补丁验证方法

Patch Verification Method Integrating Sentence Embedding Model and Code Features
下载PDF
导出
摘要 补丁验证常用运行测试套件的方法来验证补丁正确性,然而自动修复技术生成的补丁往往数量巨大,而将每个补丁依次通过测试套件则会产生难以承受的开销.针对该问题,本文提出一个由句嵌入模型InferSent和支持向量机分类器组成的静态补丁验证方法.使用InferSent提取代码静态特征并通过支持向量机分类器来预测补丁正确性.该方法更加关注代码的静态特征信息,通过对特征的提取分析,无需运行测试套件即可有效地预测自动修复工具生成的补丁的正确性.本文在多个自动修复工具生成的补丁集合上进行了验证.实验结果表明,在修复工具生成的补丁集合上,本文提出的静态补丁验证方法对补丁预测的F1值达到71.89%,相比其他两种最新静态补丁验证方法分别提高11.64%和6.43%,并在五项评价指标上均优于对比模型.表明该方法可以在不运行测试套件的情况下正确预测补丁,且具有良好的泛化能力. Patch verification often runs a test suite to verify the correctness of patches,however,the number of patches generated by automatic repair techniques is often huge,and passing each patch through the test suite in turn incurs an unbearable overhead.To address this problem,this paper proposes a static patch verification method consisting of a sentence embedding model InferSent and an support vector machine(SVM)classifier.InferSent is used to extract static features of the code and the SVM classifier is used to predict the patch correctness.The method focuses more on the static feature information of the code,and by extracting and analyzing the features,it can effectively predict the correctness of the patches generated by automatic repair tools without running a test suite.In this paper,it is validated on a collection of patches generated by several automatic repair tools.The experimental results show that the static patch validation method proposed in this paper achieves an F1 value of 71.89%for patch prediction on the patch sets generated by the repair tool,which is 11.64%and 6.43%higher than the other two state-of-the-art static patch validation methods,respectively,and outperforms the comparison models in terms of all five evaluation metrics.It is shown that the method can correctly predict patches without running the test suite and has good generalization capability.
作者 蒋婷婷 姜淑娟 韩威 JIANG Ting-ting;JIANG Shu-juan;HAN Wei(School of Computer Science&Technology,China University of Mining and Technology,Xuzhou,Jiangsu 221116,China)
出处 《电子学报》 EI CAS CSCD 北大核心 2023年第12期3450-3456,共7页 Acta Electronica Sinica
关键词 程序自动修复 补丁验证 代码静态特征 句嵌入技术 支持向量机 代码相似性 program automatic repair patch verification code static characteristics sentence embedding technology support vector machine code similarity
  • 相关文献

参考文献1

二级参考文献1

共引文献3

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部