Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Code clone detection method and device based on event embedding tree and GAT network

A detection method and event technology, applied in the direction of neural learning method, biological neural network model, software engineering design, etc., can solve the problems of insufficient detection and insufficient accuracy, and achieve the effect of comprehensive and accurate judgment results.

Active Publication Date: 2020-08-21
HAINAN UNIVERSITY
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The core idea of ​​the traditional code clone detection method is to extract a certain type of information in the code fragment through artificial definition, and then use this type of information to judge the code clone, but the detection method of this code clone detection method is not comprehensive enough , is not accurate enough

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 clone detection method and device based on event embedding tree and GAT network
  • Code clone detection method and device based on event embedding tree and GAT network
  • Code clone detection method and device based on event embedding tree and GAT network

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0056] Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present specification as recited in the appended claims.

[0057] The terms used in this specification are for the purpose of describing particular embodiments only, and are not intended to limit the specification. As used in this specification and the appended claims, the singular forms "a", "the", and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the t...

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 relates to a code cloning detection method and device based on an event embedding tree and a GAT network. The code cloning detection method based on the event embedding tree and the GATnetwork includes: converting a source code into a flow chart corresponding to the source code, and describing the flow chart by using a self-defined IR intermediate representation text; carrying out event embedding calculation on the statement of each node in the IR through an event embedding layer (Event Embeddinhg) to obtain a node vector matrix (Node Vector Matrix); adjusting and fusing an event embedding vector of each node of the node vector matrix through a GAT attention network, so as to enabling the event embedding vector to sense event embedding semantics of context nodes, and obtaining a node context matrix (Node Context Vector Matrix); performing convolution calculation on each node in the node context matrix by using a convolution layer so as to extract final vector representation of the program flow chart; using the vector representation to determine whether the two code snippets are a cloned code pair by a classifier (classifier).

Description

technical field [0001] The invention relates to the technical field of software code analysis, in particular to a code clone detection method and device based on an event embedding tree and a GAT network. Background technique [0002] If a code segment in the source program of a software is similar in structure or semantics to another code segment in the same program, these code segments become code clones. The existence of code clones increases the difficulty of software maintenance. If the source program The parts that are modified in have cloned code segments, and these cloned code segments also often need to be modified. [0003] Code clone detection often plays an important role in software engineering tasks. For example, in the scenarios of program understanding, plagiarism detection, copyright protection, code compression, software evolution analysis, code quality analysis, bug detection and virus detection, it may be necessary to distinguish codes with textual simil...

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/75G06N3/04G06N3/08
CPCG06F8/751G06N3/084G06N3/045Y02D10/00
Inventor 李秉卓叶春杨管守扬周辉
Owner HAINAN UNIVERSITY
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
Eureka Blog
Learn More
PatSnap group products