论文标题
评估代码更改的表示表示,以预测程序修复中的补丁正确性
Evaluating Representation Learning of Code Changes for Predicting Patch Correctness in Program Repair
论文作者
论文摘要
自动化程序维修的大量文献开发了方法,在这些方法中生成了针对甲骨文的验证(例如,测试套件)。因为这样的甲骨文可能不完美,所以生成的补丁虽然由甲骨文验证,但实际上可能是不正确的。尽管最新的状态探索了需要动态信息或依靠手动制作的启发式方法的研究方向,但我们研究了学习代码表示的好处,以学习可能编码贴片正确性属性的深度特征。我们的工作主要调查不同表示的学习方法,以更改代码更改,以得出与相似性计算相似的嵌入。我们根据预先训练和经过重新训练的神经网络产生的嵌入性研究结果报告。实验结果表明,嵌入在有关贴片正确性的推理中赋予学习算法的潜力:具有基于BERT Transformer基于BERT Transformer的嵌入的机器学习预测器与逻辑回归相关的嵌入在预测1000个标记贴片的DEDUPLICATICATICATED数据集上的AUC值约为0.8。我们的研究表明,在与最先进的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.