Numeric Identifier Code Duplication Detection
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
3Volume of stationary object
If source code is converted to numeric identifiers, then storage footprint is reduced, but code comparison complexity increases
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.
4Measurement precision
If full source code is retained for comparison, then accurate code matching is achieved, but processing time increases
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.
Data Source
Figure 1
Figure 2
Figure 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.