Bug localization is an important aspect of software maintenance because it can locate modules that need to be changed to fix a specific bug. Although method-level bug localization is helpful for developers, there are only a few tools and techniques for this task; moreover, there is no large-scale framework for their evaluation. In this paper, we present FinerBench4BL, an evaluation framework for method-level information retrieval-based bug localization techniques, and a comparative study using this framework. This framework was semi-automatically constructed from Bench4BL, a file-level bug localization evaluation framework, using a repository transformation approach. We converted the original file-level version repositories provided by Bench4BL into method-level repositories by repository transformation. Method-level data components such as oracle methods can also be automatically derived by applying the oracle generation approach via bug-commit linking in Bench4BL to the generated method repositories. Furthermore, we tailored existing file-level bug localization technique implementations at the method level. We created a framework for method-level evaluation by merging the generated dataset and implementations. The comparison results show that the method-level techniques decreased accuracy whereas improved debugging efficiency compared to file-level techniques.
翻译:缺陷定位是软件维护的重要方面,因为它能定位需要修改以修复特定缺陷的模块。尽管方法级缺陷定位对开发者有帮助,但目前仅有少量工具和技术用于此任务;此外,尚缺乏用于评估的大规模框架。本文提出FinerBench4BL,一个用于方法级基于信息检索的缺陷定位技术的评估框架,并基于该框架开展比较研究。该框架通过仓库转换方法,从文件级缺陷定位评估框架Bench4BL半自动构建而成。我们通过仓库转换,将Bench4BL提供的原始文件级版本仓库转换为方法级仓库。方法级数据组件(如Oracle方法)可通过将Bench4BL中基于缺陷-提交链接的Oracle生成方法应用于生成的方法仓库自动导出。此外,我们在方法级对现有文件级缺陷定位技术实现进行定制化适配。通过合并生成的数据集与实现,创建了方法级评估框架。比较结果表明,与文件级技术相比,方法级技术虽降低了准确率,却提升了调试效率。