KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair

Nan Jiang, Thibaud Lutellier, Yiling Lou, Lin Tan, Dan Goldwasser +1 more
2/3/2023
cs.SEcs.AI

No official code found. Best implementation: lin-tan/knod (32 stars, last commit 2023-09-28).

Abstract

Automated Program Repair (APR) improves software reliability by generating patches for a buggy program automatically. Recent APR techniques leverage deep learning (DL) to build models to learn to generate patches from existing patches and code corpora. While promising, DL-based APR techniques suffer from the abundant syntactically or semantically incorrect patches in the patch space. These patches often disobey the syntactic and semantic domain knowledge of source code and thus cannot be the correct patches to fix a bug. We propose a DL-based APR approach KNOD, which incorporates domain knowledge to guide patch generation in a direct and comprehensive way. KNOD has two major novelties, including (1) a novel three-stage tree decoder, which directly generates Abstract Syntax Trees of patched code according to the inherent tree structure, and (2) a novel domain-rule distillation, which leverages syntactic and semantic rules and teacher-student distributions to explicitly inject the domain knowledge into the decoding procedure during both the training and inference phases. We evaluate KNOD on three widely-used benchmarks. KNOD fixes 72 bugs on the Defects4J v1.2, 25 bugs on the QuixBugs, and 50 bugs on the additional Defects4J v2.0 benchmarks, outperforming all existing APR tools.

View on arXivView PDF

Code Implementations(1)

lin-tan/knodCommunity100%

For our ICSE23 paper "KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair" by Nan Jiang, Thibaud Lutellier, Yiling Lou, Lin Tan, Dan Goldwasser, and Xiangyu Zhang

324CSS, HTML3 years agoNOASSERTION
knowledge-distillationprogram-repairsoftware-reliability

Similar Papers

Cite this paper

@article{jiang2023knod,
  title  = {KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair},
  author = {Nan Jiang and Thibaud Lutellier and Yiling Lou and Lin Tan and Dan Goldwasser and Xiangyu Zhang},
  year   = {2023},
  eprint = {2302.01857},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.01857v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2302.01857.svg)](https://codeofpaper.com/paper/2302.01857)

Discussion