IP Library Granted Patent US 12,367,033
Granted Patent B2
US 12,367,033 · App. 17/953,967 · Granted Jul 22, 2025

Identifying significant code changes via syntactic representation

Inventors: Janos Bonic (Vienna, AT); Sanja Bonic (Vienna, AT)
Assignee: Red Hat, Inc.
G06F8/71
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,367,033
App. No.
17/953,967
Granted
Jul 22, 2025
Kind
B2
Abstract

A first syntactic representation of a first version of a codebase and a second syntactic representation of a second version of the codebase are generated, the codebase comprising a plurality of units of software instructions. A portion of the first syntactic representation is determined to be different than a corresponding portion of the second syntactic representation. A first version and a second version of a unit of software instructions of the plurality of units of software instructions is obtained, wherein the portion of the first syntactic representation is based on the first version of the unit of software instructions and the corresponding portion of the second syntactic representation is based on the second version of the unit of software instructions. Information descriptive of a difference between the first version of the unit of software instructions and the second version of the unit of software instructions is generated.

Claims (44)

1. A method comprising:

generating, by a computing system comprising one or more processor devices, a first syntactic representation of a first version of a codebase and a second syntactic representation of a second version of the codebase, the codebase comprising a plurality of units of software instructions, wherein the first and second syntactic representations respectively represent a functionality, when executed at runtime, of each unit of software instructions of the plurality of units of software instructions of the first and second versions of the codebase;

comparing a portion of the first syntactic representation to a corresponding portion of the second syntactic representation to identify a plurality of non-whitespace modifications made to non-whitespace characters of a first unit of software instructions of the plurality of units of software instructions, wherein the portion of the first syntactic representation represents a first version of the first unit of software instructions and the corresponding portion of the second syntactic representation represents a second version of the first unit of software instructions;

obtaining the first version and the second version of the first unit of software instructions;

based on a programming language in which the first unit of software instructions is written, performing a language-specific analysis to identify a first non-whitespace modification of the plurality of non-whitespace modifications as being a non-substantive modification that does not affect the functionality of the first unit of software instructions when executed at runtime; and

generating information descriptive of a subset of the plurality of non-whitespace modifications, wherein the first non-whitespace modification is filtered from the subset of non-whitespace modifications based on the language-specific analysis.

2. The method of claim 1 , wherein, prior to generating the first syntactic representation of the first version of the codebase and the second syntactic representation of the second version of the codebase, the method comprises:

obtaining the first version of the codebase and the second version of the codebase from a code versioning system that stores versions of the codebase.

3. The method of claim 2 , wherein the method further comprises providing the information descriptive of the subset of the plurality of non-whitespace modifications to a computing device associated with a user of the code versioning system.

4. The method of claim 2 , wherein the computing system comprises the code versioning system.

5. The method of claim 2 , wherein comparing the portion of the first syntactic representation to the corresponding portion of the second syntactic representation comprises:

retrieving the first version and the second version of the first unit of software instructions of the plurality of units of software instructions from the code versioning system.

6. The method of claim 1 , wherein:

the non-whitespace characters of the first version of the codebase comprise a plurality of substantive non-whitespace characters and a plurality of non-substantive non-whitespace characters;

the first syntactic representation comprises one or more representational tokens that represent the plurality of substantive non-whitespace characters; and

wherein generating the first syntactic representation of the first version of the codebase comprises:

removing the plurality of non-substantive non-whitespace characters from the first version of the codebase; and

generating the one or more representational tokens based on the first version of the codebase.

7. The method of claim 1 , wherein the first syntactic representation comprises a first abstract syntax tree and the second syntactic representation comprises a second abstract syntax tree, wherein an abstract syntax tree comprises a plurality of representation tokens that each represent one or more non-whitespace characters of the plurality of units of software instructions of the codebase.

8. A computer system comprising:

a memory; and

a processor device coupled to the memory to:

generate a first syntactic representation of a first version of a codebase and a second syntactic representation of a second version of the codebase, the codebase comprising a plurality of units of software instructions, wherein the first and second syntactic representations respectively represent a functionality, when executed at runtime, of each unit of software instructions of the plurality of units of software instructions of the first and second versions of the codebase;

compare a portion of the first syntactic representation to a corresponding portion of the second syntactic representation to identify a plurality of non-whitespace modifications made to non-whitespace characters of a first unit of software instructions of the plurality of units of software instructions, wherein the portion of the first syntactic representation represents a first version of the first unit of software instructions and the corresponding portion of the second syntactic representation represents a second version of the first unit of software instructions;

obtain the first version and the second version of the first unit of software instructions;

based on a programming language in which the first unit of software instructions is written, perform a language-specific analysis to identify a first non-whitespace modification of the plurality of non-whitespace modifications as being a non-substantive modification that does not affect the functionality of the first unit of software instructions when executed at runtime; and

generate information descriptive of a subset of the plurality of non-whitespace modifications, wherein the first non-whitespace modification is filtered from the subset of non-whitespace modifications based on the language-specific analysis.

9. The computing system of claim 8 , wherein, prior to generating the first syntactic representation of the first version of the codebase and the second syntactic representation of the second version of the codebase, the processor device is to:

obtain the first version of the codebase and the second version of the codebase from a code versioning system that stores versions of the codebase.

10. The computing system of claim 9 , wherein the processor device is further to provide the information descriptive of the subset of the plurality of non-whitespace modifications to a computing device associated with a user of the code versioning system.

11. The computing system of claim 9 , wherein the computing system comprises the code versioning system.

12. The computing system of claim 9 , wherein comparing the portion of the first syntactic representation to the corresponding portion of the second syntactic representation comprises retrieving the first version and the second version of the first unit of software instructions of the plurality of units of software instructions from the code versioning system.

13. The computing system of claim 8 , wherein:

the non-whitespace characters of the first version of the codebase comprise a plurality of substantive non-whitespace characters and a plurality of non-substantive non-whitespace characters;

the first syntactic representation comprises one or more representational tokens that represent the plurality of substantive non-whitespace characters; and

wherein generating the first syntactic representation of the first version of the codebase comprises:

removing the plurality of non-substantive non-whitespace characters from the first version of the codebase; and

generating the one or more representational tokens based on the first version of the codebase.

14. A non-transitory computer-readable storage medium that includes executable instructions to cause one or more processor devices to:

generate a first syntactic representation of a first version of a codebase and a second syntactic representation of a second version of the codebase, the codebase comprising a plurality of units of software instructions, wherein the first and second syntactic representations respectively represent a functionality, when executed at runtime, of each unit of software instructions of the plurality of units of software instructions of the first and second versions of the codebase;

compare a portion of the first syntactic representation to a corresponding portion of the second syntactic representation to identify a plurality of non-whitespace modifications made to non-whitespace characters of a first unit of software instructions of the plurality of units of software instructions, wherein the portion of the first syntactic representation represents a first version of the first unit of software instructions and the corresponding portion of the second syntactic representation represents a second version of the first unit of software instructions;

obtain the first version and the second version of the first unit of software instructions;

based on a programming language in which the first unit of software instructions is written, perform a language-specific analysis to identify a first non-whitespace modification of the plurality of non-whitespace modifications as being a non-substantive modification that does not affect the functionality of the first unit of software instructions when executed at runtime; and

generate information descriptive of a subset of the plurality of non-whitespace modifications, wherein the first non-whitespace modification is filtered from the subset of non-whitespace modifications based on the language-specific analysis.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 27, 2022
From: BONIC, JANOS; BONIC, SANJA
To: RED HAT, INC.
Reel/Frame 061229/0031 →
Continuity (1)
Related Publication 20240103854A1 · Mar 28, 2024
References Cited (13)
US 7676478B2 · Rausch · 2010 [cited by examiner]
US 8769501B2 · Salecker et al. · 2014 [cited by applicant]
US 8984485B2 · Elshishiny et al. · 2015 [cited by applicant]
US 9971594B2 · Fox et al. · 2018 [cited by applicant]
US 11372749B2 · Wiener · 2022 [cited by examiner]
US 11693635B1 · Sahar · 2023 [cited by examiner]
US 20100088676A1 · Yuan · 2010 [cited by examiner]
US 20180285326A1 · Goyal · 2018 [cited by examiner]
US 20200371778A1 · Ni et al. · 2020 [cited by applicant]
CN 100461132C · 2009 [cited by applicant]
CN 107203468B · 2020 [cited by applicant]
CN 112306479A · 2021 [cited by applicant]
Shay, Llana et al., “Measuring Whitespace Patterns in Computer Source Code as an Indication of Copying,” https://www.zeidmanconsulting.com/documents/Measuring%20Whitespace%20Patterns%20In%20Computer%20Source%20Code%20as… [cited by applicant]