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

A LSTM-based method for recommending non-api function arguments

A technology of API function and recommendation method, which is applied in the field of code completion and code recommendation, and can solve problems such as poor recommendation effect

Inactive Publication Date: 2018-11-27
BEIJING INSTITUTE OF TECHNOLOGYGY
View PDF1 Cites 0 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
  • A LSTM-based method for recommending non-api function arguments
  • A LSTM-based method for recommending non-api function arguments
  • A LSTM-based method for recommending non-api function arguments

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

An LSTM-based non-API function actual parameter recommendation method belongs to the technical field of code completion and code recommendation. This method first extracts the actual parameters and context information of non-API function calls from open source software, then converts the context into paragraph vectors and inputs them to the LSTM neural network, and converts the actual parameters into paragraph vectors as the expected output to train the neural network. After training, a neural network model. When the user makes a new function call, this method automatically extracts the context information of the function call and converts it into a vector input to the trained neural network model. The output of the model is the actual parameter recommended by this method for this function call. Compared with the existing similarity-based, k-nearest neighbor-based and locality-based recommendation methods, the number of real parameters correctly recommended by this method and the number of real parameters that can be recommended under the same data set are higher than 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 Patents(China)
IPC IPC(8): G06F8/33G06N3/04G06N3/08
CPCG06F8/33G06N3/08G06N3/044
Inventor 李光杰刘文美刘辉
Owner BEIJING INSTITUTE OF TECHNOLOGYGY