Lune

ICSE2023顶会

On the Temporal Relations between Logging and Code

Zishuo Ding, Yiming Tang, Yang Li, Heng Li, Weiyi Shang

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Understanding Practitioners' Expectations on Clear Code Review Comments 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
  • Understanding Practitioners' Expectations on Clear Code Review Comments 引用了 Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages
  • Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks 引用了 Studying the use of Java logging utilities in the wild
  • Using Deep Learning to Generate Complete Log Statements 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
  • Using Deep Learning to Generate Complete Log Statements 引用了 DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks
  • Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs 引用了 Understanding Practitioners' Expectations on Clear Code Review Comments
  • Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
  • Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs 引用了 Using Deep Learning to Generate Complete Log Statements
  • Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs 引用了 Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning
  • Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs 引用了 Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages
  • Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs 引用了 DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks
  • Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning 引用了 Understanding Practitioners' Expectations on Clear Code Review Comments
  • Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
  • Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning 引用了 Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages
  • Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning 引用了 Go Static: Contextualized Logging Statement Generation
  • Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning 引用了 DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks
  • Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
  • Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages 引用了 Using Deep Learning to Generate Complete Log Statements
  • Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages 引用了 DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks
  • Go Static: Contextualized Logging Statement Generation 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
  • Go Static: Contextualized Logging Statement Generation 引用了 Using Deep Learning to Generate Complete Log Statements
  • Go Static: Contextualized Logging Statement Generation 引用了 Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages
  • Go Static: Contextualized Logging Statement Generation 引用了 DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks
  • DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. Go Static: Contextualized Logging Statement GenerationYichen Li, Yintong Huo, Renyi Zhong, Zhihan Jiang 等FSE 2024 · 17 次引用
  2. Are They All Good? Studying Practitioners' Expectations on the Readability of Log MessagesZhenhao Li, An Ran Chen, Xing Hu, Xin Xia 等ASE 2023 · 6 次引用
  3. Understanding Practitioners' Expectations on Clear Code Review CommentsJunkai Chen, Zhenhao Li, Qiheng Mao, Xing Hu 等ISSTA 2025 · 4 次引用
  4. Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and ReasoningXin Wang, Zhenhao Li, Zishuo DingASE 2025 · 1 次引用
  5. Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMsHe Yang Yuan, Xin Wang, Kundi Yao, An Ran Chen 等FSE 2026

它引用的 Paper5

  1. Using Deep Learning to Generate Complete Log StatementsAntonio Mastropaolo, Luca Pascarella, Gabriele BavotaICSE 2022 · 60 次引用
  2. DeepLV: Suggesting Log Levels Using Ordinal Based Neural NetworksZhenhao Li, Heng Li, Tse-Hsun Peter Chen, Weiyi ShangICSE 2021 · 44 次引用
  3. Where Shall We Log? Studying and Suggesting Logging Locations in Code BlocksZhenhao Li, Tse-Hsun Chen, Weiyi ShangASE 2020 · 41 次引用
  4. Towards the use of the readily available tests from the release pipeline as performance tests: are we there yet?Zishuo Ding, Jinfu Chen, Weiyi ShangICSE 2020 · 33 次引用
  5. Studying the use of Java logging utilities in the wildBoyuan Chen, Zhen Ming (Jack) JiangICSE 2020 · 28 次引用

相关 Paper

  1. UniLog: Automatic Logging via LLM and In-Context LearningJunjielong Xu, Ziang Cui, Yuan Zhao, Xu Zhang 等ICSE 2024 · 56 次引用
  2. Deep Just-In-Time Inconsistency Detection Between Comments and Source CodeSheena Panthaplackel, Junyi Jessy Li, Milos Gligoric, Raymond J. MooneyAAAI 2021 · 62 次引用
  3. FastLog: An End-to-End Method to Efficiently Generate and Insert Logging StatementsXiaoyuan Xie, Zhipeng Cai, Songqiang Chen, Jifeng XuanISSTA 2024 · 3 次引用
  4. How Do Developers' Profiles and Experiences Influence their Logging Practices? An Empirical Study of Industrial PractitionersGuoping Rong, Shenghui Gu, Haifeng Shen, He Zhang 等ICSE 2023 · 4 次引用
  5. When to Say What: Learning to Find Condition-Message InconsistenciesIslem Bouzenia, Michael PradelICSE 2023 · 5 次引用
黄昏的海面,两侧是细线勾勒的悬崖