• Home
  • Search
  • Fault Localization from the Semantic Code Search Perspective
  • Cite Icon1
  • https://doi.org/10.1145/3757915Copy DOI Icon

Fault Localization from the Semantic Code Search Perspective

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

The software development process is characterized by an iterative cycle of continuous functionality implementation and debugging, essential for the enhancement of software quality and adaptability to changing requirements. This process incorporates two isolatedly studied tasks: Code Search (CS), which retrieves reference code from a code corpus to aid in code implementation, and Fault Localization (FL), which identifies code entities responsible for bugs within the software project to boost software debugging. The basic observation of this study is that these two tasks exhibit similarities since they both address search problems. Notably, CS techniques have demonstrated greater effectiveness than FL ones, possibly because of the precise semantic details of the required code offered by natural language queries, which are not readily accessible to FL methods. Drawing inspiration from this, we hypothesize that a fault localizer could achieve greater proficiency if semantic information about the buggy methods were made available. Based on this idea, we propose \(\mathtt{CosFL}\) , an FL approach that decomposes the FL task into two steps: query generation , which describes the functionality of the problematic code in natural language, and fault retrieval , which uses CS to find program elements semantically related to the query, allowing for finishing the FL task from a CS perspective. Specifically, to depict the buggy functionalities and generate high-quality queries, \(\mathtt{CosFL}\) extensively harnesses the code analysis, semantic comprehension, text generation, and decision-making capabilities of LLMs. Moreover, to enhance the accuracy of CS, \(\mathtt{CosFL}\) captures varying levels of context information and employs a multi-granularity code search strategy, which facilitates a more precise identification of buggy methods from a holistic view. The evaluation on 835 real bugs from 23 Java projects shows that \(\mathtt{CosFL}\) successfully localizes 324 bugs within Top-1, which significantly outperforms the state-of-the-art approaches by 26.6%-57.3%. The ablation study and sensitivity analysis further validate the importance of different components and the robustness of \(\mathtt{CosFL}\) across different backend models.

Similar Papers
  • Research Article
  • Citations15

Big Code Search: A Bibliography

  • Aug 26, 2023
  • ACM Computing Surveys
  • Kisub Kim +7
  • Research Article

Is Fault Localization Effective on Industrial Software? A Case Study on Computer-Aided Engineering Projects

  • Jan 20, 2026
  • ACM Transactions on Software Engineering and Methodology
  • Zhilei Ren +4
  • Research Article
  • Citations7

MTL-TRANSFER: Leveraging Multi-task Learning and Transferred Knowledge for Improving Fault Localization and Program Repair

  • Jun 27, 2024
  • ACM Transactions on Software Engineering and Methodology
  • Xu Wang +7
  • Conference Article
  • Citations8

CSSAM: Code Search via Attention Matching of Code Semantics and Structures

  • Mar 01, 2023
  • Bo Cai +2
  • Conference Article
  • Citations51

A novel fault location method and algorithm for DC distribution protection

  • Oct 01, 2016
  • Xianyong Feng +2
  • Research Article
  • Citations14

Optimal placement of voltage measurements for wide area fault location observability considering the uncertainty of network parameters

  • Aug 07, 2018
  • Electric Power Systems Research
  • Nader Jalali Marand +2
  • Research Article

Fault location on overhead power lines using multi-hypothesis sequential analysis and the Armitage algorithm

  • Dec 21, 2024
  • Izvestiâ Akademii nauk SSSR. Ènergetika
  • A L Kulikov +2
  • Conference Article
  • Citations8

A case study of paired interleaving for evaluating code search techniques

  • Feb 01, 2014
  • Kostadin Damevski +2
  • Conference Article
  • Citations280

CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)

  • Nov 01, 2015
  • Fei Lv +5
  • Conference Article
  • Citations1

A Novel Traveling Wave Based Fault Location Algorithm for Teed-Circuits

  • Dec 04, 2020
  • Bin Xu +4
  • Book Chapter

Chapter 12 - Utility practices on fault location

  • Jan 01, 2022
  • Power System Fault Diagnosis
  • A.H Al-Mohammed +2
  • Conference Article
  • Citations3

Real-time multiterminal fault location system for transmission networks

  • Oct 01, 2011
  • Yanfeng Gong +2
  • Research Article
  • Citations54

Fault localization for automated program repair: effectiveness, performance, repair correctness

  • Mar 26, 2016
  • Software Quality Journal
  • Fatmah Yousef Assiri +1
  • Research Article
  • Citations18

Real Fault Section Estimation in Electrical Distribution Networks Based on the Fault Frequency Component Analysis

  • Mar 24, 2019
  • Energies
  • Ehsan Gord +3
  • Conference Article
  • Citations13

A novel double terminal traveling wave fault location method not influenced by wave speed

  • Oct 01, 2009
  • Wu Zhihua +4
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.