SampleFix:学习生成功能多样的修复
SampleFix: Learning to Generate Functionally Diverse Fixes
摘要:
自动程序修复具有极大地提高程序员在软件开发过程中的生产力和软件正确性的潜力。机器学习、深度学习和NLP的最新进展重新点燃了最终完全自动化修复程序过程的希望。然而,以前的方法,旨在预测一个单一的修复容易失败,由于程序员的真实意图的不确定性。因此,我们提出了一个生成模型,学习分布在潜在的修复。我们的模型被制定为一个深条件变分自编码器,可以有效地采样修复一个给定的错误程序。为了确保不同的解决方案,我们提出了一种新的正则化,鼓励多样性的语义嵌入空间。我们对常见编程错误的评估首次显示,通过修复高达45%的错误程序,产生了多种修复方法,并对最先进的方法进行了有力的改进。我们还表明,对于65%的修复程序,我们的方法能够生成具有不同功能的多个程序。
英文摘要:
Automatic program repair holds the potential of dramatically improving the productivity of programmers during the software development process and correctness of software in general. Recent advances in machine learning, deep learning, and NLP have rekindled the hope to eventually fully automate the process of repairing programs. However, previous approaches that aim to predict a single fix are prone to fail due to uncertainty about the true intend of the programmer. Therefore, we propose a generative model that learns a distribution over potential fixes. Our model is formulated as a deep conditional variational autoencoder that can efficiently sample fixes for a given erroneous program. In order to ensure diverse solutions, we propose a novel regularizer that encourages diversity over a semantic embedding space. Our evaluations on common programming errors show for the first time the generation of diverse fixes and strong improvements over the state-of-the-art approaches by fixing up to 45% of the erroneous programs. We additionally show that for the 65% of the repaired programs, our approach was able to generate multiple programs with diverse functionalities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。