Abstract:Software fault localization is a critical issue in software engineering. In recent years, fault localization methods based on large language models (LLMs) have demonstrated a promising prospect in fault localization tasks. However, existing methods maintain only a single decision path for LLMs, which limits the search scope and results in suboptimal fault localization performance. To this end, this study proposes PRIME, an enhanced fault localization method for LLMs based on parallel exploration. The search scope of LLMs is broadened by designing a parallel exploration mechanism for fault locations. Furthermore, multiple candidate fault locations predicted by LLMs are ranked by combining a node importance evaluation method to generate optimized fault localization results. By conducting comparative analysis with other fault localization methods, comprehensive ablation experiments and parameter influence analysis, it is verified that the proposed method can effectively enhance the fault localization performance of LLMs. Compared with the existing methods, PRIME improves the Top-1 metric by over 18%, and its performance improvements in MAP and MRR metrics can reach 15% and 25%, respectively.