Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Highly accurate code snippet recommendation method

A code snippet and recommendation method technology, applied in the field of open source code snippet recommendation, can solve the problems of single use feature, unfiltered recommendation results, and low recommendation accuracy, and achieve the effect of good recommendation accuracy

Active Publication Date: 2018-10-30
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF5 Cites 24 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present invention overcomes the deficiencies in the prior art, and the technical problem to be solved is: to provide a highly accurate method for recommending code fragments, which makes up for the fact that the existing methods have single features and the recommendation results are not filtered, resulting in low recommendation accuracy Defects

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
  • Highly accurate code snippet recommendation method
  • Highly accurate code snippet recommendation method
  • Highly accurate code snippet recommendation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, rather than all embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work, all belong to the protection scope of the present invention .

[0029] figure 1 A flowchart of a method for recommending code fragments with high accuracy provided by Embodiment 1 of the present invention, as shown in figure 1 As shown, a code snippet recommendation method with high accuracy may include:

[0030] Divide and divide all the projects in the project library to generate corresponding class...

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 provides a highly accurate code snippet recommendation method. The method comprises the steps of splitting and dividing a project, and generating class files, a code snippet , a code snippet method body and a code snippet note; generating a code snippet method body vector and a code snippet note vector based on the code snippet method body and the code snippet note; compiling and decompiling each class file, and extracting an instruction sequence of the code snippet from the decompiled file; generating an inquiry vector based on an inquiry input by a user, and screening out a group of primary recommendation results with highest text similarity according to a text similarity of the inquiry vector and a code snippet text characteristic; and according to statement similarity ofall code snippet s in the primary recommendation results, screening the primary recommendation results for the second time and then re-ranking so as to form a final recommendation result. The method overcomes the defect that the existing method is low in recommendation accuracy due to unique use characteristic and failure in filtering of recommendation results. The method is applicable to the field of recommendation of open source code snippets.

Description

technical field [0001] The invention belongs to the technical field of open source code segment recommendation, and in particular relates to a highly accurate code segment recommendation method. Background technique [0002] A code fragment refers to an ordered collection of a set of codes that can complete a certain function. When developers face unfamiliar development tasks or need to use unfamiliar API interfaces, code snippets are a good reference tool. Developers can learn function implementation methods or API usage patterns, and even directly modify existing code fragments to complete related development tasks. With the development of computer technology and software industry, there are more and more open source projects on the Internet. These open source projects are published on the hosting platforms of some open source software projects. Developers can find the parts they are really interested in by searching for the open source projects they need on these platfo...

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): G06F17/30G06F17/27
CPCG06F40/30
Inventor 黄志球艾磊李伟湋周宇尹小花张静
Owner NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products