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

Code clone detection method, device and electronic equipment

A detection method and code technology, applied in software engineering design, electrical digital data processing, instruments, etc., can solve the problems of inability to detect code clones, and the syntax may not be similar, so as to achieve accurate code clone detection and reduce feature loss.

Active Publication Date: 2022-01-21
ZHEJIANG UNIV
View PDF11 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Although the code clone detection tools provided above are more practical, they can only detect code clones by detecting similarities at the text, markup, and tree (syntax) levels. For codes with similar semantics but not necessarily similar syntax, semantic-level code clones cannot be achieved. detection, there are large 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
  • Code clone detection method, device and electronic equipment
  • Code clone detection method, device and electronic equipment
  • Code clone detection method, device and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0056] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the application. However, the present application can be implemented in many other ways different from those described here, and those skilled in the art can make similar promotions without violating the connotation of the present application. Therefore, the present application is not limited by the specific implementation disclosed below.

[0057] The present application provides a method for detecting code cloning, and the present application also provides a device for detecting code cloning, and an electronic device. The following describes in detail one by one with reference to the drawings of the embodiments provided in the present application, and describes each step of the method.

[0058] An embodiment of a code clone detection method provided by this application is as follows:

[0059] Refer to attached figure 1, which shows a processing flowc...

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 application discloses a code clone detection method, comprising: obtaining a source code set composed of source codes of at least two versions; converting the source codes of the at least two versions into corresponding code feature vectors; The code feature vectors corresponding to the source codes of the two versions are input into the integrated classification model for clone detection, and the clone detection results are obtained. The code clone detection method converts it into a code feature vector by extracting the respective feature information of the source code, and uses an integrated classification model to realize clone detection on the basis of the code feature vector, thereby reducing the feature loss of the source code. The code clone detection implemented on the above is more accurate and more effective.

Description

technical field [0001] The present application relates to the technical field of software cloning, in particular to a method for detecting code cloning. The present application also relates to a code clone detection device and an electronic device. Background technique [0002] With the increasing scale and complexity of software systems, the work of software development is becoming more and more arduous. In the process of software development, software developers often refer to existing codes to achieve similar functions, or directly "reuse" by copying and pasting. "Existing code, generate many semantically and functionally similar codes, this is code cloning. Although this way of reusing code can improve software development efficiency to some extent, code cloning leads to the proliferation of software bugs (vulnerabilities), and also makes software maintenance more difficult, and even triggers the risk of license violations; therefore, Code clone detection also becomes ...

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/75
CPCG06F8/751
Inventor 傅珉杨昕立鄢萌李元平章修琳吴芮杨小虎
Owner ZHEJIANG UNIV
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