BLAZE:通过动态分块和难例学习实现跨语言与跨项目缺陷定位
BLAZE: Cross-Language and Cross-Project Bug Localization via Dynamic Chunking and Hard Example Learning
AI总结:
针对现有缺陷定位工具跨项目和多语言能力不足的问题,本文提出BLAZE方法,通过动态分块和难例学习微调GPT模型,并构建含26,321个缺陷的BEETLEBOX数据集,在三个基准上显著提升定位精度。
摘要:
软件缺陷需要开发人员付出大量精力来识别和解决,通常消耗他们约三分之一的时间。缺陷定位,即精确定位需要修改的源代码文件的过程,对于减少这种工作量至关重要。现有的缺陷定位工具通常依赖深度学习技术,在跨项目适用性和多语言环境有效性方面面临局限。近期大型语言模型(LLM)的进展为缺陷定位提供了精细的表示。然而,它们面临上下文窗口有限和映射准确性的挑战。为解决这些问题,我们提出了BLAZE,一种采用动态分块和难例学习的方法。首先,BLAZE动态分割源代码以最小化连续性损失。然后,BLAZE使用具有挑战性的缺陷案例对基于GPT的模型进行微调,以增强跨项目和跨语言的缺陷定位。为支持BLAZE的能力,我们创建了BEETLEBOX数据集,该数据集包含来自29个大型且活跃的开源项目、涵盖五种不同编程语言(Java、C++、Python、Go和JavaScript)的26,321个缺陷。我们在三个基准数据集BEETLEBOX、SWE-Bench和Ye等人上对BLAZE的评估表明,与六个最先进的基线相比,BLAZE取得了显著改进。具体而言,BLAZE在Top 1准确率上最高提升120%,在平均精度均值(MAP)上最高提升144%,在平均倒数排名(MRR)上最高提升100%。一项广泛的消融研究证实了我们的流程组件对整体性能提升的贡献。
英文摘要:
Software bugs require developers to exert significant effort to identify and resolve them, often consuming about one-third of their time. Bug localization, the process of pinpointing the exact source code files that need modification, is crucial in reducing this effort. Existing bug localization tools, typically reliant on deep learning techniques, face limitations in cross-project applicability and effectiveness in multi-language environments. Recent advancements with Large Language Models (LLMs) offer detailed representations for bug localization. However, they encounter challenges with limited context windows and mapping accuracy. To address these issues, we propose BLAZE, an approach that employs dynamic chunking and hard example learning. First, BLAZE dynamically segments source code to minimize continuity loss. Then, BLAZE fine-tunes a GPT-based model using challenging bug cases, in order to enhance cross-project and cross-language bug localization. To support the capability of BLAZE, we create the BEETLEBOX dataset, which comprises 26,321 bugs from 29 large and thriving open-source projects across five different programming languages (Java, C++, Python, Go, and JavaScript). Our evaluations of BLAZE on three benchmark datasets BEETLEBOX, SWE-Bench, and Ye et al. demonstrate substantial improvements compared to six state-of-the-art baselines. Specifically, BLAZE achieves up to an increase of 120% in Top 1 accuracy, 144% in Mean Average Precision (MAP), and 100% in Mean Reciprocal Rank (MRR). An extensive ablation study confirms the contributions of our pipeline components to the overall performance enhancement.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。