当前位置: X-MOL 学术Empir. Software Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Guiding log revisions by learning from software evolution history
Empirical Software Engineering ( IF 3.5 ) Pub Date : 2019-09-09 , DOI: 10.1007/s10664-019-09757-y
Shanshan Li , Xu Niu , Zhouyang Jia , Xiangke Liao , Ji Wang , Tao Li

Despite the importance of log statements in postmortem debugging, developers are difficult to establish good logging practices. There are mainly two reasons. First, there are no rigorous specifications or systematic processes to instruct logging practices. Second, logging code evolves with bug fixes or feature updates. Without considering the impact of software evolution, previous works on log enhancement can partially release the first problem but are hard to solve the latter. To fill this gap, this paper proposes to guide log revisions by learning from evolution history. Motivated by code clones, we assume that logging code with similar context is pervasive and deserves similar modifications and conduct an empirical study on 12 open-source projects to validate our assumption. Upon this, we design and implement LogTracker, an automatic tool that learns log revision rules by mining the correlation between logging context and modifications and recommends candidate log revisions by applying these rules. With an enhanced modeling of logging context, LogTracker can instruct more intricate log revisions that cannot be covered by existing tools. Our experiments show that LogTracker can detect 369 instances of candidates when applied to the latest versions of software. So far, we have reported 79 of them, and 52 have been accepted.

中文翻译:

通过学习软件演化历史来指导日志修订

尽管日志语句在事后调试中很重要,但开发人员很难建立良好的日志记录实践。主要有两个原因。首先,没有严格的规范或系统流程来指导日志记录实践。其次,日志代码随着错误修复或功能更新而发展。在不考虑软件进化的影响的情况下,以前的日志增强工作可以部分解决第一个问题,但很难解决后者。为了填补这一空白,本文提出通过学习进化历史来指导日志修订。受代码克隆的启发,我们假设具有相似上下文的日志记录代码普遍存在,值得进行类似的修改,并对 12 个开源项目进行实证研究以验证我们的假设。在此基础上,我们设计并实现了 LogTracker,一种自动工具,通过挖掘日志上下文和修改之间的相关性来学习日志修订规则,并通过应用这些规则推荐候选日志修订。通过日志上下文的增强建模,LogTracker 可以指示现有工具无法覆盖的更复杂的日志修订。我们的实验表明,当应用于最新版本的软件时,LogTracker 可以检测到 369 个候选实例。到目前为止,我们已经报告了其中的 79 个,并且已经接受了 52 个。我们的实验表明,当应用于最新版本的软件时,LogTracker 可以检测到 369 个候选实例。到目前为止,我们已经报告了其中的 79 个,并且已经接受了 52 个。我们的实验表明,当应用于最新版本的软件时,LogTracker 可以检测到 369 个候选实例。到目前为止,我们已经报告了其中的 79 个,并且已经接受了 52 个。
更新日期:2019-09-09
down
wechat
bug