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

Code cloning detection method and device and electronic equipment

A detection method and code technology, which is applied in software engineering design, electrical digital data processing, instruments, etc., can solve the problems that code clone detection cannot be realized and syntax may not be similar, and achieve the effect of accurate code clone detection and reduced feature loss

Active Publication Date: 2020-05-08
ZHEJIANG UNIV
View PDF11 Cites 8 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 cloning detection method and device and electronic equipment
  • Code cloning detection method and device and electronic equipment
  • Code cloning detection method and 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 invention discloses a code clone detection method. The method comprises the steps of 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 respectively; and inputting the code feature vectors corresponding to the source codes of the at least two versions into an integratedclassification model for clone detection to obtain a clone detection result. According to the code clone detection method, the respective feature information of the source codes is extracted and converted into the code feature vectors, clone detection is achieved through the integrated classification model on the basis of the code feature vectors, and therefore the feature loss of the source codesis reduced, and code clone detection achieved on the basis 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
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