Automated Performance Bug Detection via ML Code Recommendation

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, increased latency, and reduced throughput, which complicates resource management in complex software systems.

Innovation Solution

An automated system that uses a machine learning classifier to identify performance-related pull requests from source code repositories, constructing a code recommendation table with structural and performance features before and after code changes, and provides code recommendations by matching target method features with similar performance-improved methods.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If performance bugs are not detected, then software systems can operate without intervention, but performance degradation, increased latency, and reduced throughput occur

Engineering Contradiction:
Improveperformance detection capabilityVSAvoidresource usage efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent replaces manual performance analysis methods with an automated machine learning-based detection system. The system uses ML classifiers to automatically identify performance-related pull requests and construct code recommendation tables, substituting the mechanical/manual process of code review with an automated intelligent system that continuously monitors and detects performance issues.

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

Solution Approach 2:

The system enables self-service by automatically detecting performance bugs and generating code recommendations without requiring manual intervention. The machine learning model continuously learns from pull requests and automatically constructs code recommendation tables, allowing the system to monitor and improve its own performance detection capabilities over time.

Inventive Principle:
Principle #25Self-service

2Measurement precision

If code recommendations are provided based on machine learning classification, then performance bug detection accuracy improves, but system complexity increases

Engineering Contradiction:
Improveperformance bug detection accuracyVSAvoidsystem architecture complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the complex performance detection system into distinct functional modules: a machine learning classifier module for identifying performance-related pull requests, a code recommendation table construction module for organizing and indexing code examples, and a feature extraction module for analyzing code structures. This segmentation allows each component to be developed, maintained, and optimized independently while working together to achieve high detection accuracy.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP4278253B1Performance bug detection and code recommendation
Publication Date: 2024.11.20 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP4278253B1 patent drawingFigure 1
  • EP4278253B1 patent drawingFigure 2
  • EP4278253B1 patent drawingFigure 3

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.