Learning to Detect and Localize Multilingual Bugs
Proceedings of the ACM on Software Engineering · 12.07.2024 · 1 (FSE) · 2190-2213
DOI: 10.1145/3660804 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the ACM on Software Engineering, online erschienen am 12.07.2024. Verfasst von Haoran Yang und 4 weiteren Autor:innen. Die Arbeit wurde bisher 18-mal zitiert (Crossref) und nennt 79 Literaturangaben. Gefördert von: NSF, Office of Naval Research.
Abstract (Originalsprache)
Increasing studies have shown bugs in multi-language software as a critical loophole in modern software quality assurance, especially those induced by language interactions (i.e., multilingual bugs ). Yet existing tool support for bug detection/localization remains largely limited to single-language software, despite the long-standing prevalence of multi-language systems in various real-world software domains. Extant static/dynamic analysis and deep learning (DL) based approaches all face major challenges in addressing multilingual bugs. In this paper, we present xLoc, a DL-based technique/tool for detecting and localizing multilingual bugs. Motivated by results of our bug-characteristics study on top locations of multilingual bugs, xLoc first learns the general knowledge relevant to differentiating various multilingual control-flow structures. This is achieved by pre-training a Transformer model with customized position encoding against novel objectives. Then, xLoc learns task-specific knowledge for the task of multilingual bug detection/localization, through another new position encoding scheme (based on cross-language API vicinity) that allows for the model to attend particularly to control-flow constructs that bear most multilingual bugs during fine-tuning. We have implemented xLoc for Python-C software and curated a dataset of 3,770 buggy and 15,884 non-buggy Python-C samples, which enabled our extensive evaluation of xLoc against two state-of-the-art baselines: fine-tuned CodeT5 and zero-shot ChatGPT. Our results show that xLoc achieved 94.98% F1 and 87.24% @Top-1 accuracy, which are significantly (up to 162.88% and 511.75%) higher than the baselines. Ablation studies further confirmed significant contributions of each of the novel design elements in xLoc. With respective bug-location characteristics and labeled bug datasets for fine-tuning, our design may be applied to other language combinations beyond Python-C.
Förderung
- NSF
- Office of Naval Research
Zitieren
APA
Yang, H., Nong, Y., Zhang, T., Luo, X., & Cai, H. (2024). Learning to Detect and Localize Multilingual Bugs. Proceedings of the ACM on Software Engineering, 1(FSE), 2190-2213. https://doi.org/10.1145/3660804
Vancouver
Yang H, Nong Y, Zhang T, Luo X, Cai H. Learning to Detect and Localize Multilingual Bugs. Proceedings of the ACM on Software Engineering. 2024;1(FSE):2190-2213. doi:10.1145/3660804
BibTeX
@article{Yang2024,
author = {Yang, Haoran and Nong, Yu and Zhang, Tao and Luo, Xiapu and Cai, Haipeng},
title = {Learning to Detect and Localize Multilingual Bugs},
journal = {Proceedings of the ACM on Software Engineering},
year = {2024},
volume = {1},
number = {FSE},
pages = {2190--2213},
doi = {10.1145/3660804}
}
EUVIMED