Borrowing from Similar Code: A Deep Learning NLP-Based Approach for Log Statement Automation
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 clones, can be leveraged for log statements prediction? (RQ2) how the approach can be extended to automate log statements' descriptions? and (RQ3) how effective the proposed methods are for log location and description prediction? To pursue our RQs, we perform an experimental study on seven open-source Java projects. We introduce an updated and improved log-aware code-clone detection method to predict the location of logging statements (RQ1). Then, we incorporate natural language processing (NLP) and deep learning methods to automate the log statements' description prediction (RQ2). Our analysis shows that our hybrid NLP and code-clone detection approach (NLP CC'd) outperforms conventional clone detectors in finding log statement locations on average by 15.60% and achieves 40.86% higher performance on BLEU and ROUGE scores for predicting the description of logging statements when compared to prior research (RQ3).
Code (0)
등록된 구현이 없습니다.
Tasks
Clone DetectionManagementPredictionSimilar Papers 제목 키워드 기반
Monetary Policy, Digital Assets, and DeFi Activity
This paper studies the effects of unexpected changes in US monetary policy on digital asset returns. We use event study regressions and find that monetary policy surprises negatively affect BTC and ETH, the two largest d…
Dynamic Borrowing Method for Historical Information Using a Frequentist Approach for Hybrid Control Design
Information borrowing from historical data is gaining attention in clinical trials of rare and pediatric diseases, where statistical power may be insufficient for confirmation of efficacy if the sample size is small. Alt…
An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generation
Unit tests play a key role in ensuring the correctness of software. However, manually creating unit tests is a laborious task, motivating the need for automation. Large Language Models (LLMs) have recently been applied t…
Few-Shot LearningLanguage ModellingLarge Language ModelBorrowing or Codeswitching? Annotating for Finer-Grained Distinctions in Language Mixing
We present a new corpus of Twitter data annotated for codeswitching and borrowing between Spanish and English. The corpus contains 9,500 tweets annotated at the token level with codeswitches, borrowings, and named entiti…
Semantic Similarity-Informed Bayesian Borrowing for Quantitative Signal Detection of Adverse Events
We present a Bayesian dynamic borrowing (BDB) approach to enhance the quantitative identification of adverse events (AEs) in spontaneous reporting systems (SRSs). The method embeds a robust meta-analytic predictive (MAP)…
Bayesian InferenceMarketingSemantic SimilaritySemantic Textual Similarity