Pull Request Summarization Using Dependency-Based Change Prioritization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The pull request process in collaborative software development is hindered by inadequate descriptions, large volumes of code modifications, and the difficulty in identifying suitable code reviewers due to the lack of clear descriptions and complexity of code changes.

Innovation Solution

An AI-driven pull request summarization system using a large language model to classify and summarize code changes, prioritize them based on repository dependencies, link to related issues, and suggest reviewers, leveraging a dependency graph and natural language processing to generate a comprehensive overview of code changes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If code reviewers manually review all code changes in a pull request, then review thoroughness is improved, but review time and complexity increase significantly

Engineering Contradiction:
Improvereview thoroughnessVSAvoidreview time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the code changes in a pull request by creating a dependency graph that identifies and separates critical code paths from less important changes. This allows reviewers to focus their attention on the most impactful segments of code that affect the repository's core functionality, rather than reviewing every single line of change uniformly.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an AI-based intermediary system that automatically analyzes code changes, generates summaries, and identifies critical paths. This intermediary processes the code diff and presents distilled information to reviewers, acting as a mediator between the raw code changes and human reviewers to reduce their cognitive load and time requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If reviewers examine all code changes to ensure quality, then review accuracy is improved, but review complexity increases

Engineering Contradiction:
Improvereview accuracyVSAvoidreview complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The dependency graph segments code changes into critical and non-critical paths, allowing reviewers to systematically focus on high-impact areas. This segmentation reduces the apparent complexity by organizing changes hierarchically based on their importance to repository functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs self-service by automatically generating code change summaries, identifying critical paths, and linking related issues without requiring manual analysis. This automation handles the complex analysis work, leaving reviewers to focus on higher-level judgment and decision-making.

Inventive Principle:
Principle #25Self-service

3Ease of operation

If pull requests include detailed descriptions of code changes, then reviewer understanding is improved, but preparation time for reviewers increases

Engineering Contradiction:
Improvereviewer understandingVSAvoidpreparation time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The AI-based intermediary automatically generates concise summaries of code changes that highlight critical modifications and their impacts. These generated summaries serve as pre-prepared materials that improve reviewer understanding without requiring reviewers to spend time reading and synthesizing the full code diff themselves.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary analysis of code changes by generating summaries and identifying critical paths before reviewers examine the pull request. This preliminary action prepares the information in advance, allowing reviewers to start their review process with already-synthesized insights rather than beginning from scratch.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If the system prioritizes code changes based on dependency analysis, then review efficiency is improved, but system complexity increases

Engineering Contradiction:
Improvereview efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The dependency graph segments the codebase into interconnected components and identifies critical paths that link pull request changes to repository functionality. This segmentation enables systematic prioritization of code changes based on their impact, improving review efficiency by directing attention to the most important segments first.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12487819B2AI-driven pull request summarization
Publication Date: 2025.12.02 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12487819B2 patent drawing
  • US12487819B2 patent drawing
  • US12487819B2 patent drawing

AI summary

An Artificial Intelligence (AI) driven pull request summarization system utilizes a large language model to classify the code changes of a pull request and to generate a summary of the changes contained in the pull request. The large language model predicts the pull request classification and summarization given a prompt that includes the top-k code changes in the pull request of a repository. The code changes are prioritized based on the most impact that a code change has on the files, methods and classes in the repository. Each of the top-k code changes is linked to a related open issue of the repository, if any. A suggested code reviewer for a code change is then selected from an author or commentator associated with the linked open issue.