Code Similarity Detection via Commit Version Analysis
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
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
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
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
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
Data Source
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.


