paperbot · PL 论文追踪

全部论文 待读 收藏

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

FastLog:一种高效生成与插入日志语句的端到端方法
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 2/10 · 该论文聚焦于自动生成和插入日志语句,属于软件工程/程序语言与机器学习的交叉,但并非静态分析、浮点程序分析或贝叶斯程序分析,也未涉及LLM/Agent用于静态分析或形式化验证,与用户核心研究方向匹配度低。引用 5 inbox
Xiaoyuan Xie, Zhipeng Cai, Songqiang Chen, Jifeng Xuan
crossref: 2026-09-12

AI 速览

一句话:FastLog 端到端预测日志插入位置并生成完整日志语句,效率与质量均优于现有方法。

日志语句的质量直接影响基于日志的软件维护任务,已有辅助开发者编写日志的工作要么只覆盖整个流程中的部分子任务,要么时间开销较高且可能引入多余修改。本文提出 FastLog,支持日志语句生成与插入的完整活动,且速度极快。给定一个程序方法,FastLog 首先在最细的 token 粒度上预测日志插入位置,随后生成完整的日志语句并插入。为提升长输入文本下插入位置预测的准确率,方法还采用了文本切分策略。全面的实证分析表明,FastLog 在效率与输出质量两方面均优于当前最先进的方法,显示出其在实时智能开发环境中的巨大潜力与实用性。

问题
现有日志语句辅助工作要么只支持整个编写活动中的部分子任务,要么耗时较高且可能引入不必要的代码修改。
方法
FastLog 对给定方法在 token 级别预测日志插入位置,再生成完整日志语句并插入,并使用文本切分处理长输入以提升位置预测准确率。
评估
通过全面的实证分析,将 FastLog 与当前最先进方法在效率与输出质量上进行比较。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8574,
  title = {FastLog: An End-to-End Method to Efficiently Generate and Insert Logging Statements},
  author = {Xiaoyuan Xie and Zhipeng Cai and Songqiang Chen and Jifeng Xuan},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3652107}
}