arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2008.02944cs.SE
收藏

程序修复中预测Patch正确性的代码变化表示学习评估

Evaluating Representation Learning of Code Changes for Predicting Patch Correctness in Program Repair

Haoye Tian, Kui Liu, Abdoul Kader Kaboreé, Anil Koyuncu, Li Li, Jacques Klein, Tegawendé F. Bissyandé

摘要:

自动程序修复的大量文献开发了生成补丁以针对oracle进行验证的方法(例如,测试套件)。因为这样的预言机可能是不完美的,所以生成的补丁尽管经过了预言机的验证,但实际上可能是不正确的。虽然最先进的探索研究方向,需要动态信息或依赖于手工制作的算法,我们研究学习代码表示的好处,学习深度功能,可能编码的补丁正确性的属性。我们的工作主要是研究不同的表示学习方法的代码变化,以获得嵌入,是服从相似性计算。我们报告基于预训练和重新训练的神经网络产生的嵌入的结果。实验结果表明,嵌入的潜力,使学习算法在推理补丁的正确性:机器学习预测器与BERT变换为基础的嵌入与逻辑回归产生的AUC值约为0.8预测补丁的正确性去重复数据集的1000标记的补丁。我们的研究表明,与依赖于动态信息的最先进的PATCH-SIM相比,学习表示可以带来合理的性能。这些表示可以进一步补充文献中仔细(手动)设计的特征。

英文摘要:

A large body of the literature of automated program repair develops approaches where patches are generated to be validated against an oracle (e.g., a test suite). Because such an oracle can be imperfect, the generated patches, although validated by the oracle, may actually be incorrect. While the state of the art explore research directions that require dynamic information or rely on manually-crafted heuristics, we study the benefit of learning code representations to learn deep features that may encode the properties of patch correctness. Our work mainly investigates different representation learning approaches for code changes to derive embeddings that are amenable to similarity computations. We report on findings based on embeddings produced by pre-trained and re-trained neural networks. Experimental results demonstrate the potential of embeddings to empower learning algorithms in reasoning about patch correctness: a machine learning predictor with BERT transformer-based embeddings associated with logistic regression yielded an AUC value of about 0.8 in predicting patch correctness on a deduplicated dataset of 1000 labeled patches. Our study shows that learned representations can lead to reasonable performance when comparing against the state-of-the-art, PATCH-SIM, which relies on dynamic information. These representations may further be complementary to features that were carefully (manually) engineered in the literature.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑