Automated program repair (APR) attempts to generate correct patches and has drawn wide attention from both academia and industry in the past decades. However, APR is continuously struggling with the patch overfitting issue due to the weak test suites. Thus, to address the overfitting problem, the community has proposed an increasing number of approaches to predict patch correctness (APCA approaches). Among them, locally deep learning approaches aimed at automatically match designs has been emerging strongly. Such approaches typically encode input code snippets into well-designed representations and build a binary model for correctness prediction. Despite being fundamental in reason about patch correctness, code representation has not been systematically investigated. To bridge this gap, we perform the first extensive study to evaluate the performance of different code representations on predicting patch correctness from more than 500 trained APCA models. The experimental results on 15 benchmarks with four categories and 11 classifiers show that the graph-based code representation which is ill-explored in the literature, consistently outperforms other representations, e.g., an average accuracy of 82.6% for CPG across three GNN models. Moreover, we demonstrate that such representations can achieve comparable or better performance for three different previous APCA approaches, e.g., filtering out 87.09% overfitting patches by TREETRAIN with AST. We further find that integrating sequence-based representation into heuristic-based representation is able to yield an average improvement of 13.5% on five metrics. Overall, our study highlights the potential and challenges of utilizing code representation to reason about patch correctness, thus increasing the usability of off-the-shelf APR tools and reducing the manual debugging effort of developers in practice.
Attention: Not Just Another Dataset for Patch-Correctness Checking
自动程序修复(Automated Program Repair,APR)技术已引起学术界和工业界的广泛关注。同时,当前最先进的APR工具的一个主要限制是,通过所有原始测试的补丁不一定是开发人员想要的正确补丁,即,合理的补丁问题。迄今为止,已经提出了各种补丁正确性检查(PCC)技术来解决这个重要问题。然而,它们仅在非常有限的数据集上进行评估,因为用于生成此类补丁的APR工具只能探索可能补丁的搜索空间的一小部分,对现有PCC研究的外部有效性构成严重威胁。在本文中,我们构建了一个广泛的PCC数据集(据我们所知最大的手动标记的PCC数据集),以重新审视所有最先进的PCC技术。更具体地说,我们的PCC数据集包括从最近的PraPR APR工具生成的1,988个补丁,该工具利用高度优化的字节码级别补丁执行,并可以在其大型预定义的搜索空间内彻底探索所有可能的合理补丁(包括众所周知的修复模式)来自各种以前的APR工具)。我们对新数据集上代表性PCC技术的广泛研究揭示了各种令人惊讶的发现,并为未来的PCC研究提供了指导。
How Different Is It Between Machine-Generated and Developer-Provided Patches? An Empirical Study on The Correct Patches Generated by Automated Program Repair Techniques
背景资料:多年来,自动程序修复(Automated Program Repair,APR)由于能够降低修复错误的成本而受到学术界和工业界的广泛关注。然而,如何评估补丁的正确性仍然是一个开放的挑战。两种广泛采用的方法来应对这一挑战,包括手动检查和使用自动生成的测试进行验证,都是有偏见的(即,分别遭受主观性和低精度)。目的:为了解决这一问题,我们建议进行实证研究,了解正确的补丁,由现有的国家的最先进的APR技术,旨在为未来的补丁评估提供指导方针。方法:为此,我们首先提出了一个文献综述(LR)报告的正确补丁生成的最新技术的缺陷4J基准和收集177个正确的补丁后,健全检查的过程。我们研究了这些机器生成的正确补丁是如何实现语义等价的,但与开发人员提供的补丁相比在语法上存在差异,这些补丁如何在不同的项目和APR技术中分布,以及错误的特征如何影响为其生成的补丁。我们的主要发现包括:1)我们不需要像开发人员那样修复bug,因为我们观察到25.4%(45/177)2)机器生成的正确补丁的分布在Defects 4J项目和APR技术方面存在差异;以及3)APR技术倾向于生成与开发者针对具有大补丁大小的错误所生成的补丁不同的补丁。结论:我们的研究不仅验证了以前的研究结论,但也强调了未来的研究对评估补丁的正确性的影响。
Beyond Correctness: Enhancing Architectural Reasoning in Code LLMs via Scalable Labeling with Agentic Judgment
Centre for Software Excellence, Huawei Canada(华为加拿大软件卓越中心);Department of Computer Science, University of Manitoba, Canada(曼尼托巴大学计算机科学系);School of Computing, Queen’s University, Canada(皇后大学计算科学学院)
VISOR: A Vision-Language Model-based Test Oracle for Testing Robots
Simula Research Laboratory(Simula研究实验室);Oslo Metropolitan University(奥斯陆理工大学);Mondragon University(蒙dragon大学);National Institute of Informatics(国立信息研究所)
Automated Detection of Configuration-Specific Security Vulnerabilities via Patch Analysis
Federal University of Bahia(巴伊亚联邦大学);University of Notre Dame(圣母大学);Federal Rural University of Pernambuco(伯南布哥联邦农村大学);Federal University of Rio de Janeiro(里约热内卢联邦大学)