学习使用Graph2Diff神经网络修复构建错误
Learning to Fix Build Errors with Graph2Diff Neural Networks
摘要:
专业的软件开发人员花费大量的时间来修复构建,但这在自动程序修复中很少受到关注。我们提出了一个新的深度学习架构,称为Graph2Diff,用于自动定位和修复构建错误。我们将源代码、构建配置文件和编译器诊断消息表示为图,然后使用图神经网络模型来预测差异。diff指定如何修改代码的抽象语法树,在神经网络中表示为一系列标记和指向代码位置的指针。我们的网络是一个更通用的抽象的实例,我们称之为Graph2Tocopo,它在任何预测源代码更改的开发工具中都可能有用。我们在超过50万个真实构建错误的数据集上评估了该模型,并从专业开发人员那里获得了解决方案。与DeepDelta的方法(Mesbah等人,2019年),我们的方法解决了预测更精确差异的更困难的任务,但仍然实现了两倍以上的准确性。
英文摘要:
Professional software developers spend a significant amount of time fixing builds, but this has received little attention as a problem in automatic program repair. We present a new deep learning architecture, called Graph2Diff, for automatically localizing and fixing build errors. We represent source code, build configuration files, and compiler diagnostic messages as a graph, and then use a Graph Neural Network model to predict a diff. A diff specifies how to modify the code's abstract syntax tree, represented in the neural network as a sequence of tokens and of pointers to code locations. Our network is an instance of a more general abstraction that we call Graph2Tocopo, which is potentially useful in any development tool for predicting source code changes. We evaluate the model on a dataset of over 500k real build errors and their resolutions from professional developers. Compared to the approach of DeepDelta (Mesbah et al., 2019), our approach tackles the harder task of predicting a more precise diff but still achieves over double the accuracy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。