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

FastLog:一种高效生成并插入日志语句的端到端方法

FastLog: An End-to-End Method to Efficiently Generate and Insert Logging Statements

Xiaoyuan Xie, Zhipeng Cai, Songqiang Chen, Jifeng Xuan

AI总结:

FastLog 提出一种端到端方法,在 token 级别预测插入位置并快速生成完整日志语句,结合长文本切分提升准确性,在效率与质量上均优于现有方法。

摘要:

日志在现代软件系统中扮演着至关重要的角色,是开发人员记录关键信息以供未来软件维护使用的一种手段。由于这些基于日志的维护任务性能在很大程度上依赖于日志语句的质量,已有多种工作被提出以帮助开发人员编写合适的日志语句。然而,这些工作要么仅支持开发人员完成整个活动中的部分子任务,要么执行时间成本相对较高,并可能引入不必要的修改。为解决这些局限性,我们提出了 FastLog,它能够以非常快速的方式支持完整的日志语句生成与插入活动。具体而言,给定一个程序方法,FastLog 首先在最细粒度的 token 级别预测插入位置,然后生成一条完整的日志语句进行插入。我们进一步对长输入文本使用文本切分,以提高预测日志语句插入位置的准确性。全面的实证分析表明,我们的方法在效率和输出质量上均优于最先进的方法,这揭示了其在当前实时智能开发环境中的巨大潜力和实用性。

英文摘要:

Logs play a crucial role in modern software systems, serving as a means for developers to record essential information for future software maintenance. As the performance of these log-based maintenance tasks heavily relies on the quality of logging statements, various works have been proposed to assist developers in writing appropriate logging statements. However, these works either only support developers in partial sub-tasks of this whole activity; or perform with a relatively high time cost and may introduce unwanted modifications. To address their limitations, we propose FastLog, which can support the complete logging statement generation and insertion activity, in a very speedy manner. Specifically, given a program method, FastLog first predicts the insertion position in the finest token level, and then generates a complete logging statement to insert. We further use text splitting for long input texts to improve the accuracy of predicting where to insert logging statements. A comprehensive empirical analysis shows that our method outperforms the state-of-the-art approach in both efficiency and output quality, which reveals its great potential and practicality in current real-time intelligent development environments.

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

↑