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

HistoryFinder:利用精确基准与增强算法推进方法级源代码历史生成

HistoryFinder: Advancing Method-Level Source Code History Generation with Accurate Oracles and Enhanced Algorithm

SQM Research Lab, University of Manitoba(马尼托巴大学 SQM 研究实验室);American International University-Bangladesh(孟加拉国美国国际大学);University of Saskatchewan(萨斯喀彻温大学)

Shahidul Islam, Ashik Aowal, Md Sharif Uddin, Shaiful Chowdhury

AI总结:

本研究提出HistoryFinder方法历史生成工具,通过构建修正基准并优化算法,在400个方法上超越现有工具,兼顾高准确率与竞争性运行时性能。

摘要:

准确且高效地重建方法变更历史对于许多软件工程任务(包括维护、重构和理解)至关重要。尽管已有诸如CodeShovel和CodeTracker等方法历史生成工具,但现有对其有效性的评估因所用基准真值的不准确而受到限制。在本研究中,我们通过结合自动化分析与专家指导的人工验证,系统地构建了两个新的基准——修正后的CodeShovel基准和新开发的HistoryFinder基准。我们还引入了HistoryFinder,一种新的方法历史生成工具,旨在不仅提高方法变更历史的准确性和完整性,还提供具有竞争力的运行时性能。通过对来自40个开源仓库的400个方法进行广泛评估,我们表明HistoryFinder在精确率、召回率和F1分数方面始终优于CodeShovel、CodeTracker、IntelliJ和基于Git的基线。此外,HistoryFinder实现了具有竞争力的运行时性能,在所有基于研究的工具中提供了最低的平均和中位执行时间。虽然基于Git的工具表现出最快的运行时间,但这种效率以显著较低的精确率和召回率为代价——使得HistoryFinder在准确性和效率都重要时成为最佳整体选择。为便于采用,我们提供了Web界面、CLI和Java库以实现灵活使用。

英文摘要:

Reconstructing a method's change history efficiently and accurately is critical for many software engineering tasks, including maintenance, refactoring, and comprehension. Despite the availability of method history generation tools such as CodeShovel and CodeTracker, existing evaluations of their effectiveness are limited by inaccuracies in the ground truth oracles used. In this study, we systematically construct two new oracles -- the corrected CodeShovel oracle and a newly developed HistoryFinder oracle -- by combining automated analysis with expert-guided manual validation. We also introduce HistoryFinder, a new method history generation tool designed to improve not only the accuracy and completeness of method change histories but also to offer competitive runtime performance. Through extensive evaluation across 400 methods from 40 open-source repositories, we show that HistoryFinder consistently outperforms CodeShovel, CodeTracker, IntelliJ, and Git-based baselines in terms of precision, recall, and F1 score. Moreover, HistoryFinder achieves competitive runtime performance, offering the lowest mean and median execution times among all the research-based tools. While Git-based tools exhibit the fastest runtimes, this efficiency comes at the cost of significantly lower precision and recall -- leaving HistoryFinder as the best overall choice when both accuracy and efficiency are important. To facilitate adoption, we provide a web interface, CLI, and Java library for flexible usage.

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

↑