期刊
ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY
卷 32, 期 4, 页码 -出版社
ASSOC COMPUTING MACHINERY
DOI: 10.1145/3579640
关键词
Program slicing; program repair; deep learning; contextual information; graph neural networks
Contextual information is crucial for software developers to understand and fix bugs. However, existing techniques for using context in program repair do not consider actual relations with the bug and arbitrarily extract code. We propose a program slicing based approach called dual slicing that captures relevant repair ingredients by analyzing statements with control or data dependency on the buggy statement. Our tool Katana effectively preserves sufficient information for selecting contextual information and outperforms existing techniques by fixing 1.5 to 3.7 times more bugs.
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 that 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 that Katana fixes between 1.5 and 3.7 times more bugs than existing techniques.
作者
我是这篇论文的作者
点击您的名字以认领此论文并将其添加到您的个人资料中。
推荐
暂无数据