Extracting Conceptual Knowledge to Locate Software Issues

📅 2025-09-25
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Defect localization in large codebases is hindered by scattered concerns (across files) and tangled concerns (within functions). To address this, we propose RepoLens—a novel approach that first clusters fine-grained functional units into semantically coherent, high-level concerns and constructs a repository-scale conceptual knowledge base. RepoLens operates in two phases: an offline phase employing static analysis, semantic clustering, and knowledge extraction to build the knowledge base; and an online phase performing lightweight retrieval and knowledge-augmented prompting for large language models (LLMs), without requiring fine-tuning or additional training. This design significantly improves both localization accuracy and cross-project generalizability. Evaluated on the SWE-Lancer-Loc benchmark, RepoLens achieves average improvements of 22% in Hit@k and 46% in Recall@k, with peak gains reaching 504% and 376%, respectively—demonstrating its effectiveness and robustness.

Technology Category

Application Category

📝 Abstract
Issue localization, which identifies faulty code elements such as files or functions, is critical for effective bug fixing. While recent LLM-based and LLM-agent-based approaches improve accuracy, they struggle in large-scale repositories due to concern mixing, where relevant logic is buried in large functions, and concern scattering, where related logic is dispersed across files. To address these challenges, we propose RepoLens, a novel approach that abstracts and leverages conceptual knowledge from code repositories. RepoLens decomposes fine-grained functionalities and recomposes them into high-level concerns, semantically coherent clusters of functionalities that guide LLMs. It operates in two stages: an offline stage that extracts and enriches conceptual knowledge into a repository-wide knowledge base, and an online stage that retrieves issue-specific terms, clusters and ranks concerns by relevance, and integrates them into localization workflows via minimally intrusive prompt enhancements. We evaluate RepoLens on SWE-Lancer-Loc, a benchmark of 216 tasks derived from SWE-Lancer. RepoLens consistently improves three state-of-the-art tools, namely AgentLess, OpenHands, and mini-SWE-agent, achieving average gains of over 22% in Hit@k and 46% in Recall@k for file- and function-level localization. It generalizes across models (GPT-4o, GPT-4o-mini, GPT-4.1) with Hit@1 and Recall@10 gains up to 504% and 376%, respectively. Ablation studies and manual evaluation confirm the effectiveness and reliability of the constructed concerns.
Problem

Research questions and friction points this paper is trying to address.

Locating faulty code elements in large software repositories
Addressing concern mixing where logic is buried in large functions
Solving concern scattering where related logic disperses across files
Innovation

Methods, ideas, or system contributions that make the work stand out.

Extracts conceptual knowledge from code repositories
Decomposes functionalities into semantically coherent concerns
Enhances localization via offline knowledge and online retrieval
🔎 Similar Papers
No similar papers found.
Y
Ying Wang
Fudan University
W
Wenjun Mao
Fudan University
C
Chong Wang
Nanyang Technological University
Z
Zhenhao Zhou
Fudan University
Yicheng Zhou
Yicheng Zhou
Fudan University
W
Wenyun Zhao
Fudan University
Yiling Lou
Yiling Lou
Fudan University, China
Software EngineeringTestingDebugging
Xin Peng
Xin Peng
East China University of Science and Technology
Artificial IntelligenceMachine LearningComplex Process Modeling