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.
FeatLens builds a feature index that links natural-language feature descriptions to function-level code entities and dynamically constructs a task-specific seed graph from the feature index and applies semantic-structural graph reasoning with personalized PageRank to select a compact reasoning graph.
Xu-Tian Li, Bo Xiong, Yi-Feng Zhu et al.· 0 citations
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 i...
Subrata Das, Ali Aman, Muhammad Asaduzzaman et al.· 0 citations
Design smells are structural flaws that, if not detected early, can impair software quality and increase maintenance costs. Traditional detection approaches are language-specific and rely on low-level metrics, making them ineffective for heterogeneous, multilingual systems. This paper presents Ontology-Driven Design De...
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.· International Conference on...· 0 citations
Large collections of software artifacts often contain recurring structural patterns that can provide useful evidence for language understanding or empirical analysis, and provide requirements for language improvement of self-adaptable languages. OCL-based queries may specify such patterns but become more complex when p...
AnchorRepair is proposed, a dual-agent framework that treats the Java source as first-class diagnostic evidence that generalizes across LLM backends without modification and achieves repair coverage comparable to a general-purpose coding agent at less than half the cost.
Jia-Jun Sun, Yao-Cai Zhao, Feng-Jie Li et al.· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.