Automated Log Statement using Source-Code Metrics
Citations

WEB OF SCIENCE

0
Citations

SCOPUS

0

초록

Logging is essential in modern software development for testing, debugging, monitoring, and maintaining applications, but manually inserting log statements is time-consuming and inconsistent. While automated log generation methods exist, their effectiveness is often limited when applied to methods with high structural complexity, leading to inaccurate or irrelevant logs. To address this challenge, we propose a novel approach for automated log generation that proactively simplifies complex method before model training. By employing source-code metrics, including cyclomatic complexity, maintainability index, and lines of code, we identify methods that exceed predefined complexity thresholds and decompose them into smaller, more manageable blocks. This decomposition strategy allows a fine-tuned CodeT5+ model to learn from more focused contexts, significantly enhancing its ability to generate accurate logging statements. The proposed method achieved an overall accuracy of 25.23%, with a position accuracy of 99.87%, a level accuracy of 75.34%, and a message accuracy of 31.69%, represent a substantial improvement over baselines, including LEONID and ELogger. Our findings demonstrate that integrating a metrics-based code decomposition preprocessing step is a highly effective strategy for improving automated log generation, offering a scalable solution to enhance software maintainability.

키워드

Log Generationpretrained language modelsoftware engineeringsource-code metrics
제목
Automated Log Statement using Source-Code Metrics
저자
Kim, Se-JinLee, Chan-Gun
DOI
10.1109/ACCESS.2025.3623238
발행일
2025
유형
Article
저널명
IEEE Access
13
페이지
182579 ~ 182592

파일 다운로드