Code snippet recommendation method and device based on deep neural network
A deep neural network and recommendation method technology, applied in the field of code recommendation, can solve the problems of inaccurate recommendation results, loss of structural information and sequence information, different execution sequence results and functions, etc., to achieve high similarity, easy to use, and avoid interference. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0034] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0035] A code recommendation method based on a deep neural network disclosed in an embodiment of the present invention first extracts code elements (including method names, parameters and return values, logic information, and code statement sequences) from the collected code fragments, and extracts code elements from the annotation documents Extract the first line as the description information, and embed the code elements and description information together into the vector space for model training; then, for a given code base from which the user wants to search code snippets, extract the code elements of each method in it, using the passed The trained model calculates the code vector; when the user query arrives, the vector representation of the query is calculated, and the corresponding code fragment of the vector close to the query vector is...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


