Lune

ACL Findings2021

Grammar-Based Patches Generation for Automated Program Repair

Yu Tang, Long Zhou, Ambrosio Blanco, Shujie Liu, Furu Wei, Ming Zhou, Muyun Yang

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 ruleto-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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Neurosymbolic repair for low-code formula languages cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
  • StandUp4NPR: Standardizing SetUp for Empirically Comparing Neural Program Repair Systems cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
  • Jointly Learning to Repair Code and Generate Commit Message cites GraphCodeBERT: Pre-training Code Representations with Data Flow
  • Jointly Learning to Repair Code and Generate Commit Message cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. StandUp4NPR: Standardizing SetUp for Empirically Comparing Neural Program Repair SystemsWenkang Zhong, Hongliang Ge, Hongfei Ai, Chuanyi Li et al.ASE 2022 · 23 citations
  2. Neurosymbolic repair for low-code formula languagesRohan Bavishi, Harshit Joshi, José Cambronero, Anna Fariha et al.OOPSLA 2022 · 11 citations
  3. Jointly Learning to Repair Code and Generate Commit MessageJiaqi Bai, Long Zhou, Ambrosio Blanco, Shujie Liu et al.EMNLP 2021 · 5 citations

Builds on2

  1. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng et al.ICLR 2021 · 1,644 citations
  2. Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 citations

Related papers

  1. DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 citations
  2. Less training, more repairing please: revisiting automated program repair via zero-shot learningChunqiu Steven Xia, Lingming ZhangFSE 2022 · 223 citations
  3. Tare: Type-Aware Neural Program RepairQihao Zhu, Zeyu Sun, Wenjie Zhang, Yingfei Xiong et al.ICSE 2023 · 29 citations
  4. A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang et al.FSE 2021 · 214 citations
  5. CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 citations
Dusk over the sea between two cliffs drawn in fine vertical lines