Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction

计算机科学 测试套件 水准点(测量) 考试(生物学) 软件错误 编码(集合论) 程序设计语言 自动化 测试用例 秩(图论) 软件工程 数据科学 人工智能 机器学习 软件 工程类 机械工程 古生物学 回归分析 数学 大地测量学 集合(抽象数据类型) 组合数学 生物 地理
作者
Sungmin Kang,Juyeon Yoon,Shin Yoo
标识
DOI:10.1109/icse48619.2023.00194
摘要

Many automated test generation techniques have been developed to aid developers with writing tests. To facilitate full automation, most existing techniques aim to either increase coverage, or generate exploratory inputs. However, existing test generation techniques largely fall short of achieving more semantic objectives, such as generating tests to reproduce a given bug report. Reproducing bugs is nonetheless important, as our empirical study shows that the number of tests added in open source repositories due to issues was about 28% of the corresponding project test suite size. Meanwhile, due to the difficulties of transforming the expected program semantics in bug reports into test oracles, existing failure reproduction techniques tend to deal exclusively with program crashes, a small subset of all bug reports. To automate test generation from general bug reports, we propose Libro, a framework that uses Large Language Models (LLMs), which have been shown to be capable of performing code-related tasks. Since LLMs themselves cannot execute the target buggy code, we focus on post-processing steps that help us discern when LLMs are effective, and rank the produced tests according to their validity. Our evaluation of Libro shows that, on the widely studied Defects4J benchmark, Libro can generate failure reproducing test cases for 33% of all studied cases (251 out of 750), while suggesting a bug reproducing test in first place for 149 bugs. To mitigate data contamination (i.e., the possibility of the LLM simply remembering the test code either partially or in whole), we also evaluate Libro against 31 bug reports submitted after the collection of the LLM training data terminated: Libro produces bug reproducing tests for 32% of the studied bug reports. Overall, our results show Libro has the potential to significantly enhance developer efficiency by automatically generating tests from bug reports.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
爱吃樱桃的菁菁应助Eclin采纳,获得10
刚刚
EMP发布了新的文献求助10
1秒前
ZQ完成签到,获得积分10
1秒前
1秒前
1秒前
123发布了新的文献求助10
1秒前
黄天完成签到 ,获得积分10
2秒前
2秒前
欢喜的元霜完成签到,获得积分10
4秒前
ln完成签到,获得积分20
4秒前
yuko完成签到 ,获得积分10
4秒前
BHSRGSW完成签到,获得积分20
4秒前
SciGPT应助abll采纳,获得10
4秒前
lsn发布了新的文献求助10
4秒前
二毛完成签到,获得积分0
5秒前
5秒前
5秒前
SKQ发布了新的文献求助10
5秒前
ikun完成签到 ,获得积分10
6秒前
29完成签到,获得积分10
6秒前
8秒前
9秒前
9秒前
9秒前
ZhaoMinHui发布了新的文献求助10
9秒前
10秒前
隐形曼青应助俊逸语风采纳,获得10
11秒前
熊大发布了新的文献求助10
11秒前
12秒前
脑洞疼应助火离采纳,获得10
12秒前
Yuan88发布了新的文献求助10
13秒前
14秒前
14秒前
邹广浩发布了新的文献求助10
15秒前
15秒前
16秒前
16秒前
科研通AI6.4应助茉云采纳,获得10
16秒前
思源应助sqq采纳,获得10
16秒前
JIAAY关注了科研通微信公众号
16秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Essentials of Carbohydrate Chemistry and Biochemistry, 4th Edition 800
Navigating Normative Orders. Interdisciplinary Perspectives 800
Organizational Behavior 510
Management and the Arts 510
Matrix Methods in Data Mining and Pattern Recognition Second Edition 510
CLSI VET01S-2024 Performance Standards for Antimicrobial Disk and Dilution Susceptibility Tests for Bacteria Isolated From Animals (7th Ed) 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 化学工程 工程类 有机化学 物理 复合材料 生物化学 内科学 细胞生物学 基因 遗传学 免疫学 冶金 光电子学 癌症研究
热门帖子
关注 科研通微信公众号,转发送积分 7761241
求助须知:如何正确求助?哪些是违规求助? 9306359
关于积分的说明 20294048
捐赠科研通 7345867
什么是DOI,文献DOI怎么找? 3313115
关于科研通互助平台的介绍 2463411
邀请新用户注册赠送积分活动 2327363