On the Effectiveness of Code Representation in Deep Learning-Based Automated Patch Correctness Assessment

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zhang, Quanjun, Hu, Haichuan, Fang, Chunrong, Shang, Ye, Zheng, Tao, Chen, Zhenyu, Yang, Yun, Xiao, Liang
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917385031647232
author Zhang, Quanjun
Hu, Haichuan
Fang, Chunrong
Shang, Ye
Zheng, Tao
Chen, Zhenyu
Yang, Yun
Xiao, Liang
author_facet Zhang, Quanjun
Hu, Haichuan
Fang, Chunrong
Shang, Ye
Zheng, Tao
Chen, Zhenyu
Yang, Yun
Xiao, Liang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_07520
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle On the Effectiveness of Code Representation in Deep Learning-Based Automated Patch Correctness Assessment
Zhang, Quanjun
Hu, Haichuan
Fang, Chunrong
Shang, Ye
Zheng, Tao
Chen, Zhenyu
Yang, Yun
Xiao, Liang
Software Engineering
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.
title On the Effectiveness of Code Representation in Deep Learning-Based Automated Patch Correctness Assessment
topic Software Engineering
url https://arxiv.org/abs/2603.07520