1. Code recommendation based on joint embedded attention network.
- Author
-
Wen, Wanzhi, Zhao, Tian, Wang, Shiqiang, Chu, Jiawei, and Kumar Jain, Deepak
- Subjects
- *
LINEAR network coding , *NATURAL languages , *MACHINE learning , *INFORMATION retrieval , *PROBLEM solving - Abstract
Due to the heterogeneity of program language and natural language query, it is difficult to identify the semantic relationship between them, which leads to the low efficiency of code recommendation. In order to solve the problems of the above code recommendation technology, a code recommendation method based on joint embedded attention network (JEAN) is proposed in this paper. The method uses GRU Network to embed code snippets and describe queries into vector representation, which solves the problem of heterogeneous code snippets and natural language queries. The Attention mechanism is then used to distribute totally different weights to different components of every mode of the code snippet. The reason for the Attention mechanism is that different components of every mode of the code snippet contribute differently to the semantic vector of the final code snippet, making it interpretable. Finally, two commonly used evaluation indexes of information retrieval, SuccessRate@k and MRR, are used for experimental comparison with other baseline models. The experimental results show that the code recommendation method based on joint embedded attention network proposed in this paper can effectively recommend appropriate code snippets according to the needs of developers, and its performance is better than other baseline methods. [ABSTRACT FROM AUTHOR]
- Published
- 2022
- Full Text
- View/download PDF