| CPC G06F 11/3692 (2013.01) [G06F 8/35 (2013.01); G06F 8/36 (2013.01); G06F 11/3668 (2013.01)] | 20 Claims |

|
1. A system comprising:
one or more processors; and
a memory that stores one or more programs that are configured to be executed by the one or more processors, the one or more programs including instructions to perform acts that:
obtain a method having a performance bug;
produce an abstract bug pattern for the method having the performance bug, wherein the abstract bug pattern for the method having the performance bug includes source code lines of the method having the performance bug without identifiers;
search a knowledge database, given the abstract bug pattern for the method having the performance bug, for at least one code transformation instruction, wherein the at least one code transformation instruction represents changes made to repair a similar performance bug;
obtain the at least one code transformation instruction matching the abstract bug pattern for the method having the performance bug from the knowledge database;
create a prompt for the method, wherein the prompt for the method includes the method having the performance bug and the at least one code transformation instruction; and
generate repair code for the method having the performance bug using a neural code generation model given the prompt for the method.
|