Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

deGraphCS: Embedding Variable-based Flow Graph for Neural Code Search (2103.13020v3)

Published 24 Mar 2021 in cs.SE and cs.AI

Abstract: With the rapid increase in the amount of public code repositories, developers maintain a great desire to retrieve precise code snippets by using natural language. Despite existing deep learning based approaches(e.g., DeepCS and MMAN) have provided the end-to-end solutions (i.e., accepts natural language as queries and shows related code fragments retrieved directly from code corpus), the accuracy of code search in the large-scale repositories is still limited by the code representation (e.g., AST) and modeling (e.g., directly fusing the features in the attention stage). In this paper, we propose a novel learnable deep Graph for Code Search (calleddeGraphCS), to transfer source code into variable-based flow graphs based on the intermediate representation technique, which can model code semantics more precisely compared to process the code as text directly or use the syntactic tree representation. Furthermore, we propose a well-designed graph optimization mechanism to refine the code representation, and apply an improved gated graph neural network to model variable-based flow graphs. To evaluate the effectiveness of deGraphCS, we collect a large-scale dataset from GitHub containing 41,152 code snippets written in C language, and reproduce several typical deep code search methods for comparison. Besides, we design a qualitative user study to verify the practical value of our approach. The experimental results have shown that deGraphCS can achieve state-of-the-art performances, and accurately retrieve code snippets satisfying the needs of the users.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Chen Zeng (19 papers)
  2. Yue Yu (343 papers)
  3. Shanshan Li (54 papers)
  4. Xin Xia (171 papers)
  5. Zhiming Wang (82 papers)
  6. Mingyang Geng (7 papers)
  7. Bailin Xiao (1 paper)
  8. Wei Dong (106 papers)
  9. Xiangke Liao (17 papers)
Citations (32)

Summary

We haven't generated a summary for this paper yet.