Code search recommendation device and method based on open source knowledge

A code and code fragment technology, applied in the field of software engineering, can solve the problems of not fully considering the characteristics and characteristics of the code, not making full use of the user's query intent, and a single code measurement angle, so as to achieve expanded dimensions, complete code measurement, and improved accuracy sexual effect

Active Publication Date: 2020-12-08
XIDIAN UNIV
View PDF9 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The purpose of the present invention is to provide a code search recommendation device and method based on open source knowledge to solve the problem that the existing technology does not fully consider the characteristics and characteristics of the code itself, resulting in the lack of code measurement depth, A large amount of code knowledge in the open source community is discarded, resulting in the problem that the generated constraints are not comprehensive enough, the code measurement angle is single, and the user's query intention and other knowledge are not fully utilized in the search process.

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
  • Code search recommendation device and method based on open source knowledge
  • Code search recommendation device and method based on open source knowledge
  • Code search recommendation device and method based on open source knowledge

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] The present invention will be further described below in conjunction with the accompanying drawings.

[0052] Refer to attached figure 1 , to further describe the structure of the device of the present invention.

[0053] The device of the present invention includes four modules: a code segment generation module, a code feature extraction module, a text preprocessing module and a code search module.

[0054] The code fragment generation module is used to segment codes of at least 100,000 open source projects according to the attributes of the code itself in each project, and obtain at least 1.5 million code fragments to form a code fragment library.

[0055] The code feature extraction module is used to represent all text information in each code segment in a tree form by using the abstract syntax tree AST, each node on the tree represents a feature type in the code segment, and each All the text features of a code fragment, and all the text features of all code fragm...

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 search recommendation device and method based on open source knowledge. The device comprises a code snippet generation module, a code feature extraction module, a text preprocessing module and a code search module. The method comprises the steps of generating a code snippet library; extracting text features of the code snippets; generating code fragment theme features; generating structural features of the code snippets; generating code snippet development features; establishing a search index; preprocessing the query statement text; calculating the similarity between code features and query statements; completing recommendations from comprehensive scores. According to the method, a code feature measurement system is constructed by utilizing open source knowledge, code snippet features are extracted from multiple angles, comprehensive scores of code snippets are obtained by utilizing similarity calculation and weighting calculation modes, code search recommendation is completed, the code measurement angle is perfected, and the accuracy of code search recommendation is improved.

Description

technical field [0001] The invention belongs to the technical field of software engineering, and further relates to a code search and recommendation device and method based on open source knowledge in the technical fields of intelligent software research and development, artificial intelligence, and data mining. The present invention is suitable for the engineering development task of efficiently developing high-quality software, completes the analysis and application of knowledge in massive open source communities, realizes accurate measurement of code fragments, precise search, and improves the accuracy of code search and recommendation results. Background technique [0002] As the scale of software becomes larger and its functions more complex, the software code itself becomes larger, more complex, and full of variability. At the same time, the characteristics of continuous construction and growth of contemporary software also urgently require developers to efficiently co...

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): G06F8/20G06F16/31G06F16/33G06F40/289G06F40/30G06K9/62G06F16/951
CPCG06F8/20G06F16/316G06F16/3335G06F40/289G06F40/30G06F16/951G06F18/22
Inventor 王璐李青山曹壮罗文龙吕文琪李昊张河
Owner XIDIAN UNIV
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