TransplantFix: Graph differencing-based code transplantation for automated program repair

Automated program repair (APR) holds the promise of aiding manual debugging activities. Over a decade of evolution, a broad range of APR techniques have been proposed and evaluated on a set of real-world bug datasets. However, while more and more bugs have been correctly fixed, we observe that the g...

Full description

Saved in:
Bibliographic Details
Main Authors: YANG, Deheng, MAO, Xiaoguang, CHEN, Liqian, XU, Xuezheng, LEI, Yan, LO, David, HE, Jiayu
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2022
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/7731
https://ink.library.smu.edu.sg/context/sis_research/article/8734/viewcontent/ASE22_TFix_pv.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-8734
record_format dspace
spelling sg-smu-ink.sis_research-87342023-08-04T07:40:51Z TransplantFix: Graph differencing-based code transplantation for automated program repair YANG, Deheng MAO, Xiaoguang CHEN, Liqian XU, Xuezheng LEI, Yan LO, David HE, Jiayu Automated program repair (APR) holds the promise of aiding manual debugging activities. Over a decade of evolution, a broad range of APR techniques have been proposed and evaluated on a set of real-world bug datasets. However, while more and more bugs have been correctly fixed, we observe that the growth of newly fixed bugs by APR techniques has hit a bottleneck in recent years. In this work, we explore the possibility of addressing complicated bugs by proposing TransplantFix, a novel APR technique that leverages graph differencing-based transplantation from the donor method. The key novelty of TransplantFix lies in three aspects: 1) we propose to use a graph-based differencing algorithm to distill semantic fix actions from the donor method; 2) we devise an inheritance-hierarchy-aware code search approach to identify donor methods with similar functionality; 3) we present a namespace transfer approach to effectively adapt donor code. We investigate the unique contributions of TransplantFix by conducting an extensive comparison that covers a total of 42 APR techniques and evaluating TransplantFix on 839 real-world bugs from Defects4J v1.2 and v2.0. TransplantFix presents superior results in three aspects. First, it has achieved the best performance as compared to the state-of-the-art APR techniques proposed in the last three years, in terms of the number of newly fixed bugs, reaching a 60%-300% improvement. Furthermore, not relying on any fix actions crafted manually or learned from big data, it reaches the best generalizability among all APR techniques evaluated on Defects4J v1.2 and v2.0. In addition, it shows the potential to synthesize complicated patches consisting of at most eight-line insertions at a hunk. TransplantFix presents fresh insights and a promising avenue for follow-up research towards addressing more complicated bugs. 2022-10-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/7731 info:doi/10.1145/3551349.3556893 https://ink.library.smu.edu.sg/context/sis_research/article/8734/viewcontent/ASE22_TFix_pv.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Automated program repair code transplantation graph differencing Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Automated program repair
code transplantation
graph differencing
Software Engineering
spellingShingle Automated program repair
code transplantation
graph differencing
Software Engineering
YANG, Deheng
MAO, Xiaoguang
CHEN, Liqian
XU, Xuezheng
LEI, Yan
LO, David
HE, Jiayu
TransplantFix: Graph differencing-based code transplantation for automated program repair
description Automated program repair (APR) holds the promise of aiding manual debugging activities. Over a decade of evolution, a broad range of APR techniques have been proposed and evaluated on a set of real-world bug datasets. However, while more and more bugs have been correctly fixed, we observe that the growth of newly fixed bugs by APR techniques has hit a bottleneck in recent years. In this work, we explore the possibility of addressing complicated bugs by proposing TransplantFix, a novel APR technique that leverages graph differencing-based transplantation from the donor method. The key novelty of TransplantFix lies in three aspects: 1) we propose to use a graph-based differencing algorithm to distill semantic fix actions from the donor method; 2) we devise an inheritance-hierarchy-aware code search approach to identify donor methods with similar functionality; 3) we present a namespace transfer approach to effectively adapt donor code. We investigate the unique contributions of TransplantFix by conducting an extensive comparison that covers a total of 42 APR techniques and evaluating TransplantFix on 839 real-world bugs from Defects4J v1.2 and v2.0. TransplantFix presents superior results in three aspects. First, it has achieved the best performance as compared to the state-of-the-art APR techniques proposed in the last three years, in terms of the number of newly fixed bugs, reaching a 60%-300% improvement. Furthermore, not relying on any fix actions crafted manually or learned from big data, it reaches the best generalizability among all APR techniques evaluated on Defects4J v1.2 and v2.0. In addition, it shows the potential to synthesize complicated patches consisting of at most eight-line insertions at a hunk. TransplantFix presents fresh insights and a promising avenue for follow-up research towards addressing more complicated bugs.
format text
author YANG, Deheng
MAO, Xiaoguang
CHEN, Liqian
XU, Xuezheng
LEI, Yan
LO, David
HE, Jiayu
author_facet YANG, Deheng
MAO, Xiaoguang
CHEN, Liqian
XU, Xuezheng
LEI, Yan
LO, David
HE, Jiayu
author_sort YANG, Deheng
title TransplantFix: Graph differencing-based code transplantation for automated program repair
title_short TransplantFix: Graph differencing-based code transplantation for automated program repair
title_full TransplantFix: Graph differencing-based code transplantation for automated program repair
title_fullStr TransplantFix: Graph differencing-based code transplantation for automated program repair
title_full_unstemmed TransplantFix: Graph differencing-based code transplantation for automated program repair
title_sort transplantfix: graph differencing-based code transplantation for automated program repair
publisher Institutional Knowledge at Singapore Management University
publishDate 2022
url https://ink.library.smu.edu.sg/sis_research/7731
https://ink.library.smu.edu.sg/context/sis_research/article/8734/viewcontent/ASE22_TFix_pv.pdf
_version_ 1773551437034291200