结合Doc2Vec和BERT嵌入技术的补丁验证方法

被引:4
作者
黄颖
姜淑娟
蒋婷婷
机构
[1] 中国矿业大学矿山数字化教育部工程研究中心
[2] 中国矿业大学计算机科学与技术学院
关键词
自动程序修复; 补丁验证; 代码相似性; 嵌入技术;
D O I
暂无
中图分类号
TP311.53 [];
学科分类号
摘要
自动程序修复是近年来的研究热点并取得了一定的进展。现有的自动程序修复方法大多利用测试套件来验证补丁正确性。然而,使用测试套件验证自动程序修复方法生成的大量候选补丁不仅会造成巨大的开销,不完美的测试套件还会导致补丁的过拟合问题,因此如何提高补丁验证效率、有效验证补丁正确性成为亟待解决的问题。为了降低补丁验证开销并提高补丁正确率,提出了结合两种嵌入技术验证补丁正确性的方法。该方法首先利用Doc2Vec计算补丁与错误代码的相似性,然后使用一个基于BERT模型的分类器过滤通过相似性筛选出的补丁中的错误补丁。为了验证所提方法的有效性,基于5个开源的Java缺陷库进行实验,结果表明该方法能够有效地验证补丁的正确性并提高验证效率。
引用
收藏
页码:83 / 89
页数:7
相关论文
共 12 条
  • [1] 自动程序修复方法研究述评
    王赞
    郜健
    陈翔
    傅浩杰
    樊向宇
    [J]. 计算机学报, 2018, 41 (03) : 588 - 610
  • [2] Cc2vec: Distributed representations of code changes[J] . Hoang T.,Kang H.J.,Lo D.,Lawall J..Proceedings - International Conference on Software Engineering . 2020
  • [3] On the efficiency of test suite based program repair a systematic assessment of 16 automated repair systems for java programs[J] . Liu K.,Wang S.,Koyuncu A.,Kim K.,Bissyande T.F.,Kim D.,Wu P.,Klein J.,Mao X.,Traon Y.L..Proceedings - International Conference on Software Engineering . 2020
  • [4] A machine learning approach to detection of JavaScript-based attacks using AST features and paragraph vectors[J] . Samuel Ndichu,Sangwook Kim,Seiichi Ozawa,Takeshi Misu,Kazuo Makishima.Applied Soft Computing Journal . 2019 (C)
  • [5] code2vec: learning distributed representations of code[J] . Uri Alon,Meital Zilberstein,Omer Levy,Eran Yahav.Proceedings of the ACM on Programming Languages . 2019 (POPL)
  • [6] Automatic Software Repair: A Survey[J] . Luca Gazzola,Daniela Micucci,Leonardo Mariani.IEEE Transactions on Software Engineering . 2019 (1)
  • [7] Automated Classification of Overfitting Patches with Statically Extracted Code Features[J] . He Ye,Jian Gu,Matias Martinez,Thomas Durieux,Martin Monperrus.CoRR . 2019
  • [8] Automatic Patch Generation by Learning Correct Code
    Long, Fan
    Rinard, Martin
    [J]. ACM SIGPLAN NOTICES, 2016, 51 (01) : 298 - 312
  • [9] Efficient Estimation of Word Representations in Vector Space[J] . Tomas Mikolov,Kai Chen 0010,Greg Corrado,Jeffrey Dean.CoRR . 2013
  • [10] GenProg: A Generic Method for Automatic Software Repair[J] . Le Goues, Claire,Nguyen, ThanhVu,Forrest, Stephanie,Weimer, Westley.IEEE Transactions on Software Engineering . 2012 (1)