Katana: Dual Slicing-Based Context for Learning Bug Fixes

04/30/2022
by   Mifta Sintaha, et al.
0

Contextual information plays a vital role for software developers when understanding and fixing a bug. Consequently, deep learning-based program repair techniques leverage context for bug fixes. However, existing techniques treat context in an arbitrary manner, by extracting code in close proximity of the buggy statement within the enclosing file, class, or method, without any analysis to find actual relations with the bug. To reduce noise, they use a predefined maximum limit on the number of tokens to be used as context. We present a program slicing-based approach, in which instead of arbitrarily including code as context, we analyze statements that have a control or data dependency on the buggy statement. We propose a novel concept called dual slicing, which leverages the context of both buggy and fixed versions of the code to capture relevant repair ingredients. We present our technique and tool called Katana, the first to apply slicing-based context for a program repair task. The results show Katana effectively preserves sufficient information for a model to choose contextual information while reducing noise. We compare against four recent state-of-the-art context-aware program repair techniques. Our results show Katana fixes between 1.5 to 3.7 times more bugs than existing techniques.

READ FULL TEXT
research
05/16/2023

Neural Program Repair with Program Dependence Analysis and Effective Filter Mechanism

Automated program repair is a crucial task for improving the efficiency ...
research
03/11/2019

Revisiting ssFix for Better Program Repair

A branch of automated program repair (APR) techniques look at finding an...
research
01/20/2023

An Analysis of the Automatic Bug Fixing Performance of ChatGPT

To support software developers in finding and fixing software bugs, seve...
research
10/04/2020

Review4Repair: Code Review Aided Automatic Program Repairing

Context: Learning-based automatic program repair techniques are showing ...
research
11/27/2022

Detect-Localize-Repair: A Unified Framework for Learning to Debug with CodeT5

Automated software debugging is a crucial task for improving the product...
research
10/26/2021

A Controlled Experiment of Different Code Representations for Learning-Based Bug Repair

Training a deep learning model on source code has gained significant tra...
research
05/19/2021

DeepDebug: Fixing Python Bugs Using Stack Traces, Backtranslation, and Code Skeletons

The joint task of bug localization and program repair is an integral par...

Please sign up or login with your details

Forgot password? Click here to reset