paperbot · PL 论文追踪

全部论文 待读 收藏

P2 On the Temporal Relations between Logging and Code

论日志与代码之间的时序关系
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 1/10 · 该论文研究日志与代码的时序关系检测,属于软件工程/开发者工具中的日志分析,并未涉及用户核心关注的 LLM/Agent 与静态分析交叉、浮点程序分析或贝叶斯程序分析。虽然涉及程序分析,但与研究方向的核心问题距离较远。引用 19 inbox
Zishuo Ding, Yiming Tang, Yang Li, Heng Li, Weiyi Shang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:首次系统研究日志与代码的逻辑/语义时序关系,提出检测规则与工具 TempoLo,并在项目中确认修复时序不一致。

日志文本若产生误导,会妨碍开发者使用日志;而日志常记录系统行为的时序信息。现有日志建议研究较少考察日志与代码的时序关系。本文首次系统研究两类时序关系:可由日志语句与代码执行顺序推断的逻辑时序关系,以及由日志文本语义推断的语义时序关系。作者通过定性分析刻画二者及其不一致,制定检测规则并实现工具 TempoLo。在四个项目上的评估表明,TempoLo 能有效检测时序不一致且误报较少;向开发者报告 15 个实例后,来自三个项目的 13 个被确认并修复,另 2 个待处理。该工作为理解日志与代码关系奠定基础。

问题
日志文本可能误导开发者,而已有日志建议研究很少考察日志与代码之间的时序关系,尤其是逻辑时序与语义时序及其不一致。
方法
通过定性分析刻画逻辑时序与语义时序关系及其不一致,归纳检测规则,并实现自动检测工具 TempoLo。
评估
在四个项目上评估 TempoLo 检测时序不一致的有效性与误报情况,并向开发者报告 15 个实例;三个项目中的 13 个实例被确认并修复,另 2 个待处理。
原文摘要(Abstract)

Prior work shows that misleading logging texts (i.e., the textual descriptions in logging statements) can be counterproductive for developers during their use of logs. One of the most important types of information provided by logs is the temporal information of the recorded system behavior. For example, a logging text may use a perfective aspect to describe a fact that an important system event has finished. Although prior work has performed extensive studies on automated logging suggestions, few of these studies investigate the temporal relations between logging and code. In this work, we make the first attempt to comprehensively study the temporal relations between logging and its corresponding source code. In particular, we focus on two types of temporal relations: (1) logical temporal relations, which can be inferred from the execution order between the logging statement and the corresponding source code; and (2) semantic temporal relations, which can be inferred based on the semantic meaning of the logging text. We first perform qualitative analyses to study these two types of logging-code temporal relations and the inconsistency between them. As a result, we derive rules to detect these two types of temporal relations and their inconsistencies. Based on these rules, we propose a tool named TempoLo to automatically detect the issues of temporal inconsistencies between logging and code. Through an evaluation of four projects, we find that TempoLo can effectively detect temporal inconsistencies with a small number of false positives. To gather developers' feedback on whether such inconsistencies are worth fixing, we report 15 detected instances from these projects to developers. 13 instances from three projects are confirmed and fixed, while two instances of the remaining project are pending at the time of this writing. Our work lays the foundation for describing temporal relations between logging and code and demonstrates the potential for a deeper understanding of the relationship between logging and code.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{DingTLLS23,
  title = {On the Temporal Relations between Logging and Code},
  author = {Zishuo Ding and Yiming Tang and Yang Li and Heng Li and Weiyi Shang},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00079}
}