Code Similarity Detection via Commit Version Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for determining code similarity between open source projects, particularly on platforms like GitHub, face challenges in accurately identifying fork times and detecting plagiarism, especially when significant changes occur in project codes over time, leading to inaccurate similarity measurements.

Innovation Solution

A method involving a similarity calculation unit to detect similarities between commits of two projects, a Fork determination unit to identify the highest similarity and determine the fork time based on update times, and a process to detect plagiarism by analyzing commit pairs and their update times, allowing for accurate replication and plagiarism detection across different versions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If general similarity measurement technique is used to compare released codes, then the measurement process is simple, but the similarity measurement accuracy deteriorates when codes are significantly changed through active development

Engineering Contradiction:
Improvesimplicity of similarity measurement processVSAvoidaccuracy of similarity measurement
Core Design Contradiction:
Ease of manufactureVSMeasurement precision

Solution Approach 1:

The patent segments the code comparison process into multiple versions/timestamps, comparing not just the final released code but intermediate versions as well. This allows detection of plagiarism even when the final code has been significantly modified, as the segmentation preserves historical code states for accurate comparison

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by collecting and storing code at multiple timestamps during the development process, before final release. This preliminary collection of versioned code enables accurate later comparison to detect plagiarism that would be invisible in final released code alone

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If only released code is used for similarity evaluation, then the evaluation process is straightforward, but the ability to detect plagiarism deteriorates when codes are significantly changed

Engineering Contradiction:
Improvestraightforwardness of evaluation processVSAvoidreliability of plagiarism detection
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent adds a temporal dimension to code comparison by introducing timestamps and version history. Instead of comparing only the final state of code (one dimension), the system compares code across multiple time points, adding the time dimension to reliably detect plagiarism even when final codes appear different

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Adaptability or versatility

If Fork function is not used and project code is uploaded directly, then the process bypasses platform functions, but the ability to track original source deteriorates

Engineering Contradiction:
Improveflexibility in project upload processVSAvoidloss of original source information
Core Design Contradiction:
Adaptability or versatilityVSLoss of information

Solution Approach 1:

The patent implements feedback by systematically collecting and storing code at multiple timestamps during the upload and development process. This feedback loop of continuous code capture and versioning ensures that even when Fork function is bypassed, the original source information is preserved through timestamped code collections that enable later plagiarism detection

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20220164742A1Method for determining code similarity of an open source project and a computer-readable medium storing a program thereof
Publication Date: 2022.05.26 RES & BUSINESS FOUND SUNGKYUNKWAN UNIV
  • US20220164742A1 patent drawing
  • US20220164742A1 patent drawing
  • US20220164742A1 patent drawing

AI summary

Provided is a method for determining a code similarity of an open source project, which includes: a similarity detecting step of detecting, by a similarity calculation unit, similarities between A commits generated every update of a first project and B commits generated every update of a second project; a highest similarity determining step of detecting, by a Fork determination unit, a highest similarity between the A commits and the B commits and a similar commit pair representing the highest similarity; and a Fork determining step of determining, by the Fork determination unit, a Fork time based on an update time of the similar commit pair when the highest similarity is equal to or more than a predetermined threshold.