Method and system for analyzing source code similarity and electronic equipment
A source code and similarity technology, which is applied in the field of analyzing source code similarity, can solve the problems that the development team is difficult to identify the code of similar logic, the impact, the increase of code size and complexity, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0033] Such as figure 1 As shown, a method for analyzing source code similarity in the embodiment of the present invention includes the following steps:
[0034] S1. Generate an abstract syntax tree in JSON format according to the program source code;
[0035] S2. Map the abstract syntax tree into a space vector according to the vocabulary in the abstract syntax tree;
[0036] S3. According to the cosine similarity calculation method and the space vector, calculate the cosine similarity used to represent the source code similarity.
[0037] First, generate an abstract syntax tree in JSON format according to the program source code, then map the abstract syntax tree into a space vector according to the vocabulary in the abstract syntax tree, and finally, according to the cosine similarity calculation method and the space vector, calculate the representation The cosine similarity of source code similarity can assist the development team to identify source code with repeated or...
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