Skip to content

OwlPath: Lossless Knowledge Compression for LLM Bug Repair

Jul 2026 · arXiv.org · Vol abs/2607.27249 · 0 citations · 5 references
Computer Science

TL;DR

OwlPath is presented, an OWL2 reasoning layer atop CodeGraph, a widely used code intelligence platform with 500K+ GitHub stars, offering a unified CLI for structural code retrieval, with lossless knowledge compression.

Abstract

LLM-based software engineering agents are constrained by limited context windows: roughly 100K tokens must store structurally relevant code subsets to resolve bugs. Standard retrieval models treat code as plain text, forcing agents to resolve multi-hop dependencies including subclass chains, transitive callers and interface implementations through slow trial and error. We tackle this limitation with lossless knowledge compression, encoding source code into an OWL2 ontology to answer structural queries using minimal relevant code fragments. We present OwlPath, an OWL2 reasoning layer atop CodeGraph, a widely used code intelligence platform with 500K+ GitHub stars, offering a unified CLI for structural code retrieval. Powered by tree-sitter parsing, OwlPath supports multi-language repositories (Python, JavaScript, TypeScript, Go, etc.) and encodes language-specific semantics into a unified OWL2 ontology. It adopts two complementary modules. First, a transitive-closure engine fetches all structurally linked symbols via single SPARQL property-path queries, capturing multi-hop relations missed by string matching. Second, the OWL Software Knowledge Map (OWL-SKM) precomputes a compact 3KB summary with module trees, core APIs and issue-related symbols, directing agents to target modules in the first query. Evaluated on 18 SWE-bench Pro instances, OwlPath obtains a 68.4% strict-apply rate versus 66.7% for the CodeGraph baseline, cutting token usage by 28.8% and runtime by 39.5%. In offline retrieval tests over 67 instances, OwlPath improves recall 2.06 times (0.464 vs 0.226) and reaches 88.1% hit rate compared to CodeGraph's 59.7%. On a 37-question structural retrieval benchmark, recall rises from 4.4% to 28.8%, with 69-80% accuracy on transitive caller and interface tasks.

View source

Similar papers

Preprint Sep 2026

Detecting Argument-Swap Bugs Using Context-Enhanced Code Representations

Names of source code elements convey rich semantic information and have been widely used in software engineering tasks such as bug detection, code completion, type prediction, and code classification. Prior studies exploit lexical similarity between method arguments and formal parameter names to detect bugs caused by incorrectly ordered arguments, typically relying on establishing mappings between method calls and their corresponding definitions. However, such mappings are often difficult to obtain in dynamically typed languages like Python. In this paper, we present BugProbe, a learning-based approach for detecting incorrectly ordered arguments in Python method calls that does not require call-to-definition mappings. Our approach leverages multiple sources of contextual information, including local context and argument usage context, and combines name-based similarity with machine learning to construct expressive representations of method arguments. We collect a new dataset of 132,739 Python source files from the top-1,000 starred GitHub repositories, yielding 3,371,244 synthetic training examples, and contribute a curated benchmark of 55 real-world argument-swap bugs manually verified from commit histories. We evaluate our approach on this dataset and show that it achieves high accuracy and consistently outperforms a state-of-the-art baseline across standard evaluation metrics. These results demonstrate that effective detection of argument-ordering bugs is possible without relying on explicit call-to-definition resolution, making the approach well suited for dynamically typed language settings.

Subrata Das, Ali Aman, Muhammad Asaduzzaman et al. · 0 citations
Jul 2026

JSTestCraft: Addressing Context Deficits in JavaScript Unit Test Generation via Agentic Multi-Level Contextual Analysis

JSTestCraft reconstructs missing context via three enrichment agents: library, structural, and semantic via three enrichment agents, demonstrating that context reconstruction and agentic collaboration enable LLMs to perform more reliable and adaptive testing in dynamic JavaScript environments.

Yi-Yang Liu, Yanjie Zhao, Haoyu Wang · 0 citations
Open access Aug 2026

StructFix: a structure-aware reasoning framework for automated program repair with code property graphs

StructFix is proposed, a structure-aware APR framework that grounds masked patch generation in Code Property Graphs (CPGs), and explicitly coupling structural dependencies with masked generation improves repair effectiveness and enables transfer across datasets.

Mengtian Cui, Yang-Fan Liu, Zhibo Lu et al. · 0 citations
Preprint Aug 2026

Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation

DyRetriever is an efficient context retrieval method via partial dependency graphs that uses an LLM to first select a set of entry-point functions and then perform multi-hop reasoning along the code dependency graph, eliminating manually designed rules and enabling flexibility across scenarios.

Zhongxin Liu, Zhonghao Jiang, Zhi-Fan Ye et al. · 1 citation
Open access Aug 2026

JDQuery: Query-Driven Defect Localization for Java Source Code Based on Code Knowledge Graphs

Java is one of the most widely used object-oriented programming languages, making accurate and efficient defect localization essential for improving software quality and reliability. Conventional static analysis techniques primarily rely on predefined rules and localized syntactic matching, which may limit their ability to capture complex structural and semantic relationships among program entities. To address these limitations, this paper proposes JDQuery, a query-driven defect localization framework for Java source code based on a code knowledge graph. The framework parses Java source code into abstract syntax trees (ASTs), extracts software entities and their semantic relationships according to a formalized domain ontology, and constructs a unified code knowledge graph that integrates syntactic and semantic information. Based on the structural characteristics of Java defects, defect patterns are translated into Cypher queries, enabling flexible defect localization through graph pattern matching. Experiments on multiple open-source Java projects, including both injected defects and native real-world defects, demonstrate that JDQuery achieves precision values of 97.20% and 92.87% on two projects of different code sizes. A comparative evaluation with PMD further shows that JDQuery achieves substantially higher recall while maintaining comparable precision for the evaluated defects. Efficiency experiments demonstrate that JDQuery maintains millisecond-level query latency even when processing large-scale Java projects.

Tianyuan Hu, Tongjie Wang · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.