US 12,229,040 B2
Generative artificial intelligence driven software fixing
Roman Rudenko, Vienna (AT); and Anna Bacher, Vienna (AT)
Assigned to Veracode, Inc., Burlington, MA (US)
Filed by Veracode, Inc., Burlington, MA (US)
Filed on Sep. 11, 2023, as Appl. No. 18/464,436.
Claims priority of provisional application 63/523,916, filed on Jun. 28, 2023.
Prior Publication US 2025/0004915 A1, Jan. 2, 2025
Int. Cl. G06F 11/36 (2006.01); G06F 8/35 (2018.01); G06F 8/36 (2018.01); G06F 11/362 (2025.01); G06N 20/00 (2019.01)
CPC G06F 11/3636 (2013.01) [G06F 8/35 (2013.01); G06F 8/36 (2013.01); G06N 20/00 (2019.01)] 26 Claims
OG exemplary drawing
 
1. A method comprising:
forming a set of one or more prompts for a generative model to generate a set of one or more patches to fix a detected flaw in a program code body, wherein forming a prompt comprises,
arranging a code fragment corresponding to the detected flaw, contextual code for the code fragment, a flawed reference code, and a fixed reference code with delineating markers to form the prompt, wherein the generative model has been fine-tuned to constrain a generated response to a modification of the code fragment;
running the generative model on the set of one or more prompts; and
applying a first generated patch from the generative model to the program code body.