arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.04584cs.SE
收藏

利用代码结构在神经机器翻译中解释软件缺陷

Explaining Software Bugs Leveraging Code Structures in Neural Machine Translation

Parvez Mahbub, Ohiduzzaman Shuvo, Mohammad Masudur Rahman

AI总结:

提出基于transformer的生成模型Bugsplainer,利用源代码结构信息和缺陷模式自动生成软件缺陷的自然语言解释,评估与开发者研究表明其优于多个基线。

摘要:

软件缺陷占用约50%的开发时间,并使全球经济损失数十亿美元。一旦报告了缺陷,分配的开发者会尝试识别并理解导致缺陷的源代码,然后修正代码。在过去五十年中,关于自动发现或修正软件缺陷已有大量研究。然而,关于向开发者自动解释缺陷的研究却很少,这是一项重要但极具挑战性的任务。在本文中,我们提出了Bugsplainer,一个基于transformer的生成模型,它通过从大量缺陷修复提交的语料库中学习,为软件缺陷生成自然语言解释。Bugsplainer能够利用源代码中的结构信息和缺陷模式来生成缺陷解释。我们使用三个性能指标进行的评估表明,根据Google的标准,Bugsplainer能够生成可理解且优质的解释,并且优于文献中的多个基线。我们还进行了一项涉及20名参与者的开发者研究,其中发现Bugsplainer的解释比基线更准确、更精确、更简洁且更有用。

英文摘要:

Software bugs claim approximately 50% of development time and cost the global economy billions of dollars. Once a bug is reported, the assigned developer attempts to identify and understand the source code responsible for the bug and then corrects the code. Over the last five decades, there has been significant research on automatically finding or correcting software bugs. However, there has been little research on automatically explaining the bugs to the developers, which is essential but a highly challenging task. In this paper, we propose Bugsplainer, a transformer-based generative model, that generates natural language explanations for software bugs by learning from a large corpus of bug-fix commits. Bugsplainer can leverage structural information and buggy patterns from the source code to generate an explanation for a bug. Our evaluation using three performance metrics shows that Bugsplainer can generate understandable and good explanations according to Google's standard, and can outperform multiple baselines from the literature. We also conduct a developer study involving 20 participants where the explanations from Bugsplainer were found to be more accurate, more precise, more concise and more useful than the baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑