arrow
返回

DEGraphCS: Embedding Variable-based Flow Graph for Neural Code Search

delete2023-03-30
delete18
PRE
AI
C
Chen Zeng
余月 封面图
余月 (Yue Yu)
S
Shanshan Li *
X
Xin Xia
Z
Zhiming Wang
L
Linxiao Bai
W
Wei Dong
X
Xiangke Liao
DOI:10.1145/3546066delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
With the rapid increase of public code repositories, developers maintain a great desire to retrieve precise code snippets by using natural language. Despite existing deep learning-based approaches that provide end-to-end solutions (i.e., accept natural language as queries and show related code fragments), the performance of code search in the large-scale repositories is still low in accuracy because of the code representation (e.g., AST) and modeling (e.g., directly fusing features in the attention stage). In this paper, we propose a novel learnable deep Graph for Code Search (called deGraphCS) to transfer source code into variable-based flow graphs based on an intermediate representation technique, which can model code semantics more precisely than directly processing the code as text or using the syntax tree representation. Furthermore, we propose a 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 the C language and reproduce several typical deep code search methods for comparison. The experimental results show that deGraphCS can achieve state-of-the-art performance and accurately retrieve code snippets satisfying the needs of the users.
Keyword:
Intermediate representation
graph neural networks
code search
deep learning

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

N
national university of defense technology - china
学者数:
1.8W
论文数: 1.4W
被引数: 9
Z
zhejiang university
学者数:
17.7W
论文数: 12.1W
被引数: 152
引用论文

引用论文

err
IF0
err
err0
errOAAI
err
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Neuroscience research in Africa: Current status
err2016-06-01
err0
errOAAI
errFoad Abd-Allah; Najib Kissani; Anthony William; Mohammed Ibrahim Oraby; Ramez Reda Moustafa; Ehab Shaker; Mohamed Soliman El-Tamawy; Raad Shakir
err分享
err收藏
Unusual Photoisomerization Pathway in a Near-Infrared Light Absorbing Enzymerhodopsin
err2022-10-06
err0
PREAI
errMasahiro Sugiura; Kazuki Ishikawa; Kota Katayama; Yuji Sumii; Rei Abe-Yoshizumi; Satoshi P. Tsunoda; Yuji Furutani; Norio Shibata; Leonid S. Brown; Hideki Kandori
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Management of the radial composite donor site: an orthopaedic opinion
err1999-06-01
err0
PREAI
errA.J. Sidebottom; P.E. Allen; M. Hayton; E.D. Vaughan; J.S. Brown
err分享
err收藏
A test-driven approach to code search and its application to the reuse of auxiliary functionality
err2011-04-01
err35
errOAAI
errLazzarini Lemos, Otavio Augusto; Bajracharya, Sushil; Ossher, Joel; Masiero, Paulo Cesar; Lopes, Cristina
err分享
err收藏
Comparison of short-term heart rate variability indexes evaluated through electrocardiographic and continuous blood pressure monitoring
err2019-02-07
err0
PREAI
errRiccardo Pernice; Michal Javorka; Jana Krohova; Barbora Czippelova; Zuzana Turianikova; Alessandro Busacca; Luca Faes
err分享
err收藏
学者 查看更多内容