Compiled File Normalization for Reliable Source Code Comparison

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

It is challenging to reliably determine if a particular class file was derived from a specific piece of source code due to differences in compilers, which can result in non-matches when comparing class files despite them being compiled from the same source code.

Innovation Solution

A method involving a computing system that extracts non-compiler specific components from compiled files, rearranges them into a normalized order, and applies a hash function to ensure consistent comparison, removing compiler identification information and constant pool definitions to produce matching hash results across different compiler variations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If class files are compared directly to determine if they were compiled from the same source code, then the comparison process is simple, but the reliability of the comparison is poor due to compiler differences

Engineering Contradiction:
Improvecomparison reliabilityVSAvoidcomparison process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The class file is segmented into multiple components: compiler-specific information (removed), non-compiler-specific components (retained), and constant pool definitions (removed). This segmentation allows the system to isolate and compare only the relevant non-compiler-specific components, improving comparison reliability while managing complexity through structured processing

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts and removes compiler identification information and constant pool definitions from class files before comparison. By taking out these variable elements that differ between compilers, the system can reliably compare the underlying source code structure without being affected by compiler-specific variations

Inventive Principle:
Principle #2Taking out (Extraction)

2Measurement precision

If compiler identification information and constant pool definitions are removed from class files, then the comparison accuracy improves, but the processing time and computational resources increase

Engineering Contradiction:
Improvecomparison accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by pre-identifying and marking the locations of compiler identification information and constant pool definitions within class files. This preliminary structuring allows for efficient removal of these elements during the comparison process, improving accuracy while minimizing the time penalty through advance preparation

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system changes the parameter state of class files by transforming them from their original format to a normalized format with specific elements removed. This parameter change (removal of specific components) is performed systematically to improve comparison accuracy while the computational overhead is managed through efficient algorithms

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10409572B2Compiled file normalization
Publication Date: 2019.09.10 RED HAT INC
  • US10409572B2 patent drawing
  • US10409572B2 patent drawing
  • US10409572B2 patent drawing

AI summary

A method performed by a computing system includes, with the computing system, extracting non-compiler specific components from a first compiled file, the first compiled file being compiled from a piece of source code, and with the computing system, rearranging the extracted non-compiler specific components into a normalized order, the normalized order being used to consistently arrange a plurality of compiled files.