Smart Code Editor Using Neural Networks for Context-Aware Autocomplete

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing smart code editors provide limited and non-optimal autocomplete suggestions due to reliance on incomplete user input and generic training data, often leading to incorrect or suboptimal predictions for specific coding tasks, particularly in areas like test automation or robotic process automation.

Innovation Solution

Implementing a smart code editor that uses artificial neural networks, such as recurrent neural networks, to predict next logical lines of code or program instructions based on user-specific and public data sources, allowing for suggestions before the user has started typing, thereby providing more meaningful and robust predictions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If machine-learning based autocomplete is used with generic training data, then the system can provide predictions, but the predictions are often incorrect or non-optimal for specific coding tasks

Engineering Contradiction:
Improveprediction accuracyVSAvoidadaptability to specific coding tasks
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent applies local quality by transitioning from generic training data to user-specific training data. The system collects and trains on code examples from the same application area or domain as the user's current coding task, ensuring the predictions are tailored to the specific context rather than being based on general programming patterns. This localized approach improves prediction accuracy for domain-specific tasks.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system performs preliminary data collection and training before providing autocomplete suggestions. It proactively gathers code examples from the user's application area and trains the machine-learning model in advance, so that when predictions are needed, the model is already optimized for the specific coding task at hand, rather than relying on pre-existing generic knowledge.

Inventive Principle:
Principle #10Preliminary action

2Speed

If autocomplete suggestions are provided based on incomplete user input, then the system responds quickly, but the suggestions are limited and may not capture the user's intended logic

Engineering Contradiction:
Improveprediction response speedVSAvoidloss of contextual information
Core Design Contradiction:
SpeedVSLoss of information

Solution Approach 1:

The system performs preliminary collection and analysis of relevant code examples from the user's application area before generating predictions. By pre-processing and organizing this contextual information, the system can quickly retrieve and apply appropriate patterns without needing to analyze everything in real-time, thus maintaining speed while improving the quality of suggestions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system incorporates feedback loops where it monitors which autocomplete suggestions the user accepts and which code examples are relevant to their current task. This feedback is used to continuously refine the training data and model parameters, enabling the system to better understand the user's intentions and provide more accurate predictions over time.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11573771B2Predicting code editor
Publication Date: 2023.02.07 QENTINEL QUALITY INTELLIGENCE OY
  • US11573771B2 patent drawing
  • US11573771B2 patent drawing
  • US11573771B2 patent drawing

AI summary

According to an aspect, there is provided a computing device for performing the following. The computing device obtains, in a code editor, one or more logical lines of code for a program. The computing device predicts, using a first prediction algorithm, one or more most probable next program instructions based on said one or more logical lines of code and displays them to the user. In response to receiving a selection of a program instruction, the computing device inserts a selected program instruction to the code editor. The computing device predicts, using a second prediction algorithm, one or more most probable sets of zero or more parameters based on a selected program instruction and said one or more logical lines of code and displays them to the user. In response to receiving a selection of a set, the computing device inserts a selected set to the code editor.