EUVIMEDEUVIMED entdecken
Crossref

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

Chen Zeng, Yue Yu, Shanshan Li, Xin Xia, Zhiming Wang, Mingyang Geng, Linxiao Bai, Wei Dong, Xiangke Liao

ACM Transactions on Software Engineering and Methodology · 30.04.2023 · 32 (2) · 1-27

DOI: 10.1145/3546066 ↗

Kurz gefasst

Fachartikel in der Zeitschrift ACM Transactions on Software Engineering and Methodology, online erschienen am 30.03.2023. Verfasst von Chen Zeng und 8 weiteren Autor:innen. Die Arbeit wurde bisher 53-mal zitiert (Crossref) und nennt 71 Literaturangaben. Gefördert von: National Key R&D Program of China, National Natural Science Foundation of China.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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 de ep G raph for C ode S earch (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.

Förderung

  • National Key R&D Program of China
  • National Natural Science Foundation of China

Zitieren

APA

Zeng, C., Yu, Y., Li, S., Xia, X., Wang, Z., Geng, M., Bai, L., Dong, W., & Liao, X. (2023). deGraphCS : Embedding Variable-based Flow Graph for Neural Code Search. ACM Transactions on Software Engineering and Methodology, 32(2), 1-27. https://doi.org/10.1145/3546066

Vancouver

Zeng C, Yu Y, Li S, Xia X, Wang Z, Geng M, et al. deGraphCS : Embedding Variable-based Flow Graph for Neural Code Search. ACM Transactions on Software Engineering and Methodology. 2023;32(2):1-27. doi:10.1145/3546066

BibTeX
@article{Zeng2023,
  author = {Zeng, Chen and Yu, Yue and Li, Shanshan and Xia, Xin and Wang, Zhiming and Geng, Mingyang and Bai, Linxiao and Dong, Wei and Liao, Xiangke},
  title = {deGraphCS : Embedding Variable-based Flow Graph for Neural Code Search},
  journal = {ACM Transactions on Software Engineering and Methodology},
  year = {2023},
  volume = {32},
  number = {2},
  pages = {1--27},
  doi = {10.1145/3546066}
}
Kostenlos starten →