Method for detecting code similarity based on semantic analysis of program source code
A technology of semantic analysis and detection method, applied in the field of repetitive code detection with similar semantics, can solve the problems of inability to realize large-scale program code similarity detection, high computational complexity, low detection accuracy, etc. The effect of narrowing the search space and improving the accuracy
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific Embodiment approach 1
[0030] Specific implementation mode 1. Combination Figure 1 to Figure 8 Illustrate this specific embodiment, a kind of code similarity detection method based on program source code semantic analysis, it is finished by the following steps:
[0031] Step 1. Respectively parse the two sections of source code to be detected into two control dependency trees of the system dependency graph;
[0032] Step 2. Perform basic code standardization respectively on the two control dependency trees obtained in step 1, and obtain two control dependency trees after standardization of the basic code;
[0033] Step 3, using the metric method to respectively extract the candidate similar code control dependency trees of the two basic code standardized control dependency trees obtained in step 2;
[0034] Step 4. Judging whether the candidate similar code control dependency tree is extracted, if the judgment result is yes, then perform step 5, if the result is no, then end the similarity detecti...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com