Numeric Identifier Code Duplication Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies face challenges in efficiently indexing and storing vast amounts of Free and Open Source Code due to database footprint and searching performance issues, while analyzing source code is sensitive and may conflict with license conditions, and existing methods are not effective in comparing code snippets without retaining the original source code.

Innovation Solution

A system and method that convert source code into numeric identifiers, allowing comparison by generating a minimum set of consecutive line identifiers, which are compared against datasets, reducing storage needs and enabling fast searches through balanced indexes without requiring access to the original source code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If source code is stored in databases for comparison, then code duplication identification is enabled, but database footprint becomes excessively large and searching performance deteriorates

Engineering Contradiction:
Improvecode duplication identification accuracyVSAvoiddatabase footprint
Core Design Contradiction:
ReliabilityVSVolume of stationary object

Solution Approach 1:

The patent creates simplified copies of source code by generating numeric identifiers that represent the essential structure and semantics of the code without storing the actual source text. These numeric identifiers serve as compact representations that enable duplication detection while occupying minimal storage space compared to storing full source code files.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent transforms source code from its original text form into a different parameter representation - numeric identifiers generated through compilation and analysis processes. This parameter transformation maintains the ability to detect duplications while dramatically reducing the storage requirements, as numeric identifiers are much more compact than source code text.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If source code is analyzed and stored for comparison, then code matching capability is improved, but license compliance issues arise due to massive duplication of Free and Open Source code

Engineering Contradiction:
Improvecode matching accuracyVSAvoidlicense compliance violation
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent creates simplified copies of source code by generating numeric identifiers that represent the essential structure and semantics of the code without storing the actual source text. These numeric identifiers serve as compact representations that enable duplication detection while occupying minimal storage space compared to storing full source code files.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent extracts only the essential structural and semantic information from source code to create numeric identifiers, leaving out the actual source code text. This extraction approach enables code comparison functionality while avoiding the storage of copyrighted source code material, thereby addressing license compliance concerns.

Inventive Principle:
Principle #2Taking out (Extraction)

3Volume of stationary object

If source code is converted to numeric identifiers, then storage footprint is reduced, but code comparison complexity increases

Engineering Contradiction:
Improvestorage footprintVSAvoidcode comparison system complexity
Core Design Contradiction:
Volume of stationary objectVSDevice complexity

Solution Approach 1:

The patent performs preliminary actions by pre-compiling source code into numeric identifiers and pre-processing the code structure analysis before comparison is needed. This preliminary transformation simplifies the actual comparison operation, as numeric identifiers can be compared more efficiently than raw source code text, despite the initial complexity of the conversion process.

Inventive Principle:
Principle #10Preliminary action

4Measurement precision

If full source code is retained for comparison, then accurate code matching is achieved, but processing time increases

Engineering Contradiction:
Improvecode matching precisionVSAvoidsearching and processing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent transforms source code from its original text form into a different parameter representation - numeric identifiers generated through compilation and analysis processes. This parameter transformation maintains the ability to detect duplications while dramatically reducing the storage requirements, as numeric identifiers are much more compact than source code text.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3629206B1Code duplicate identification method for converting source code into numeric identifiers and comparison against large data sets
Publication Date: 2023.07.26 SNYK SWEDEN AB
  • EP3629206B1 patent drawingFigure 1
  • EP3629206B1 patent drawingFigure 2
  • EP3629206B1 patent drawingFigure 3

AI summary

Systems and methods for identifying a characteristic of an input code by converting the input code into simplified code and using the simplified code to generate snippets that can be compared to code in a database. Preferably, code is simplified by at least one of: unifying of capitalization, removing characters, and replacing at least one of a character and a keyword with an identifier.