Issue |
Wuhan Univ. J. Nat. Sci.
Volume 28, Number 6, December 2023
|
|
---|---|---|
Page(s) | 493 - 507 | |
DOI | https://doi.org/10.1051/wujns/2023286493 | |
Published online | 15 January 2024 |
Computer Science
CLC number: TP391
Multi-View Feature Fusion Model for Software Bug Repair Pattern Prediction
1
School of Mathematics and Statistics, Zhaoqing University, Zhaoqing 526040, Guangdong, China
2
Department of Medical Information, The First Affiliated Hospital of Zhengzhou University, Zhengzhou 450000, Henan, China
† To whom correspondence should be addressed. E-mail: fccchengm@zzu.edu.cn
Received:
26
September
2023
Many search-based Automatic Program Repair (APR) techniques employ a set of repair patterns to generate candidate patches. Regarding repair pattern selection, existing search-based APR techniques either randomly select a repair pattern from the repair pattern set to apply or prioritize all repair patterns based on the bug's context information. In this paper, we introduce PatternNet, a multi-view feature fusion model capable of predicting the repair pattern for a reported software bug. To accomplish this task, PatternNet first extracts multi-view features from the pair of buggy code and bug report using different models. Specifically, a transformer-based model (i.e., UniXcoder) is utilized to obtain the bimodal feature representation of the buggy code and bug report. Additionally, an Abstract Syntax Tree (AST)-based neural model (i.e., ASTNN) is employed to learn the feature representation of the buggy code. Second, a co-attention mechanism is adopted to capture the dependencies between the statement trees in the AST of the buggy code and the textual tokens of the reported bug, resulting in co-attentive features between statement trees and reported bug's textual tokens. Finally, these multi-view features are combined into a unified representation using a feature fusion network. We quantitatively demonstrate the effectiveness of PatternNet and the feature fusion network for predicting software bug repair patterns.
Key words: Automatic Program Repair (APR) / bug repair pattern prediction / Recurrent Neural Network (RNN) / transformer / co-attention
Biography: XU Yong, male, Ph. D., Lecturer, research direction: software engineering, deep learning. E-mail: zqxywz@gmail.com
Fundation item: Partially supported by the National Natural Science Foundation of China (61802350)
© Wuhan University 2023
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.