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

A code line recommendation method based on depth perception of programming scene 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: 2021-05-25
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF4 Cites 0 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 code line recommendation method based on depth perception of programming scene context
  • A code line recommendation method based on depth perception of programming scene context
  • A code line recommendation method based on depth perception of programming scene context

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0051]Firstly, the Java project acquired on the open source software platform GitHub is cut to obtain code segments with independent and complete functions, and write them into files. 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 step 2 above and the basic data type processing method given in Table 1, a code segment set S1 with a unified format is obtained.

[0055] Extract the class name, method name and comment information of each code segment in the code segment set S1, save them in the disk in the form of class name#method name comment information, and obtain the data set D1.

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

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 deep perception of programming site context, which utilizes the role of deep learning technology in programming language processing and its advantages in context implicit mode perception. Based on the existing massive source code data, deep learning is used to extract relevant contextual factors of code lines, mining hidden contextual information, and providing a basis for accurate recommendation. Use the existing source code data and task data on the programming site to predict the current code line, and recommend the most accurate N code lines sorted from high to low. This method can not only recommend code lines with high accuracy, but also has better automaticity, and does not need to manually input queries to realize automatic detection of existing code lines.

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 deep perception of programming site context. Background technique [0002] As people have increasingly rich functional requirements for software, the scale of software is getting larger and its structure is becoming more and more complex. Under such circumstances, program developers are likely to encounter some difficulties in software writing, such as how to realize some uncommon functions. At this point, if the developer has access to what is possible with the current line of code, it can be referenced, improved upon, or directly reused. This can save developers a lot of time and effort. In the process of software development, developers usually choose the codes required by search engine queries. But searching with a search engine usually requires an exact functional description, not a complete ...

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/33
CPCG06F8/33
Inventor 陶传奇包盼盼黄志球李伟湋张智轶周宇王铁鑫
Owner NANJING UNIV OF AERONAUTICS & ASTRONAUTICS