Unlock instant, AI-driven research and patent intelligence for your innovation.

LSTM-based non API function actual parameter recommendation method

A technology of API functions and recommendation methods, applied in the fields of code completion and code recommendation, can solve problems such as poor recommendation effect

Inactive Publication Date: 2018-03-23
BEIJING INSTITUTE OF TECHNOLOGYGY
View PDF1 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The purpose of the present invention is to propose a non-API function actual parameter recommendation method based on LSTM for the current situation that the non-API function parameter recommendation effect is poor in the existing parameter recommendation method

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • LSTM-based non API function actual parameter recommendation method
  • LSTM-based non API function actual parameter recommendation method
  • LSTM-based non API function actual parameter recommendation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] This embodiment elaborates in detail the method and effect of the LSTM-based non-API function calling method of the present invention when it is implemented in 85 open source projects

[0043] Under the hardware environment shown in Table 1, we train and predict on the open source software shown in Table 2.

[0044] Table 1: Hardware environment configuration information table

[0045]

[0046] Table 2: Basic information table of open source software

[0047]

[0048] Step A: Extract the actual parameters and context information of non-API function calls from the open source software shown in Table 2, and use the 10-fold cross-validation method to generate a training set and a test set of data;

[0049] Among them, 10-fold cross-validation means that the data is randomly divided into 10 groups of equal quantity, and then cross-validation is performed on each group of data; for the i-th group of data G i When performing cross-validation, G i As a test set, the o...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an LSTM-based non API function actual parameter recommendation method, and belongs to the technical field of code completion and code recommendation. The method comprises the steps of firstly extracting an actual parameter and context information of non API function call from open source software; and secondly converting a context into a paragraph vector to be input to an LSTM neural network, converting the actual parameter into a paragraph vector for training the neural network as an expected output, and after training, obtaining a neural network model. When a user performs new function call, the method automatically extracts the context information of the function call and converts the context into the vector to be input to the trained neural network model; and anoutput result of the model is the actual parameter used for the current function call and recommended by the method. Compared with existing recommendation methods based on similarity, k-neighborhoodand locality characteristics, the number of actual parameters correctly recommended under the same data set and the number of actual parameters which can be recommended in the LSTM-based method are greater than those in the existing methods.

Description

technical field [0001] The invention relates to an LSTM-based non-API function actual parameter recommendation method, which belongs to the technical field of code completion and code recommendation. Background technique [0002] Code completion refers to the function of IDE to automatically predict the remaining code when the programmer types some characters. Code completion can improve coding efficiency if it correctly predicts what the user is about to type. Code completion technology is widely used, and it is one of the 10 most frequently used commands by programmers in Eclipse software. [0003] Argument recommendation when calling a function is a special kind of code recommendation. When a programmer makes a function call, the IDE tool will automatically check the optional parameters and recommend the most likely parameter or parameter list for the programmer. However, most mainstream IDEs tools recommend parameters according to the types of candidate actual paramet...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/33G06N3/04G06N3/08
CPCG06F8/33G06N3/08G06N3/044
Inventor 李光杰刘文美刘辉
Owner BEIJING INSTITUTE OF TECHNOLOGYGY