@inproceedings{tang2021grammar-based, author = {Tang, Yu and Zhou, Long and Blanco, Ambrosio and Liu, Shujie and Wei, Furu and Zhou, Ming and Yang, Muyun}, title = {Grammar-Based Patches Generation for Automated Program Repair}, booktitle = {ACL-IJCNLP 2021}, year = {2021}, month = {July}, abstract = {Automated program repair (APR) aims to find an automatic solution to program language bugs without human intervention, and it can potentially reduce debugging costs and improve software quality. Conventional approaches adopt learning-based methods such as sequence-to-sequence models for the patches generation. However, they tend to ignore the code structure information and suffer from grammar and syntax errors. To consider the grammar and syntax information, in this paper, we propose a grammar-based rule-to-rule model, which regards the repair process as the transformation of grammar rules, and leverages two encoders modeling both the original token sequence and the grammar rules, enhanced with a new tree-based self-attention. Besides, to guarantee grammar correctness, we employ a grammatically restricted inference method to generate each grammar rule in a legally constrained sub-search-space considering the generated previous rules. Experimental evaluations on a Java dataset demonstrate that the proposed approach significantly outperforms the state-of-the-art baselines in terms of generated code accuracy.}, url = {http://approjects.co.za/?big=en-us/research/publication/grammar-based-patches-generation-for-automated-program-repair/}, }