/Patent Tracker
MicrosoftPatent applicationAI & softwareInterest 6/10

Microsoft patents AI tool that predicts why code needs fixing

Patent drawing
Patent drawing from the official filing.

Microsoft describes a system that uses a large language model to write comments for code reviews. It first uses a separate neural network to guess the specific type of problem in the code changes, such as a bug or style issue. The system then combines this predicted problem type with the code context to generate a helpful comment for developers.

Why it mattersThis could make software development faster by automatically identifying the main issue in code changes before a human reviewer writes a comment.

In the filing’s own words

A code review is automatically generated by a large language model given a prompt that includes code changes made to a source code program, an associated intent, and an extended context. The intent represents an issue with the code changes from a code reviewer's perspective and is predicted from a neural classifier given the code changes in a code diff format. The neural classifier is a neural encoder transformer model pre-trained on various code review datasets and fine-tuned on code diff hunks of code changes labeled with an intent.

What exactly they claim (claim 1)

1. A computer-implemented method for automated code review, said method comprising: receiving code changes associated with a source code program; generating a representation of the code changes configured for machine learning inference; determining, using a trained neural model, an inferred intent associated with the code changes, the inferred intent characterizing a type of issue relevant to code review; conditioning a code review comment generation process on the inferred intent and contextual information derived from the source code program; generating, using a large language model, a code review comment for the code changes based on the conditioning; and providing the code review comment for review by a developer.

Facts

Company
Microsoft (Microsoft Technology Licensing, LLC)
Official title
CODE REVIEW COMMENT GENERATION VIA INSTRUCTION PROMPTING WITH INTENT
Publication number
US20260319790A1
Application number
19706981
Filed
Jun 12, 2026
Published
Oct 15, 2026
Inventors
4
Claims
20

Classified under

G06F 8/73 Physics & computingG06F 8/433 Physics & computingG06F 40/30 Physics & computing

More from Microsoft in AI & software

Summaries are simplified from the filing’s own abstract and first claim. A patent filing is not a product announcement.
Patent data and drawings: U.S. Patent and Trademark Office (USPTO). Nebula is not affiliated with or endorsed by the USPTO.