如果可以使用上下文提高补丁生成的效率,请进行修补

ID:38738

阅读量:0

大小:1.42 MB

页数:15页

时间:2023-03-14

金币:2

上传者:战必胜
Citation: Heo, J.; Jeong, H.; Lee, E.
Patch It If You Can: Increasing the
Efficiency of Patch Generation Using
Context. Electronics 2023, 12, 179.
https://doi.org/10.3390/
electronics12010179
Academic Editor: Sanjay Misra
Received: 1 December 2022
Revised: 22 December 2022
Accepted: 24 December 2022
Published: 30 December 2022
Copyright: © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
electronics
Article
Patch It If You Can: Increasing the Efficiency of Patch
Generation Using Context
Jinseok Heo
1,†
, Hohyeon Jeong
1,†
and Eunseok Lee
2,
*
1
Department of Electrical and Computer Engineering, Sungkyunkwan University,
Suwon 16419, Republic of Korea
2
College of Computing and Informatics, Sungkyunkwan University, Suwon 16419, Republic of Korea
* Correspondence: leees@skku.edu
These authors contributed equally to this work.
Abstract:
Although program repair is a tremendous aspect of a software system, it can be extremely
challenging. An Automated Program Repair (APR) technique has been proposed to solve this
problem. Among them, template-based APR shows good performance. One of the key properties of
the template-based APR technique for practical use is its efficiency. However, because the existing
techniques mainly focus on performance improvement, they do not sufficiently consider the efficiency.
In this study, we propose EffiGenC, which efficiently explores the patch ingredient search space
to improve the overall efficiency of the template-based APR. EffiGenC defines the context using
the concept of extended reaching definition from compiler theory. EffiGenC constructs the search
space by collecting the ingredient required for patching in the context. We evaluated EffiGenC on
the Defects4j benchmark. EffiGenC decreases the number of candidate patches from 27% to 86%
compared to existing techniques. EffiGenC also correctly/plausibly fixes 47/72 bugs. For Future
work, we will solve the search space problem that exists in multiline bugs using context.
Keywords:
software verification and validation; automated program repair; search-based repair;
search space; patch ingredient; context
1. Introduction
An automated program repair(APR) can reduce the debugging costs by automatically
fixing a buggy code [
1
,
2
]. Moreover, the template-based APR technique is one of the
techniques showing good performance among the APR techniques [
3
5
]. It generates a
template from the commit history. FixMiner [
6
] collects patch history from open-source
repositories. It used a rich edit script to capture the structure of the AST and then used it to
generate the patch pattern. TBar [
3
] verifies templates from existing template-based APR.
It then checks the patches generated using such templates.
For patch generation, template-based APR approaches additionally leverage various
context information about the buggy code. ConFix [
7
] uses the AST node near the modifica-
tion point as a context to efficiently explore the patch history and changes. CAPGEN [
8
] uses
genetics, variables, and dependency similarities between suspicious codes and candidate
patches as context. Furthermore, it utilizes patch prioritization to increase performance.
The main metrics of existing template-based APR methods focus on a performance
evaluation [
9
]. Liu et al. [
9
] showed that the performance of the APR technique has steadily
improved. However, the efficiency, which is a key property for the practical use of the APR
technique, has not improved.
To improve efficiency, APR require an effective search strategy for search within a
reasonable amount of time. Among the benchmark Defects4j bugs, Figure 1 shows the
developer patches for the Lang-24 and Closure-125 bugs. Both patches can be generated
using the
Mutate Conditional Expression
template proposed by TBar, one of the latest
Electronics 2023, 12, 179. https://doi.org/10.3390/electronics12010179 https://www.mdpi.com/journal/electronics
资源描述:

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
关闭