Abstract
Automatic program repair (APR) has gained increasing attention as an essential technique in software development to reduce manual debugging efforts and boost developers’ productivity. Recent advances in deep learning (DL) based models have demonstrated promising results by learning from large-scale bug-fix examples in a data-driven manner. However, in practical scenarios, software bugs have an imbalanced distribution, and the fixing knowledge learned by APR models often only capture the patterns of frequent error types, making it inapplicable to handle the rare error types. To address this limitation, we investigate a novel task of low-resource APR, and propose Meta-APR, a new meta-learning framework integrated with code pretrained language models to generate fixes for low-resource bugs with limited training samples. Our Meta-APR learns better error-specific knowledge from high-resource bugs through efficient first-order meta-learning optimization, which allows for a faster adaptation to the target low-resource bugs. Besides, while we adopt CodeT5, a pretrained code-aware encoder-decoder Transformer, as the backbone model for Meta-APR, it is a model-agnostic framework that can be integrated with any neural models. Extensive experimental results on three benchmarks in various programming languages verify the superiority of our method over existing DL-based APR approaches.- Anthology ID:
- 2023.emnlp-main.430
- Volume:
- Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing
- Month:
- December
- Year:
- 2023
- Address:
- Singapore
- Editors:
- Houda Bouamor, Juan Pino, Kalika Bali
- Venue:
- EMNLP
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 6954–6968
- Language:
- URL:
- https://aclanthology.org/2023.emnlp-main.430
- DOI:
- 10.18653/v1/2023.emnlp-main.430
- Cite (ACL):
- Weishi Wang, Yue Wang, Steven Hoi, and Shafiq Joty. 2023. Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language Models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 6954–6968, Singapore. Association for Computational Linguistics.
- Cite (Informal):
- Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language Models (Wang et al., EMNLP 2023)
- PDF:
- https://preview.aclanthology.org/corrections-2024-05/2023.emnlp-main.430.pdf