PathFix: Automated Program Repair with Expected Path
- URL: http://arxiv.org/abs/2510.14341v1
- Date: Thu, 16 Oct 2025 06:21:49 GMT
- Title: PathFix: Automated Program Repair with Expected Path
- Authors: Xu He, Shu Wang, Kun Sun,
- Abstract summary: We introduce a new APR method named PathFix to generate patches for repairing buggy code.<n>It is based on one observation: if a buggy program is repairable, at least one expected path is supposed to replace the fault path in the patched program.<n> Experimental results show that PathFix outperforms existing solutions, particularly in handling complex program structures.
- Score: 17.544454427324712
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Automated program repair (APR) techniques are effective in fixing inevitable defects in software, enhancing development efficiency and software robustness. However, due to the difficulty of generating precise specifications, existing APR methods face two main challenges: generating too many plausible patch candidates and overfitting them to partial test cases. To tackle these challenges, we introduce a new APR method named PathFix, which leverages path-sensitive constraints extracted from correct execution paths to generate patches for repairing buggy code. It is based on one observation: if a buggy program is repairable, at least one expected path is supposed to replace the fault path in the patched program. PathFix operates in four main steps. First, it traces fault paths reaching the fault output in the buggy program. Second, it derives expected paths by analyzing the desired correct output on the control flow graph, where an expected path defines how a feasible patch leads to the correct execution. Third, PathFix generates and evaluates patches by solving state constraints along the expected path. Fourth, we validate the correctness of the generated patch. To further enhance repair performance and mitigate scalability issues introduced by path-sensitive analysis, we integrate a large language model (LLM) into our framework. Experimental results show that PathFix outperforms existing solutions, particularly in handling complex program structures such as loops and recursion.
Related papers
- Outcome-Conditioned Reasoning Distillation for Resolving Software Issues [49.16055123488827]
We present an Outcome-Conditioned Reasoning Distillation(O-CRD) framework that uses resolved in-repository issues with verified patches as supervision.<n>Starting from a historical fix, the method reconstructs a stage-wise repair trace backward from the verified outcome.<n>On SWE-Bench Lite, this approach increases Pass@1 by 10.4% with GPT-4o, 8.6% with DeepSeek-V3, and 10.3% with GPT-5.
arXiv Detail & Related papers (2026-01-30T18:25:39Z) - DynaFix: Iterative Automated Program Repair Driven by Execution-Level Dynamic Information [20.300297868395454]
Automated Program Repair (APR) aims to automatically generate correct patches for buggy programs.<n>Recent approaches leveraging large language models (LLMs) have shown promise but face limitations.<n>We propose DynaFix, an execution-level dynamic information-driven APR method that iteratively leverages runtime information to refine the repair process.
arXiv Detail & Related papers (2025-12-31T05:13:34Z) - Less is More: Adaptive Program Repair with Bug Localization and Preference Learning [9.639104286650845]
We propose a two-stage approach to enhance program repair while maintaining consistency.<n>In the first stage, we utilize a Bug Locator with self-aware learning to accurately pinpoint bug locations.<n>In the second stage, we train a Program to ensure consistency between the post-modified fixed code and the pre-modified buggy code.
arXiv Detail & Related papers (2025-03-09T08:32:38Z) - ReF Decompile: Relabeling and Function Call Enhanced Decompile [50.86228893636785]
The goal of decompilation is to convert compiled low-level code (e.g., assembly code) back into high-level programming languages.<n>This task supports various reverse engineering applications, such as vulnerability identification, malware analysis, and legacy software migration.
arXiv Detail & Related papers (2025-02-17T12:38:57Z) - Towards Practical and Useful Automated Program Repair for Debugging [4.216808129651161]
PracAPR is an interactive repair system that works in an Integrated Development Environment (IDE)
PracAPR does not require a test suite or program re-execution.
arXiv Detail & Related papers (2024-07-12T03:19:54Z) - Finding Transformer Circuits with Edge Pruning [71.12127707678961]
We propose Edge Pruning as an effective and scalable solution to automated circuit discovery.<n>Our method finds circuits in GPT-2 that use less than half the number of edges compared to circuits found by previous methods.<n>Thanks to its efficiency, we scale Edge Pruning to CodeLlama-13B, a model over 100x the scale that prior methods operate on.
arXiv Detail & Related papers (2024-06-24T16:40:54Z) - Path-wise Vulnerability Mitigation [3.105656247358225]
This paper describes an approach called PAVER that generates and inserts mitigation patches at the level of program paths.
For each candidate patch location, PAVER generates and inserts a mitigation patch, and tests the patched program to assess the side-effects.
We evaluate the prototype of PAVER on real world vulnerabilities and the evaluation shows that our path-wise vulnerability mitigation patches can achieve minimum side-effects.
arXiv Detail & Related papers (2024-05-25T22:58:37Z) - Invariant-based Program Repair [1.7767466724342067]
This paper describes a formal general-purpose automated program repair (APR) framework based on the concept of program invariants.
We demonstrate the usefulness of leveraging invariants in APR by developing an invariant-based repair system for performance bugs.
arXiv Detail & Related papers (2023-12-27T17:46:19Z) - RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic
Program Repair [75.40584530380589]
We propose a novel Retrieval-Augmented Patch Generation framework (RAP-Gen)
RAP-Gen explicitly leveraging relevant fix patterns retrieved from a list of previous bug-fix pairs.
We evaluate RAP-Gen on three benchmarks in two programming languages, including the TFix benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java.
arXiv Detail & Related papers (2023-09-12T08:52:56Z) - Efficient Ground Vehicle Path Following in Game AI [77.34726150561087]
This paper presents an efficient path following solution for ground vehicles tailored to game AI.
The proposed path follower is evaluated through a variety of test scenarios in a first-person shooter game.
We achieved a 70% decrease in the total number of stuck events compared to an existing path following solution.
arXiv Detail & Related papers (2023-07-07T04:20:07Z) - Graph-based, Self-Supervised Program Repair from Diagnostic Feedback [108.48853808418725]
We introduce a program-feedback graph, which connects symbols relevant to program repair in source code and diagnostic feedback.
We then apply a graph neural network on top to model the reasoning process.
We present a self-supervised learning paradigm for program repair that leverages unlabeled programs available online.
arXiv Detail & Related papers (2020-05-20T07:24:28Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.