Leveraging Code Clones and Natural Language Processing for Log Statement Prediction

09/08/2021
by   Sina Gholamian, et al.
0

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. Prior research has emphasized the importance of logging statements in the operation and debugging of software systems. However, the current logging process is mostly manual and ad hoc, and thus, proper placement and content of logging statements remain as challenges. To overcome these challenges, methods that aim to automate log placement and log content, i.e., 'where, what, and how to log', are of high interest. Thus, we propose to accomplish the goal of this research, that is "to predict the log statements by utilizing source code clones and natural language processing (NLP)", as these approaches provide additional context and advantage for log prediction. We pursue the following four research objectives: (RO1) investigate whether source code clones can be leveraged for log statement location prediction, (RO2) propose a clone-based approach for log statement prediction, (RO3) predict log statement's description with code-clone and NLP models, and (RO4) examine approaches to automatically predict additional details of the log statement, such as its verbosity level and variables. For this purpose, we perform an experimental analysis on seven open-source java projects, extract their method-level code clones, investigate their attributes, and utilize them for log location and description prediction. Our work demonstrates the effectiveness of log-aware clone detection for automated log location and description prediction and outperforms the prior work.

READ FULL TEXT
research
12/02/2021

Borrowing from Similar Code: A Deep Learning NLP-Based Approach for Log Statement Automation

Software developers embed logging statements inside the source code as a...
research
01/13/2022

Using Deep Learning to Generate Complete Log Statements

Logging is a practice widely adopted in several phases of the software l...
research
03/02/2021

An Exploratory Study of Log Placement Recommendation in an Enterprise System

Logging is a development practice that plays an important role in the op...
research
12/11/2019

Using GGNN to recommend log statement level

In software engineering, log statement is an important part because prog...
research
03/22/2021

ConfInLog: Leveraging Software Logs to Infer Configuration Constraints

Misconfigurations have become the dominant causes of software failures i...
research
06/01/2021

Studying Duplicate Logging Statements and Their Relationships with Code Clones

In this paper, we focus on studying duplicate logging statements, which ...
research
05/16/2023

Advising OpenMP Parallelization via a Graph-Based Approach with Transformers

There is an ever-present need for shared memory parallelization schemes ...

Please sign up or login with your details

Forgot password? Click here to reset