US 12,169,715 B2
Code review comment generation via retrieval-augmented transformer with chunk cross-attention
Shengyu Fu, Redmond, WA (US); Xiaoyu Liu, Sammamish, WA (US); Neelakantan Sundaresan, Bellevue, WA (US); and Alexey Svyatkovskiy, Bellevue, WA (US)
Assigned to Microsoft Technology Licensing, LLC., Redmond, WA (US)
Filed by MICROSOFT TECHNOLOGY LICENSING, LLC., Redmond, WA (US)
Filed on Dec. 5, 2022, as Appl. No. 18/074,994.
Prior Publication US 2024/0184570 A1, Jun. 6, 2024
Int. Cl. G06F 8/77 (2018.01); G06F 8/33 (2018.01)
CPC G06F 8/77 (2013.01) [G06F 8/33 (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 actions that:
obtain a proposed source code change to a source code program in a code diff format, wherein the code diff format includes code edits made to the source code program;
access a database of code review comments, wherein each code review comment of the database is indexed by code edits associated with a respective code review comment;
retrieve a code review comment for the proposed source code change of the source code program from the database of code review comments, wherein the retrieved code review comment has code edits similar to the code edits of the proposed source code change; and
generate a candidate code review comment for the proposed source code change from a deep learning model, wherein the candidate code review comment comprises a plurality of tokens, wherein the deep learning model generates each token of the candidate code review comment given the retrieved code review comment and the proposed source code change.