April 2025
What is this page?
This page lists works of an author who doesn't have a ResearchGate profile or hasn't added the works to their profile yet. It is automatically generated from public (personal) data to further our legitimate goal of comprehensive and accurate scientific recordkeeping. If you are this author and want this page removed, please let us know.
Publications (5)
July 2024
·
18 Reads
·
1 Citation
June 2024
·
8 Reads
·
2 Citations
April 2024
·
267 Reads
·
1 Citation
Code completion, which provides code suggestions by generating code snippets or structures, has become an essential feature of integrated development environments (IDEs). Recently, some studies have begun to use graph neural networks to complete AST-level code, and shown that it is promising to introduce GNNs into AST-level completion. However, these methods do not fully exploit the potential of reference codes with similar structures nor solve out-of-vocabulary (OOV). We propose Retrieval-Assisted Graph Code Completion (ReGCC) to enhance AST-level code completion further. ReGCC integrates a retrieval model that searches for similar code graphs to generate graph nodes and a completion model that leverages information from multiple domains. The key component of both the retrieval and completion models is the Multi-field Graph Attention Block, which consists of three layers of stacked attention: (1) Neighborhood Attention: preserves the heterogeneity and local dependency of the graph, enabling nodes to exchange information within their neighborhood. (2) Global & Memory Attention: addresses the long-distance dependency problem by providing nodes with a global view and the ability to extract information from the memory domain. (3) Reference Attention: lets nodes obtain valuable information from structurally similar reference code graphs. Furthermore, we tackle the OOV issue by employing feature matching and copying values from existing nodes. Specifically, we predict edges between nodes beyond the vocabulary, enabling effective information transfer. Experimental results demonstrate the superiority of our approach over state-of-the-art AST-level completion methods and generative language models.
December 2023
·
37 Reads
·
1 Citation
Computer Communications
The Internet of Things (IoT) is a revolutionary network of interconnected devices embedded with sensors and software that enables seamless communication, data sharing, and intelligent decision-making in the form of IoT services. To facilitate the efficient development of IoT services, code completion technique provides a promising solution by providing suggestions for missing code snippets. The development trend of IoT services is to support more mobile device terminals. Mobile devices are portable and easy to use, allowing IoT device operation and management anytime and anywhere. However, the current multi-token completion methods struggle to guarantee code generation quality under the constraints of low resources and low latency, making it difficult to fully support IoT service development. We propose a multi-token code completion framework, S2RCC, which completes code from skeleton to refinement with dual encoder and dual decoder. The framework consists of two phases: first, the code skeleton, which is the simplification of code containing structure-sensitive tokens, is predicted based on the semantics of the code context; second, the broken context is repaired with the predicted skeleton, and then parsed into the code structure so that the specific tokens can be generated combining the semantics and structure of context. Furthermore, we then provide an implementation of the framework, representing the repaired code as an improved Heterogeneous code graph and fusing the semantics and structure of code context by the three-layer stacked attention. We conducted experiments on multi-token completion datasets, showing that our model has achieved the state-of-the-art with the smallest possible scale and the fastest generation speed.
Citations (3)
... Drawing inspiration from RegGPT (Wang et al., 2024b), we observe that regulations are typically composed of six core elements: meta data (entity/property), constraint, condition, measure, scope, and external references. To facilitate more effective translation of regulatory rules into executable code by LLMs, we propose several refinements to this schema. ...
- Citing Conference Paper
July 2024
... Zhang et al. [405] construct line-level code graphs for code changes and test whether the homophily assumption holds on the constructed code graphs with nodes labeled as "defective" or "non-defective". Results reveal a nonuniform distribution with most code graphs showing strong homophily but some showing significant heterophily. ...
- Citing Conference Paper
June 2024
... A prompt is then generated combining the context and the retrieved results and fed to LLM to return a predicted statement. Another approach that also uses graph representation is presented in [30]. It integrates a retrieval model that searches for similar code graphs to generate graph nodes, and a completion model based on a Multi-field Graph Attention Block. ...
- Citing Conference Paper
- Full-text available
April 2024