ICSME 2025
Sun 7 - Fri 12 September 2025 Auckland, New Zealand

As software systems scale, fault detection and localization become increasingly complex due to intricate module interactions. Logging is essential for diagnosis, yet an analysis of 1,158 bug reports from the Bugs.jar dataset shows that fault-related variables have only 13.16% log coverage, leading to incomplete diagnostics, prolonged troubleshooting, and higher maintenance costs. Existing logging enhancement methods focus on source code analysis during development, lacking adaptability to deployed systems, while runtime modifications are often costly and impractical. To address these challenges, this paper presents VarFR, a novel bytecode-level approach for dynamically tracking fault-related variables and enhancing log coverage without modifying the source code. VarFR employs a recommendation model that constructs a bytecode multi-feature fusion graph by integrating bytecode semantics, method control flow, and local variable metadata. By improving fault observability at the bytecode level, the proposed approach has the potential to facilitate debugging, reduce maintenance overhead, and enhance software adaptability, thereby supporting the long-term evolution of software systems. Experimental results on the Bugs.jar dataset demonstrate that VarFR significantly outperforms baseline models in fault-related variable recommendation, underscoring its effectiveness in improving software maintainability and reliability.