Neural Transformer Automated Program Repair Using Stack Traces

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Despite efforts to ensure software quality through testing, source code bugs often remain undetected until after deployment, leading to increased maintenance costs and usability issues.

Innovation Solution

An automated program repair system utilizing a neural transformer model with attention is developed to predict and fix source code bugs by pre-training on natural language and programming languages, fine-tuning on synthetic bugs, and generating repaired code based on stack traces.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If software is tested prior to release, then the quality of the program is improved, but source code bugs may still remain undetected

Engineering Contradiction:
Improvesoftware qualityVSAvoidbug detection accuracy
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent replaces traditional mechanical testing methods with an AI-based neural transformer system that automatically detects and repairs bugs. The system uses machine learning models trained on code repositories to identify bugs and generate fixes, substituting manual testing and code review processes with automated intelligent analysis.

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

Solution Approach 2:

The patent introduces an intermediary AI system that acts as a bridge between the source code and the testing process. The neural transformer model serves as a mediator that analyzes code, identifies bugs, and generates repair suggestions, facilitating more accurate bug detection without requiring exhaustive manual testing.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If software bugs are fixed after deployment, then the bugs are corrected, but the usability of the deployed program is hampered and maintenance costs increase

Engineering Contradiction:
Improvebug correctionVSAvoidprogram usability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent applies preliminary action by detecting and fixing bugs before software deployment. The AI system analyzes source code in advance, identifies potential bugs, and generates repair suggestions prior to release, preventing bugs from reaching the deployed system and thereby maintaining usability without requiring post-deployment fixes.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If traditional testing methods are used, then software quality measures are taken, but the cost of software maintenance services increases

Engineering Contradiction:
Improvesoftware qualityVSAvoidmaintenance cost
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The patent implements self-service by enabling the system to automatically detect and repair its own bugs without requiring extensive manual intervention. The neural transformer model autonomously analyzes code, identifies bugs, and generates repair suggestions, reducing the need for expensive human maintenance services while maintaining high software quality.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent changes the parameter of bug detection from manual testing to automated AI analysis. By transforming the detection mechanism and using machine learning models trained on large code datasets, the system achieves better bug detection accuracy at lower maintenance costs compared to traditional testing methods.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11604719B2Automated program repair using stack traces and back translations
Publication Date: 2023.03.14 MICROSOFT TECHNOLOGY LICENSING LLC
  • US11604719B2 patent drawing
  • US11604719B2 patent drawing
  • US11604719B2 patent drawing

AI summary

An automated program repair system uses a neural transformer model with attention to predict a bug-free version of a method having a source code bug identified in an associated stack trace. The neural transformer model is pre-trained with English language text and the source code of a target programming language. The pre-trained neural transformer model is trained to create synthetic bugs in bug-free methods. The bug-free methods with the synthetic bugs are executed with a test case to obtain a stack trace of the source code bug. The method with the synthetic bug, without the bug, and its stack trace are used to train the neural transformer model to predict repairs for buggy methods.