Machine Learning Code Synthesizer for Automated Bug Resolution
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Reliability
If IDEs automatically detect software bugs, then bug identification capability is improved, but the ability to automatically fix bugs is lacking
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.
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.
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
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.
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.
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
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.
Data Source
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.


