Automated Performance Bug Detection via Code Recommendation Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Performance bugs in software systems are difficult to detect due to the absence of fail-stop symptoms, leading to significant performance degradation, excessive resource usage, and reduced throughput, which are challenging to identify and remediate, especially in complex software systems.

Innovation Solution

An automated system that analyzes source code repositories to detect performance bugs by constructing a code recommendation table from performance-related pull requests using a machine learning classifier, extracting structural and performance features, and providing code recommendations based on similarities with improved code snippets.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional bug detection methods are used, then functional bugs and compiler errors can be detected, but performance bugs cannot be detected due to absence of fail-stop symptoms

Engineering Contradiction:
Improveperformance bug detection accuracyVSAvoidperformance bug detectability
Core Design Contradiction:
Measurement precisionVSDifficulty of detecting and measuring

Solution Approach 1:

The patent introduces an automated analysis system as an intermediary between the software code and performance bug detection. This system uses machine learning classifiers and code recommendation tables to mediate the detection process, enabling identification of performance bugs that would otherwise be undetectable through traditional methods by analyzing code patterns and comparing against known performance improvement cases

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces manual performance bug detection mechanisms with automated machine learning-based analysis. Instead of relying on human reviewers to identify performance issues, the system automatically analyzes code repositories, trains classifiers on performance-related pull requests, and generates detections through computational comparison of code features against a code recommendation table

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If code analysis is performed manually, then detailed performance evaluation is possible, but the process is time-consuming and scales poorly to complex software systems

Engineering Contradiction:
Improveperformance bug detection speedVSAvoiddetection time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent performs preliminary action by pre-training machine learning classifiers on historical performance-related pull requests and pre-building a code recommendation table with performance improvement patterns before actual bug detection begins. This preliminary preparation enables rapid automated analysis of new code without requiring time-consuming manual review during the detection phase

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system enables self-service by allowing the automated analysis tool to independently detect performance bugs without requiring manual intervention. The machine learning model automatically analyzes code repositories, identifies potential performance issues, and generates detections by comparing code against the pre-built recommendation table, eliminating the need for human reviewers to perform time-consuming manual analysis

Inventive Principle:
Principle #25Self-service

3Measurement precision

If comprehensive code analysis is performed to detect performance bugs, then detection accuracy improves, but system complexity increases

Engineering Contradiction:
Improveperformance bug detection accuracyVSAvoiddetection system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the performance bug detection system into distinct modular components: a training module that trains machine learning classifiers on performance-related pull requests, a code analysis module that extracts features from target code, and a detection module that compares code against a code recommendation table. This segmentation allows each component to be developed and maintained independently while working together to achieve accurate detection

Inventive Principle:
Principle #1Segmentation

4Productivity

If performance improvements are made to code, then software performance increases, but it becomes difficult to distinguish performance improvements from other modifications

Engineering Contradiction:
Improvesoftware performanceVSAvoidperformance improvement identification
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent uses machine learning classifiers to 'color' or label pull requests based on their content characteristics. The trained classifiers identify patterns that distinguish performance-related modifications from other types of changes, effectively tagging performance improvements with a recognizable signature that can be automatically detected and analyzed by the system

Inventive Principle:
Principle #32Color changes

Data Source

PatentUS20250021460A1Performance bug detection and code recommendation
Publication Date: 2025.01.16 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20250021460A1 patent drawing
  • US20250021460A1 patent drawing
  • US20250021460A1 patent drawing

AI summary

An automated system for detecting performance bugs in a program and for providing code recommendations to improve the performance of the program generates a code recommendation table from performance-related pull requests. The performance-related pull requests are identified in part from a classifier trained on semi-supervised data. A code recommendation table is generated from performance-related pull requests and is searched for similarly-improved code based on a set of difference features that includes structural and performance features of the before-code of a pull request that is not in the after-code.