arrow
Return

Studying software logging using topic models

delete2018-01-30
delete65
PRE
AI
H
Heng Li *
Tse-Hsun Chen cover
Tse-Hsun Chen (Tse-Hsun Chen)
W
Weiyi Shang
Ahmed E. Hassan cover
Ahmed E. Hassan (Ahmed E. Hassan)
DOI:10.1007/s10664-018-9595-8delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Software developers insert logging statements in their source code to record important runtime information; such logged information is valuable for understanding system usage in production and debugging system failures. However, providing proper logging statements remains a manual and challenging task. Missing an important logging statement may increase the difficulty of debugging a system failure, while too much logging can increase system overhead and mask the truly important information. Intuitively, the actual functionality of a software component is one of the major drivers behind logging decisions. For instance, a method maintaining network communications is more likely to be logged than getters and setters. In this paper, we used automatically-computed topics of a code snippet to approximate the functionality of a code snippet. We studied the relationship between the topics of a code snippet and the likelihood of a code snippet being logged (i.e., to contain a logging statement). Our driving intuition is that certain topics in the source code are more likely to be logged than others. To validate our intuition, we conducted a case study on six open source systems, and we found that i) there exists a small number of log-intensive topics that are more likely to be logged than other topics; ii) each pair of the studied systems share 12% to 62% common topics, and the likelihood of logging such common topics has a statistically significant correlation of 0.35 to 0.62 among all the studied systems; and iii) our topic-based metrics help explain the likelihood of a code snippet being logged, providing an improvement of 3% to 13% on AUC and 6% to 16% on balanced accuracy over a set of baseline metrics that capture the structural information of a code snippet. Our findings highlight that topics contain valuable information that can help guide and drive developers' logging decisions.
Keywords:
Software logging
Topic model
Mining software repositories
Studying the characteristics of logging practices in mobile apps: a case study on F-Droid
err2019-02-07
err38
PREAI
errZeng, Yi; Chen, Jinfu; Shang, Weiyi; Chen, Tse-Hsun (Peter)
errShare
errSave
Towards just-in-time suggestions for log changes
err2016-10-24
err65
PREAI
errLi, Heng; Shang, Weiyi; Zou, Ying; Hassan, Ahmed E.
errShare
errSave
Studying logging practice in test code
err2022-04-07
err5
PREAI
errZhang, Haonan; Tang, Yiming; Lamothe, Maxime; Li, Heng; Shang, Weiyi
errShare
errSave
Studying and detecting log-related issues
err2018-03-15
err38
errOAAI
errHassani, Mehran; Shang, Weiyi; Shihab, Emad; Tsantalis, Nikolaos
errShare
errSave
Automated topic naming Supporting cross-project analysis of software maintenance activities
err2012-05-03
err24
PREAI
errHindle, Abram; Ernst, Neil A.; Godfrey, Michael W.; Mylopoulos, John
errShare
errSave
Detecting Latent Topics and Trends in Software Engineering Research Since 1980 Using Probabilistic Topic Modeling
err2022-01-01
err15
errOAAI
errGurcan, Fatih; Dalveren, Gonca Gokce Menekse; Cagiltay, Nergiz Ercil; Soylu, Ahmet
errShare
errSave

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
6.4K

Organization

Q
queens university - canada
Scholars:
1.8W
Papers: 1.7W
Citations: 2.1W
C
concordia university - canada
Scholars:
8.0K
Papers: 8.9K
Citations: 1.1W
Cited Papers

Cited Papers

Coherent-Radiation Spectroscopy of Few-Femtosecond Electron Bunches Using a Middle-Infrared Prism Spectrometer
err2013-10-28
err0
errOAAI
errT. J. Maxwell; C. Behrens; Y. Ding; A. S. Fisher; J. Frisch; Z. Huang; H. Loos
errShare
errSave
Topic-based software defect explanation
err2017-07-01
err19
PREAI
errChen, Tse-Hsun; Shang, Weiyi; Nagappan, Meiyappan; Hassan, Ahmed E.; Thomas, Stephen W.
errShare
errSave
Roles of Nicotinamide Adenine Dinucleotide (NAD+) in Biological Systems
err2018-01-19
err0
errOAAI
errPalmiro Poltronieri; Nataša Čerekovic
errShare
errSave
Amaurosis Fugax: Associations with Heritable Thrombophilia
err2005-07-01
err0
PREAI
errC. J. Glueck; Naila Goldenberg; Howard Bell; Karl Golnik; Ping Wang
errShare
errSave
errShare
errSave
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
researcher View more