Lune

ICSE2022顶会

Using Deep Learning to Generate Complete Log Statements

Antonio Mastropaolo, Luca Pascarella, Gabriele Bavota

摘要

Logging is a practice widely adopted in several phases of the software lifecycle. For example, during software development log statements allow engineers to verify and debug the system by exposing fine-grained information of the running software. While the benefits of logging are undisputed, taking proper decisions about where to inject log statements, what information to log, and at which log level (e.g., error, warning) is crucial for the logging effectiveness. In this paper, we present LANCE (Log stAtemeNt reCommEnder), the first approach supporting developers in all these decisions. LANCE features a Text-To-Text-Transfer-Transformer (T5) model that has been trained on 6,894,456 Java methods. LANCE takes as input a Java method and injects in it a full log statement, including a human-comprehensible logging message and properly choosing the needed log level and the statement location. Our results show that LANCE is able to (i) properly identify the location in the code where to inject the statement in 65.9% of Java methods requiring it; (ii) selecting the proper log level in 66.2% of cases; and (iii) generate a completely correct log statement including a meaningful logging message in 15.2% of cases.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Generative AI for Pull Request Descriptions: Adoption, Impact, and Developer Interventions 引用了 Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
  • Automatic Root Cause Analysis via Large Language Models for Cloud Incidents 引用了 Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
  • Go Static: Contextualized Logging Statement Generation 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
  • Go Static: Contextualized Logging Statement Generation 引用了 DeepLog: Anomaly Detection and Diagnosis from System Logs through Deep Learning
  • Go Static: Contextualized Logging Statement Generation 引用了 DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks
  • AUGER: automatically generating review comments with pre-training models 引用了 Towards Automating Code Review Activities
  • DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks 引用了 Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper16

  1. Automatic Root Cause Analysis via Large Language Models for Cloud IncidentsYinfang Chen, Huaibing Xie, Minghua Ma, Yu Kang 等EuroSys 2024 · 175 次引用
  2. LILAC: Log Parsing using LLMs with Adaptive Parsing CacheZhihan Jiang, Jinyang Liu, Zhuangbin Chen, Yichen Li 等FSE 2024 · 85 次引用
  3. AUGER: automatically generating review comments with pre-training modelsLingwei Li, Li Yang, Huaxi Jiang, Jun Yan 等FSE 2022 · 56 次引用
  4. Go Static: Contextualized Logging Statement GenerationYichen Li, Yintong Huo, Renyi Zhong, Zhihan Jiang 等FSE 2024 · 17 次引用
  5. Generative AI for Pull Request Descriptions: Adoption, Impact, and Developer InterventionsTao Xiao, Hideaki Hata, Christoph Treude, Kenichi MatsumotoFSE 2024 · 13 次引用

它引用的 Paper6

  1. DeepLog: Anomaly Detection and Diagnosis from System Logs through Deep LearningMin Du, Feifei Li, Guineng Zheng, Vivek SrikumarCCS 2017 · 1,823 次引用
  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. Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related TasksAntonio Mastropaolo, Simone Scalabrino, Nathan Cooper, David Nader-Palacio 等ICSE 2021 · 9 次引用
  5. Towards Automating Code Review ActivitiesRosalia Tufano, Luca Pascarella, Michele Tufano, Denys Poshyvanyk 等ICSE 2021 · 4 次引用

相关 Paper

  1. FastLog: An End-to-End Method to Efficiently Generate and Insert Logging StatementsXiaoyuan Xie, Zhipeng Cai, Songqiang Chen, Jifeng XuanISSTA 2024 · 3 次引用
  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. UniLog: Automatic Logging via LLM and In-Context LearningJunjielong Xu, Ziang Cui, Yuan Zhao, Xu Zhang 等ICSE 2024 · 56 次引用
  4. Studying the use of Java logging utilities in the wildBoyuan Chen, Zhen Ming (Jack) JiangICSE 2020 · 28 次引用
  5. VerLog: Enhancing Release Note Generation for Android Apps using Large Language ModelsJiawei Guo, Haoran Yang, Haipeng CaiISSTA 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖