IP Library Granted Patent US 12664069
Granted Patent B2
US 12664069 · App. 18/315,519 · Granted Jun 23, 2026

Code concierge model (CCM) for predicting runtime errors of source code

Inventors: Zachary A. Silverstein (Georgetown, TX); Hernan A. Cunico (Holly Springs, NC); Jonathan D. Dunne (Dungarvan, IE); Saswati Dana (Bangalore, IN)
Assignee: International Business Machines Corporation
G06F11/3608
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 12664069
App. No.
18/315,519
Filed
May 11, 2023
Granted
Jun 23, 2026
Kind
B2
Art Unit
2192
USPC
717/126
Abstract

Aspects of the present disclosure relate generally to software development environments and, more particularly, to predicting runtime errors in software development environments. For example, a computer-implemented method includes: clustering similar regions of source code into clusters of code regions; identifying source code exceptions from at least one past execution of an executable image of the source code; deriving a model of features of the source code associated with the source code exceptions for the clusters of code regions; generating a matrix as output of the model that predicts a likelihood of an occurrence of at least one uncaught exception during a future execution of the executable image of the source code in a cluster of the clusters of code regions; and annotating the source code in the code region of the cluster with an indication of the likelihood of the occurrence of the at least one uncaught exception.

Claims (50)

1 . A method, comprising:

clustering, by a processor set, regions of source code into clusters of code regions based on a similarity of the regions of source code determined by a Gaussian Mixture Model;

correlating, by the processor set, the clusters of code regions with feature clusters by iteratively adjusting clustering criteria and assessing a correlation measure between the feature clusters and the clusters of code regions against a predetermined threshold, the feature clusters generated based on proximity to features of the source code;

identifying, by the processor set, source code exceptions from log events in system logs of at least one past execution of an executable image of the source code;

deriving, by the processor set, a model of the features of the source code, wherein the features of the source code are associated with the source code exceptions;

generating, by the processor set, a matrix as output of the model, wherein the output predicts a likelihood of an occurrence of at least one uncaught exception during a future execution of the executable image of the source code in a cluster of the clusters of code regions; and

annotating, by the processor set, with visual indicators in the system logs, at least one log event of the source code of the cluster with an indication of the likelihood of the occurrence of the at least one uncaught exception.

2 . The method of claim 1 , further comprising:

deriving the features of the source code; and

clustering the features of the source code into the feature clusters.

3 . The method of claim 2 , wherein the deriving comprises performing entity analysis that analyzes the source code using logistic regression and vectorization techniques to derive the features of the source code.

4 . The method of claim 2 , wherein the clustering the features comprises using a Gaussian Mixture Model to generate the feature clusters.

5 . The method of claim 1 , further comprising calculating feature weights of the model using the features of the source code associated with the source code exceptions as part of a logistic regression model.

6 . The method of claim 1 , further comprising:

generating a log event indicating the likelihood of the occurrence of the at least one uncaught exception; and

outputting the log event into a system log.

7 . The method of claim 1 , wherein the identifying comprises:

scanning log events from the at least one past execution in a system log; and

extracting information of warnings and errors from the log events of the system log for the source code.

8 . The method of claim 1 , wherein the matrix comprises probability values that predict the likelihood of the occurrence of the at least one uncaught exception.

9 . A computer program product comprising one or more computer readable storage media having program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:

cluster regions of source code into clusters of code regions based on a similarity of the regions of source code determined by a Gaussian Mixture Model;

correlate the clusters of code regions with feature clusters by iteratively adjusting clustering criteria and assessing a correlation measure between the feature clusters and the clusters of code regions against a predetermined threshold, the feature clusters generated based on proximity to features of the source code;

identify source code exceptions from log events in system logs of at least one past execution of an executable image of the source code;

derive a model of the features of the source code, wherein the features of the source code are associated with the source code exceptions;

generate a matrix as output of the model, wherein the output predicts a likelihood of an occurrence of at least one uncaught exception during a future execution of the executable image of the source code in a cluster of the clusters of code regions; and

annotate, at least one log event of the source code of the cluster with an indication of the likelihood of the occurrence of the at least one uncaught exception.

10 . The computer program product of claim 9 , wherein the program instructions are further executable to:

derive the features of the source code using entity analysis; and

cluster the features of the source code using a Gaussian Mixture Model to generate the feature clusters.

11 . The computer program product of claim 9 , wherein the program instructions are further executable to calculate feature weights of the model using the features of the source code associated with the source code exceptions as part of a logistic regression model.

12 . The computer program product of claim 9 , wherein the program instructions are further executable to:

generate a log event indicating the likelihood of the occurrence of the at least one uncaught exception; and

output the log event into a system log.

13 . The computer program product of claim 9 , wherein the program instructions are further executable to annotate the source code of the cluster with the indication of the likelihood of the occurrence of the at least one uncaught exception.

14 . A system comprising:

a processor, a computer readable memory, one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:

cluster regions of source code into clusters of code regions based on a similarity of the regions of source code determined by a Gaussian Mixture Model;

correlate the clusters of code regions with feature clusters by iteratively adjusting clustering criteria and assessing a correlation measure between the feature clusters and the clusters of code regions against a predetermined threshold, the feature clusters generated based on proximity to features of the source code;

determine code regions with at least one source code exception from log events in system logs of at least one past execution of an executable image of the source code;

generate a model of a probability distribution of the features of the source code, wherein the features of the source code are associated with the at least one source code exception;

output a matrix from the model, wherein the matrix predicts a likelihood of an occurrence of at least one uncaught exception during a future execution of the executable image of the source code in a cluster of the clusters of code regions; and

annotate, with visual indicators in the system logs, at least one log event of the source code of the cluster with an indication of the likelihood of the occurrence of the at least one uncaught exception.

15 . The system of claim 14 , wherein the program instructions are further executable to:

derive the features of the source code using entity analysis; and

cluster the features of the source code using a Gaussian Mixture Model to generate the feature clusters.

16 . The system of claim 14 , wherein the program instructions are further executable to:

generate a log event indicating the likelihood of the occurrence of the at least one uncaught exception; and

output the log event into a system log.

17 . The system of claim 14 , wherein the program instructions are further executable to annotate, with visual indicators, the source code of the cluster with an indication of the likelihood of an occurrence of an error for one or more of the features of the source code.