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

Cloning consistency change prediction method and system based on hierarchical neural network

A neural network and prediction method technology, which is applied in the field of clonal consistency change prediction based on hierarchical neural network, can solve the problem that the code syntax and semantic features cannot be accurately and completely preserved, and achieve the effect of complete semantic features.

Pending Publication Date: 2021-08-06
GUANGDONG UNIV OF TECH
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to solve the technical defect that the grammatical and semantic features of the code cannot be accurately and completely preserved, the present invention provides a method and system for predicting changes in clone consistency based on hierarchical neural networks

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
  • Cloning consistency change prediction method and system based on hierarchical neural network
  • Cloning consistency change prediction method and system based on hierarchical neural network
  • Cloning consistency change prediction method and system based on hierarchical neural network

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] Such as figure 1 As shown, a method for predicting changes in clonal consistency based on hierarchical neural networks includes the following steps:

[0036] S1: The preprocessing module preprocesses the code fragment data, converts the code fragment into an abstract syntax tree form, and uses word2vec to encode the nodes on the syntax tree to obtain the code fragment;

[0037] S2: The code fragment feature extraction neural network module establishes a code fragment feature extraction neural network to extract the feature information of the code fragment;

[0038] S3: The clone group feature extraction neural network module establishes the clone group feature extraction neural network, fuses the feature information of the code fragments, and extracts the feature information of the clone group;

[0039] S4: The clone evolution feature extraction neural network module establishes the clone evolution feature extraction neural network, fuses the feature information of the...

Embodiment 2

[0047] Such as figure 2 As shown, a clone consistency change prediction system based on hierarchical neural network, including a preprocessing module, a code fragment feature extraction neural network module, a clone group feature extraction neural network module, a clone evolution feature extraction neural network module and an evaluation module;

[0048]The output end of the preprocessing module is electrically connected to the input end of the code fragment feature extraction neural network module, the output end of the code fragment feature extraction neural network module is connected to the input end of the clone group feature extraction neural network module Electrically connected, the output end of the clone group feature extraction neural network module is electrically connected to the input end of the clone evolution feature extraction neural network module, the output end of the clone evolution feature extraction neural network module is connected to the evaluation ...

Embodiment 3

[0054] Such as Figure 3 ~ Figure 6 as shown, image 3 The framework of clonal consistency change prediction process based on hierarchical neural network is shown, mainly including clonal family collection, code fragment coding, clonal group coding, clonal evolution coding, CHANN model, model training and prediction. Each process is described in detail below.

[0055] Figure 4 One of the examples showing the change of clone consistency from old to new version. The two pieces of cloning code have undergone consistent changes during the process of cloning evolution, namely deletion operation (black lined part) and insertion operation (black bold code part).

[0056] Figure 5 It shows the encoder-ASTNN model framework of this invention for the single code level in the process of cloning evolution. The input of the ASTNN network model is the word2vec code converted into the abstract syntax tree node in the preprocessing stage, and the output is the feature information of a ...

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 cloning consistency change prediction method and system based on a hierarchical neural network, and the method comprises the following steps that: a preprocessing module carries out the preprocessing of code snippet data, converts a code snippet into an abstract syntax tree form, and carries out the coding of nodes on the syntax tree through word2vec, and obtains a coding snippet; a code snippet feature extraction neural network module establishes a code snippet feature extraction neural network and extracts feature information of code snippets; a clone group feature extraction neural network module establishes a clone group feature extraction neural network, fuses the feature information of the code snippets and extracts the feature information of clone groups; a clone evolution feature extraction neural network module establishes a clone evolution feature extraction neural network, fuses feature information of a clone group and extracts feature information of clone evolution; and an evaluation module evaluates the clone evolution feature information by using a ten-fold cross validation method, and outputs the accuracy rate, the recall rate and the F1 value of a prediction result.

Description

technical field [0001] The present invention relates to the field of clone code analysis, and more specifically, to a method and system for predicting changes in clone consistency based on a layered neural network. Background technique [0002] In the traditional machine learning method for predicting changes in clone consistency, cumbersome manual feature extraction steps are required for the code, and feature values ​​outside the specified range of artificial features cannot be extracted, so the syntax and syntax of the code cannot be accurately and completely preserved. semantic features. Moreover, in the traditional machine learning method for predicting changes in clone consistency, many parameters need to be adjusted and set for the model, and the operation speed is relatively slow. [0003] In the existing technology, the Chinese utility model patent CN112215013A discloses "a method for semantic detection of cloned codes based on deep learning". , and then perform w...

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/41G06F11/36G06N3/04G06N3/08
CPCG06F8/42G06F8/436G06F11/3608G06N3/08G06N3/044G06N3/045
Inventor 张凡龙陈宇琛车毅
Owner GUANGDONG UNIV OF TECH
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