LoGenText-Plus : Improving Neural Machine Translation Based Logging Texts Generation with Syntactic Templates

计算机科学 登录中 源代码 编码(集合论) 背景(考古学) 模板 自然语言处理 人工智能 数据库 程序设计语言 集合(抽象数据类型) 生态学 生物 古生物学
作者
Zishuo Ding,Yiming Tang,Xiaoyu Cheng,Heng Li,Weiyi Shang
出处
期刊:ACM Transactions on Software Engineering and Methodology [Association for Computing Machinery]
卷期号:33 (2): 1-45 被引量:4
标识
DOI:10.1145/3624740
摘要

Developers insert logging statements in the source code to collect important runtime information about software systems. The textual descriptions in logging statements (i.e., logging texts) are printed during system executions and exposed to multiple stakeholders including developers, operators, users, and regulatory authorities. Writing proper logging texts is an important but often challenging task for developers. Prior studies find that developers spend significant efforts modifying their logging texts. However, despite extensive research on automated logging suggestions, research on suggesting logging texts rarely exists. To fill this knowledge gap, we first propose LoGenText (initially reported in our conference paper), an automated approach that uses neural machine translation (NMT) models to generate logging texts by translating the related source code into short textual descriptions. LoGenText takes the preceding source code of a logging text as the input and considers other context information, such as the location of the logging statement, to automatically generate the logging text. LoGenText ’s evaluation on 10 open source projects indicates that the approach is promising for automatic logging text generation and significantly outperforms the state-of-the-art approach. Furthermore, we extend LoGenText to LoGenText-Plus by incorporating the syntactic templates of the logging texts. Different from LoGenText , LoGenText-Plus decomposes the logging text generation process into two stages. LoGenText-Plus first adopts an NMT model to generate the syntactic template of the target logging text. Then LoGenText-Plus feeds the source code and the generated template as the input to another NMT model for logging text generation. We also evaluate LoGenText-Plus on the same 10 projects and observe that it outperforms LoGenText on 9 of them. According to a human evaluation from developers’ perspectives, the logging texts generated by LoGenText-Plus have a higher quality than those generated by LoGenText and the prior baseline approach. By manually examining the generated logging texts, we then identify five aspects that can serve as guidance for writing or generating good logging texts. Our work is an important step toward the automated generation of logging statements, which can potentially save developers’ efforts and improve the quality of software logging. Our findings shed light on research opportunities that leverage advances in NMT techniques for automated generation and suggestion of logging statements.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
帅气寒松完成签到,获得积分10
刚刚
安静的芷天完成签到,获得积分10
刚刚
刚刚
紧张的发带完成签到,获得积分10
2秒前
团子圆滚滚完成签到 ,获得积分10
2秒前
洗了蒜了完成签到,获得积分10
2秒前
Lyuoah发布了新的文献求助10
2秒前
2秒前
3秒前
亦周完成签到,获得积分10
3秒前
搞怪的白昼完成签到,获得积分10
3秒前
Jasper的应助被荔枝采纳,获得10
3秒前
cup发布了新的文献求助10
4秒前
nini发布了新的文献求助10
4秒前
JamesPei的应助被香菜日记采纳,获得10
4秒前
4秒前
伽翌完成签到,获得积分10
5秒前
wy关闭了wy的文献求助
5秒前
5秒前
5秒前
6秒前
谵妄姿态发布了新的文献求助10
7秒前
12233发布了新的文献求助10
7秒前
7秒前
滴滴发布了新的文献求助10
8秒前
BBIBBI完成签到,获得积分10
9秒前
寂寞的小鱼的应助被茶壶喝茶采纳,获得10
9秒前
10秒前
10秒前
专注的子骞的应助被陶醉仇天采纳,获得10
10秒前
10秒前
子云发布了新的文献求助10
10秒前
11秒前
11秒前
Jasper的应助被yizhiyang采纳,获得10
11秒前
12秒前
Jennier发布了新的文献求助10
12秒前
linman发布了新的文献求助10
12秒前
tuo发布了新的文献求助10
12秒前
12秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Les Mantodea De Guyane 2000
从自在到自觉:中华民族观念形成研究:全二册 800
Guidelines for fracture-safe and fatigue-reliable design of steel structures 600
Problems and Solutions for Integer and Combinatorial Optimization: Building Skills in Discrete Optimization 600
Organizational Behavior 510
桑白皮エキスの実験的, 臨床的育毛効果について 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8000690
求助须知:如何正确求助?哪些是违规求助? 9453795
关于积分的说明 21146120
捐赠科研通 7573603
什么是DOI,文献DOI怎么找? 3381194
关于科研通互助平台的介绍 2513927
邀请新用户注册赠送积分活动 2415245