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

ChatGPT的自动漏洞修复性能分析

An Analysis of the Automatic Bug Fixing Performance of ChatGPT

Dominik Sobania, Martin Briesch, Carol Hanna, Justyna Petke

摘要:

为了支持软件开发人员发现和修复软件错误,已经引入了几种自动程序修复技术。给定一个测试套件,标准方法通常要么合成一个修复,要么导航一个软件编辑的搜索空间来找到测试套件通过的变体。最近的程序修复方法基于深度学习方法。ChatGPT是这些新方法中的一种,它主要不是用于自动程序修复,但仍然适用于它。然而,到目前为止,ChatGPT的bug修复性能还不清楚。因此,在本文中,我们评估ChatGPT的标准错误修复基准集,菜错误,并比较性能与其他几种方法的结果在文献中报道。我们发现ChatGPT的错误修复性能与常见的深度学习方法CoCoNut和Codex相比具有竞争力,并且明显优于标准程序修复方法的结果。与以前的方法相比,ChatGPT提供了一个对话系统,通过该系统,可以输入特定输入的预期输出或观察到的错误消息。通过向ChatGPT提供这样的提示,它的成功率可以进一步提高,修复了40个错误中的31个,超过了最先进的水平。

英文摘要:

To support software developers in finding and fixing software bugs, several automated program repair techniques have been introduced. Given a test suite, standard methods usually either synthesize a repair, or navigate a search space of software edits to find test-suite passing variants. Recent program repair methods are based on deep learning approaches. One of these novel methods, which is not primarily intended for automated program repair, but is still suitable for it, is ChatGPT. The bug fixing performance of ChatGPT, however, is so far unclear. Therefore, in this paper we evaluate ChatGPT on the standard bug fixing benchmark set, QuixBugs, and compare the performance with the results of several other approaches reported in the literature. We find that ChatGPT's bug fixing performance is competitive to the common deep learning approaches CoCoNut and Codex and notably better than the results reported for the standard program repair approaches. In contrast to previous approaches, ChatGPT offers a dialogue system through which further information, e.g., the expected output for a certain input or an observed error message, can be entered. By providing such hints to ChatGPT, its success rate can be further increased, fixing 31 out of 40 bugs, outperforming state-of-the-art.

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

↑