Systems and methods for detecting code duplication in codebases
US12159127B2 · kind B2 · utility
Assignee
Inventors
Key dates
| Filing date | Dec 12, 2022 |
| Grant date | Dec 3, 2024 |
| Priority date | — |
| Expiry date | Dec 29, 2042 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F8/427
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
Abstract
Systems and methods for detecting code duplication are disclosed. In one embodiment, a method for detecting exact code snippet duplicates may include: (1) representing, by a code duplication detection computer program, each of a plurality of code snippets in a codebase as an abstract syntax trees; (2) featurizing, by the code duplication detection computer program, the abstract syntax trees into corpus feature vectors by converting the abstract syntax tree into vector representations; (3) generating, by the code duplication detection computer program, dense feature vectors from the corpus feature vectors using a dimension reduction technique; (4) identifying, by the code duplication detection computer program, exact duplicate code snippet matches by apply density-based clustering to the dense feature vectors; and (5) tagging, by the code duplication detection computer program, the exact duplicate code snippets.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.