Code Matching Detection via Normalized Semantic Clustering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Manual detection of matching content in large volumes of source code files across various computer languages is impractical due to time consumption and varying syntax requirements, making it impossible to ensure plagiarism detection and code debugging efficiently.

Innovation Solution

A computer-implemented method and system that processes code files by generating hash codes, computing character counts, and identifying clusters based on percentage matches to automate the detection of matching content across different programming languages, enabling quick identification of 100% or pre-defined percentage matches.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual checking of source codes is performed, then detection accuracy can be maintained, but time consumption increases significantly and becomes impossible for large volumes

Engineering Contradiction:
Improvedetection accuracyVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent creates normalized copies of source code by removing whitespace, comments, and language-specific syntax elements while preserving the logical structure and semantic meaning. This allows automated comparison of code semantics without being affected by superficial syntactic differences, enabling both high accuracy and automated processing speed

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent transforms source code from its original syntactic form into a normalized parameter representation that captures semantic meaning. By changing the representation parameters (removing whitespace, comments, case sensitivity) while preserving logical structure, the system enables automated comparison that maintains detection accuracy across different programming languages and styles

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If a common tool is designed to check code files of any computer language, then versatility is improved, but device complexity increases due to varying syntax requirements

Engineering Contradiction:
Improvelanguage compatibilityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal code comparison tool that can handle multiple programming languages through a single normalized representation approach. By abstracting away language-specific syntax elements and focusing on universal programming constructs (variables, loops, conditionals, functions), the system achieves multi-language compatibility without requiring separate comparison algorithms for each language

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent applies parameter changes by transforming diverse code syntax into a unified normalized form. By removing language-specific syntactic parameters (whitespace conventions, comment styles, case sensitivity) and retaining semantic parameters (control structures, data flow, logical relationships), the system achieves language independence without increasing complexity

Inventive Principle:
Principle #35Parameter changes

3Productivity

If automated detection methods are implemented, then productivity is improved, but measurement precision may deteriorate due to difficulty in deciphering varying syntax requirements

Engineering Contradiction:
Improveassessment speedVSAvoidmatching detection accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent creates normalized copies that preserve the essential logical structure and semantic meaning of source code while removing superficial syntactic variations. This normalized representation enables automated algorithms to accurately compare code semantics across different languages and styles, maintaining high detection precision while achieving automated processing speeds

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent transforms code comparison from syntactic parameter matching to semantic parameter matching. By changing the parameters being compared from surface-level syntax (whitespace, comments, case) to deep-level semantics (control flow, data dependencies, logical structure), automated detection achieves both high speed and high accuracy

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10176186B2Systems and methods for detecting matching content in code files
Publication Date: 2019.01.08 TATA CONSULTANCY SERVICES LTD
  • US10176186B2 patent drawing
  • US10176186B2 patent drawing

AI summary

Methods systems for detecting of matching content in code files are provided. The method involves generating clusters of code files based on a degree of matching characters contained in each of the code files. A first cluster of code files is identified based on the code files having 100% matching hash codes and at least one second cluster is generated based on a character count generated for the code files that are not part of the first cluster and having a degree of match equal to or greater than a pre-determined percentage match. Such identified first cluster and at least one second cluster of code files are reported to have matching content based on the associated degree of match.