SEApr 10

Efficient Black-Box Fault Localization for System-Level Test Code Using Large Language Models

arXiv:2506.190459.9h-index: 4
Predicted impact top 52% in SE · last 90 daysOriginality Incremental advance
AI Analysis

For practitioners debugging complex system-level test code with non-deterministic failures or high execution costs, this work provides an efficient, execution-free fault localization method.

This paper introduces a fully static, LLM-driven approach for fault localization in system-level test code, using a single failure log and three novel algorithms to estimate execution traces. The method achieves 90% F1 score in trace estimation, reduces LLM inference time by up to 34%, and requires 85% less inference time and 93% fewer tokens than the latest LLM-guided FL method.

Fault localization (FL) is a critical step in debugging, which typically relies on repeated executions to pinpoint faulty code regions. However, repeated executions can be impractical in the presence of non-deterministic failures or high execution costs. While recent efforts have leveraged Large Language Models (LLMs) to aid execution-free FL, these have primarily focused on identifying faults in the system-under-test (SUT) rather than in the often complex system-level test code. However, the latter is also important, as in practice, many failures are triggered by faulty test code. To overcome these challenges, we introduce a fully static, LLM-driven approach for system-level test code fault localization (TCFL) that does not require executing the test case. Our method uses a single failure execution log to estimate the test's execution trace through three novel algorithms that identify only code statements likely involved in the failure. This pruned trace, combined with the error message, is used to prompt the LLM to rank potential faulty locations. Our black-box, system-level approach requires no access to the SUT source code and is applicable to complex test scripts that assess full system behavior. We evaluate our technique at the function, block, and line levels using an industrial dataset of faulty Python test cases that were not used in pre-training LLMs. Results show that our best-estimated traces closely match the actual traces, with an F1 score of around 90%. Additionally, pruning the complex system-level test code reduces the LLM's inference time by up to 34% without any loss in FL performance. Our method achieves equal or higher FL accuracy, requiring over 85% less average inference time per test case and 93% fewer tokens than the latest LLM-guided FL method.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes