US 12,242,372 B2
Performance bug repair via retrieval-augmented neural code generation model
Spandan Garg, Redmond, WA (US); Neelakantan Sundaresan, Bellevue, WA (US); and Roshanak Zilouchian Moghaddam, Kirkland, WA (US)
Assigned to Microsoft Technology Licensing, LLC., Redmond, WA (US)
Filed by MICROSOFT TECHNOLOGY LICENSING, LLC., Redmond, WA (US)
Filed on Mar. 21, 2023, as Appl. No. 18/124,185.
Claims priority of provisional application 63/441,169, filed on Jan. 25, 2023.
Prior Publication US 2024/0248686 A1, Jul. 25, 2024
Int. Cl. G06F 11/36 (2006.01); G06F 8/35 (2018.01); G06F 8/36 (2018.01); G06F 11/3668 (2025.01)
CPC G06F 11/3692 (2013.01) [G06F 8/35 (2013.01); G06F 8/36 (2013.01); G06F 11/3668 (2013.01)] 20 Claims
OG exemplary drawing
 
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.