| CPC G06F 21/577 (2013.01) [G06F 2221/033 (2013.01)] | 20 Claims |

|
8. A computer-implemented method, comprising:
accessing a plurality of groups having code changes, wherein a group of the plurality of groups is associated with a particular software vulnerability type, wherein a code change is associated with a vector comprising an embedding of a respective code change and a natural language description of the respective code change, wherein each group of the plurality of groups comprises code changes comprising similar vectors, wherein each group of the plurality of groups comprises a representative code change, wherein the representative code change comprises a closest mean intra-cluster distance to other code changes of the group;
obtaining a source code snippet having the first type of software vulnerability;
selecting one or more code changes from the group associated with the first type of software vulnerability based on a closest distance to the representative code change for the group;
generating an input to a large language model, wherein the input includes the source code snippet having the first type of vulnerability and the one or more code changes;
causing the large language model to generate repair code to correct the first type of software vulnerability, wherein the large language model is given the input; and
obtaining from the large language model the repair code.
|