一句话:提出 AdbGPT,用提示工程让 LLM 零训练自动复现 Android 缺陷报告,成功率达 81.3%。
缺陷报告对软件维护至关重要,但现有自动复现方法依赖人工编写模式与预定义词表,效果受报告质量制约。本文提出 AdbGPT,一种轻量级方法,借助大语言模型的自然语言理解能力,通过提示工程自动从缺陷报告中复现缺陷,无需训练或硬编码。它采用少样本学习与思维链推理,引导 LLM 像开发者一样提取信息并逐步推理完成复现。评估显示,AdbGPT 在 253.6 秒内复现 81.3% 的缺陷报告,优于当前最优基线与消融实验;小规模用户研究也证实其能提升开发者的缺陷复现能力。
Bug reports are vital for software maintenance that allow users to inform developers of the problems encountered while using the software. As such, researchers have committed considerable resources toward automating bug replay to expedite the process of software maintenance. Nonetheless, the success of current automated approaches is largely dictated by the characteristics and quality of bug reports, as they are constrained by the limitations of manually-crafted patterns and pre-defined vocabulary lists. Inspired by the success of Large Language Models (LLMs) in natural language understanding, we propose AdbGPT, a new lightweight approach to automatically reproduce the bugs from bug reports through prompt engineering, without any training and hard-coding effort. AdbGPT leverages few-shot learning and chain-of-thought reasoning to elicit human knowledge and logical reasoning from LLMs to accomplish the bug replay in a manner similar to a developer. Our evaluations demonstrate the effectiveness and efficiency of our AdbGPT to reproduce 81.3% of bug reports in 253.6 seconds, outperforming the state-of-the-art baselines and ablation studies. We also conduct a small-scale user study to confirm the usefulness of AdbGPT in enhancing developers' bug replay capabilities.
DOI 原文 ·
@inproceedings{paperbot11347,
title = {Prompting Is All You Need: Automated Android Bug Replay with Large Language Models},
author = {Sidong Feng and Chunyang Chen},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3608137}
}