A method for recommend code lines base on depth perception of programming field context

A technology of depth perception and recommendation method, which is applied in the field of code recommendation without query, can solve problems such as lack of functions, and achieve the effect of improving accuracy

Active Publication Date: 2019-03-26
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF4 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But searching with a search engine usually requires an exact functional description, not a complete function for a single line of code

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 method for recommend code lines base on depth perception of programming field context
  • A method for recommend code lines base on depth perception of programming field context
  • A method for recommend code lines base on depth perception of programming field context

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0051]First, cut the Java project obtained on the open source software platform GitHub to obtain a code segment with independent and complete functions, and write it into a file. Taking the project ASTGeneration as an example, the form of a single code segment obtained after cutting is as follows:

[0052]

[0053]

[0054] After the source code is processed using the object processing method described in the above step 2 and the processing method of the basic data types given in Table 1, a code segment set S1 with a unified format is obtained.

[0055] The class name, method name and comment information of each code segment in the code segment set S1 are extracted, and stored in the disk in the form of class name#method name comment information, to obtain a data set D1.

[0056] Obtain each method block that has been processed and has the same format from the above code segment set S1, ignore the method declaration on its first line, start from line n+1, the previous n ...

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 a code line recommendation method based on context depth perception of programming field, which utilizes the function of depth learning technology in programming language processing and the advantages of depth learning technology in context hidden mode perception. Based on the existing massive source code data, the method uses depth learning to extract the relevant contextfactors of the code line, mining the implicit context information, to provide a basis for accurate recommendation. Uses the existing source code data and task data in the programming field to predictthe current code line, and recommend the most accurate, from high to low order of the N code lines. The method not only can recommend the code lines with high accuracy, but also has good automaticity,and does not need to input the query manually, so as to realize the automatic detection of the existing code lines above.

Description

technical field [0001] The invention belongs to the technical field of code recommendation without query, and in particular relates to a code line recommendation method based on depth perception of programming scene context. Background technique [0002] As people have increasingly rich functional requirements for software, the scale of software is getting bigger and bigger, and the structure is getting more and more complex. In such a case, program developers are likely to encounter some difficulties in writing software, such as how to implement some uncommon functions. At this point, if the developer can get the probabilities of the current line of code, it can be referenced, improved, or directly reused. This saves developers a lot of time and effort. In the process of software development, developers usually choose the code needed by the search engine query. But searching with a search engine often requires an exact functional description, not a complete function for ...

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
IPC IPC(8): G06F8/33
CPCG06F8/33
Inventor 陶传奇包盼盼黄志球李伟湋张智轶周宇王铁鑫
Owner NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products