| | --- |
| | license: apache-2.0 |
| | language: |
| | - en |
| | base_model: |
| | - meta-llama/CodeLlama-7b-Instruct-hf |
| | pipeline_tag: text-generation |
| | tags: |
| | - code |
| | --- |
| | ### **introduction** |
| | How to conduct adaptive bug fixing and generate patches with minimal modifications have seldom been investigated. To bridge this gap, we first introduce a novel task, |
| | namely AdaPR (Adaptive Program Repair). We then propose a two-stage approach **AdaPatcher** (Adaptive Patch Generator) to enhance program repair while maintaining the |
| | consistency. In the first stage, we utilize a Bug Locator with self-debug learning to accurately pinpoint bug locations. In the second stage, we train a Program Modifier to ensure consistency between the post-modified fixed code and the premodified buggy code. The Program Modifier is enhanced |
| | with a location-aware repair learning strategy to generate patches based on identified buggy lines, a hybrid training strategy for selective reference and an adaptive preference |
| | learning to prioritize fewer changes. |
| | ### **code link** |
| | https://github.com/zhenlongDai/AdaPatcher |
| | ### **citation** |
| | ``` |
| | @article{dai2025less, |
| | title={Less is More: Adaptive Program Repair with Bug Localization and Preference Learning}, |
| | author={Dai, Zhenlong and Chen, Bingrui and Zhao, Zhuoluo and Tang, Xiu and Wu, Sai and Yao, Chang and Gao, Zhipeng and Chen, Jingyuan}, |
| | journal={arXiv preprint arXiv:2503.06510}, |
| | year={2025} |
| | } |
| | ``` |