Machine Learning Code Synthesizer for Automated Bug Resolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current integrated development environments (IDEs) cannot automatically fix bugs or synthesize code fragments based on input/output pairs, requiring developers to spend additional time writing complete code, even when inputs and expected outputs are known.

Innovation Solution

A computer system infers software routine instructions from known inputs and corresponding expected outputs to synthesize correctly functioning code fragments, and automatically resolves semantic errors by learning from input-output descriptions to alter the software routine.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If developers manually write and debug source code using traditional IDEs, then code functionality can be achieved, but development time is excessive and tedious

Engineering Contradiction:
Improvecode development speedVSAvoidtime spent writing and debugging code
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system enables self-service by allowing the computer to automatically synthesize code fragments and fix bugs using machine learning models. The ML-based code synthesizer autonomously generates functional code from I/O pairs, and the bug fixing system automatically corrects errors without requiring manual developer intervention for each issue.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical manual coding process with an automated machine learning system. Instead of developers manually writing and debugging code, the system uses trained ML models to synthesize code fragments and resolve bugs, substituting human mechanical effort with automated intelligent processing.

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

2Reliability

If IDEs automatically detect software bugs, then bug identification capability is improved, but the ability to automatically fix bugs is lacking

Engineering Contradiction:
Improvebug detection capabilityVSAvoidautomatic bug fixing capability
Core Design Contradiction:
ReliabilityVSExtent of automation

Solution Approach 1:

The bug fixing system uses feedback from executing test cases on buggy code to guide the repair process. The system observes execution results, compares actual outputs with expected outputs, and uses this feedback to iteratively refine and correct the code until the bug is resolved.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces test cases as an intermediary between the buggy code and the fixing process. These test cases serve as mediators that reveal the bugs through execution failures and guide the automated system in understanding what corrections are needed.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Manufacturing precision

If developers know inputs and expected outputs but are unclear how to write the code, then code correctness can be ensured, but the time to write the code increases significantly

Engineering Contradiction:
Improvecode correctnessVSAvoidtime to write code from scratch
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The system performs preliminary action by pre-training machine learning models on large datasets of code and their corresponding inputs and outputs. This preliminary training enables the model to quickly synthesize correct code fragments during actual development by leveraging previously learned patterns and relationships.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the approach from manual parameter-by-parameter code construction to a holistic transformation of the coding process. By transforming the input-output specification directly into code through machine learning, the system bypasses the traditional step-by-step manual coding process while ensuring correctness.

Inventive Principle:
Principle #35Parameter changes

4Extent of automation

If machine learning techniques are applied to code synthesis, then automated code generation capability is improved, but application to synthesizing program code has been limited

Engineering Contradiction:
Improveautomated code generationVSAvoidapplicability to code synthesis
Core Design Contradiction:
Extent of automationVSAdaptability or versatility

Solution Approach 1:

The patent achieves universality by making the machine learning code synthesizer applicable to multiple programming languages and various coding tasks. The system can synthesize code fragments in different languages (Java, C#, Python, etc.) and handle diverse scenarios including bug fixing, code completion, and generating code from I/O specifications.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8181163B2Program synthesis and debugging using machine learning techniques
Publication Date: 2012.05.15 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8181163B2 patent drawing
  • US8181163B2 patent drawing
  • US8181163B2 patent drawing

AI summary

One embodiment is directed to synthesizing code fragments in a software routine using known inputs and corresponding expected outputs. A computer system provides a software routine with known inputs and corresponding expected outputs, infers software routine instructions based on the known inputs and corresponding expected outputs, and synthesizes a correctly functioning code fragment based on the inferred instructions. Another embodiment is directed to automatically resolving semantic errors in a software routine. A computer system provides the software routine with known inputs and corresponding expected outputs for portions of a program fragment where an error has been localized. The computer system learns a correctly functioning program fragment from pairs of input-output descriptions of the program fragment, determines the program statements that can transform given input states into given output states after execution of those program statements, and alters portions of the software routine with the learned program fragments.