Software development often involves systematic edits, similar but nonidentical changes to many code locations, that are error-prone and laborious for developers. Mining and learning such systematic edit patterns (SEPs) from past code changes enable us to detect and repair overlooked buggy code that requires systematic edits. A recent study presented a promising SEP mining technique that is based on program dependence graphs (PDGs), while traditional approaches leverage syntax-based representations. PDG-based SEPs are highly expressive and can capture more meaningful changes than syntax-based ones. The next challenge to tackle is to apply the same code changes as in PDG-based SEPs to other code locations; detection and repair of overlooked locations that require systematic edits. Existing program transformation techniques cannot well address this challenge because (1) they expect many structural code similarities that are not guaranteed in PDG-based SEPs or (2) they work on the basis of PDGs but are limited to specific domains (e.g., API migrations). We present in this paper a general-purpose program transformation algorithm for applying PDG-based SEPs. Our algorithm identifies a small transplantable structural subtree for each PDG node, thereby adapting code changes from PDG-based SEPs to other locations. We construct a program repair pipeline Sirius that incorporates the algorithm and automates the processes of mining SEPs, detecting overlooked code locations (bugs) that require systematic edits, and repairing them by applying SEPs. We evaluated the repair performance of Sirius with a corpus of open source software consisting of over 80 repositories. Sirius achieved a precision of 0.710, recall of 0.565, and F1-score of 0.630, while those of the state-of-the-art technique were 0.470, 0.141, and 0.216, respectively.


翻译:软件开发往往涉及对许多代码位置进行系统编辑、类似但非同质的修改,这些修改对开发者来说容易出错和费力。采矿和从过去的代码修改中学习这种系统化编辑模式(SEP),使我们能够发现和修复需要系统编辑的被忽视的错误代码。最近的一项研究展示了一种有希望的SEP采矿技术,这种技术以程序依赖图为基础,而传统方法则利用基于语法的表示方式。基于PDG的SEP是高度直观的,可以捕捉比基于语法的更有意义的变化。下一步要应对的挑战是将基于PDG的SEP的标准化规则(SEP)的数值修改到其他代码(例如,API的直径迁移)。我们用基于语法的通用程序转换到基于SEP的SEP的精度;探测和需要系统化的忽略地点。我们的算法分别由SIDO的小规模结构变换S,而SL的S-D的S-D的S-Siral 程序则由S-D的Siral IM的S-D的精细化流程进行。

0
下载
关闭预览

相关内容

近期必读的5篇 WSDM 2020【图神经网络(GNN)】相关论文
专知会员服务
56+阅读 · 2020年1月10日
【电子书】Flutter实战305页PDF免费下载
专知会员服务
20+阅读 · 2019年11月7日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
30+阅读 · 2019年10月17日
计算机 | 国际会议信息5条
Call4Papers
3+阅读 · 2019年7月3日
计算机 | IUI 2020等国际会议信息4条
Call4Papers
6+阅读 · 2019年6月17日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
计算机 | 中低难度国际会议信息6条
Call4Papers
7+阅读 · 2019年5月16日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
计算机类 | ISCC 2019等国际会议信息9条
Call4Papers
5+阅读 · 2018年12月25日
计算机类 | LICS 2019等国际会议信息7条
Call4Papers
3+阅读 · 2018年12月17日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
人工智能 | 国际会议截稿信息5条
Call4Papers
6+阅读 · 2017年11月22日
Arxiv
0+阅读 · 2021年9月8日
Arxiv
14+阅读 · 2021年6月27日
Arxiv
3+阅读 · 2018年12月21日
Arxiv
6+阅读 · 2018年2月7日
VIP会员
相关VIP内容
近期必读的5篇 WSDM 2020【图神经网络(GNN)】相关论文
专知会员服务
56+阅读 · 2020年1月10日
【电子书】Flutter实战305页PDF免费下载
专知会员服务
20+阅读 · 2019年11月7日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
30+阅读 · 2019年10月17日
相关资讯
计算机 | 国际会议信息5条
Call4Papers
3+阅读 · 2019年7月3日
计算机 | IUI 2020等国际会议信息4条
Call4Papers
6+阅读 · 2019年6月17日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
计算机 | 中低难度国际会议信息6条
Call4Papers
7+阅读 · 2019年5月16日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
计算机类 | ISCC 2019等国际会议信息9条
Call4Papers
5+阅读 · 2018年12月25日
计算机类 | LICS 2019等国际会议信息7条
Call4Papers
3+阅读 · 2018年12月17日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
人工智能 | 国际会议截稿信息5条
Call4Papers
6+阅读 · 2017年11月22日
Top
微信扫码咨询专知VIP会员