Borrowing from Similar Code: A Deep Learning NLP-Based Approach for Log Statement Automation
Sina Gholamian, Paul A. S. Ward

TL;DR
This paper presents a hybrid NLP and code clone detection approach to automate the placement and content prediction of log statements in source code, improving accuracy over previous methods.
Contribution
It introduces an improved log-aware code clone detection method and combines NLP with deep learning to predict log descriptions, advancing automation in logging practices.
Findings
Outperforms conventional clone detectors by 15.60% in log location prediction
Achieves 40.86% higher BLEU and ROUGE scores for log description prediction
Effective on seven open-source Java projects
Abstract
Software developers embed logging statements inside the source code as an imperative duty in modern software development as log files are necessary for tracking down runtime system issues and troubleshooting system management tasks. However, the current logging process is mostly manual, and thus, proper placement and content of logging statements remain as challenges. To overcome these challenges, methods that aim to automate log placement and predict its content, i.e., 'where and what to log', are of high interest. Thus, we focus on predicting the location (i.e., where) and description (i.e., what) for log statements by utilizing source code clones and natural language processing (NLP), as these approaches provide additional context and advantage for log prediction. Specifically, we guide our research with three research questions (RQs): (RQ1) how similar code snippets, i.e., code…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software System Performance and Reliability · Software Engineering Techniques and Practices
