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

A source code recommendation method for code reuse

A recommendation method and code reuse technology, applied in the field of source code recommendation oriented to code reuse, can solve the problems of long sequence information loss, inaccurate code, and little ability to fully obtain code structure information, etc., to achieve high practicability and correctness, The effect of saving development time

Active Publication Date: 2022-01-04
北京联创锐鑫信息技术有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, these models are rarely able to fully capture the structural information in the code, and there is a problem of information loss for long sequences. These problems make the recommended code not accurate enough to help developers very well.

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 source code recommendation method for code reuse
  • A source code recommendation method for code reuse
  • A source code recommendation method for code reuse

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.

[0049] The present invention provides a source code recommendation method oriented to code reuse, which is mainly used to help company programmers find example codes and related implementations according to software requirements specifications, including the following steps: source code preprocessing and verification; generating function summary; obtaining function Tag words; construct key-value pairs; generate question entries; query matching degree calculation; search result output. The flow chart of the method is as figure 1 shown, including the following steps:

[0050] 1. Source code preprocessing and verification

[0051] Before converting the function source code into an abstract syntax tree (AST), preprocessing the function source code is benef...

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 present invention provides a source code recommendation method oriented to code reuse, which is mainly used to help company programmers search for example codes and related implementations according to software requirements specifications, including the following steps: source code preprocessing and verification; generating function abstracts; obtaining function labels words; construct key-value pairs; generate question entries; query matching degree calculation; search result output; the code recommendation method newly proposed by the present invention has high practicability and correctness, and can effectively assist programmers to understand software requirement documents and realize functions, saving software development time.

Description

technical field [0001] The invention belongs to the technical field of software engineering, and in particular relates to a source code recommendation method oriented to code reuse. Background technique [0002] With the development of software technology, the number of users continues to increase and the user's demand for software functions continues to increase, which makes the scale of software development continue to increase. Developers often have to repeatedly write some functions during the software development process, and in many cases developers cannot understand the software needs documentation well. Developers use search engines and other methods to search other developers' codes as references to complete their own tasks, but the reference codes obtained from search engines do not match the codes they have written. Developers usually have to read their own code and modify the reference code to get the form they want. This consumes a lot of time and energy for de...

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/73G06F8/33G06F8/36
CPCG06F8/73G06F8/33G06F8/36
Inventor 文万志赵甜胡晨郑大顺胡逸涛朱星宇程实
Owner 北京联创锐鑫信息技术有限公司
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