Real-Time Source Code Suggestion via Reference Model Mapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software developers face challenges such as significant coding effort, code reusability, duplicating code blocks, and lack of intelligent code suggestions during development, leading to increased project turnaround times due to reliance on experience and minimal intelligence provided by Integrated Development Environments (IDEs).

Innovation Solution

A system and method that utilizes a processor and memory to create a reference model from mined source code information, allowing for real-time source code suggestion by determining parameters from user input, mapping them with metadata, and suggesting matching source code blocks for immediate code completion.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If software developers write code based on experience and language references, then code implementation can be achieved, but project turnaround time increases due to unnecessary code writing and lack of intelligent suggestions

Engineering Contradiction:
Improvecoding speedVSAvoidproject turnaround time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary action by mining source code information from the existing code base before the developer needs it, creating a pre-processed reference model that stores code blocks and their metadata. This allows the system to quickly retrieve and suggest relevant code blocks in real-time during coding, eliminating the need for developers to manually search through code repositories or language references, thus reducing project turnaround time while maintaining coding productivity

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system introduces an intermediary intelligence layer between the developer and the code base. This intermediary automatically analyzes the developer's coding patterns, determines relevant parameters, maps them to the reference model, and provides intelligent code suggestions. This mediator eliminates the inefficiency of manual code searching and writing, directly addressing the contradiction between coding speed and project turnaround time

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If IDEs provide syntax suggestions and code references, then basic coding assistance is available, but intelligent code suggestions to expedite coding activities are not provided

Engineering Contradiction:
Improvecoding assistanceVSAvoidcoding efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The system enables self-service by automatically mining source code information, creating reference models, and providing intelligent suggestions without requiring manual intervention. The system autonomously determines parameters from developer input, maps them to the code base, and retrieves relevant code blocks, transforming the IDE from a passive syntax checker to an active intelligent assistant that expedites coding activities

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system replaces the mechanical, manual process of code writing and searching with an intelligent automated system. Instead of developers manually typing code or searching through references, the system uses parameter determination, mapping, and retrieval mechanisms to automatically suggest complete code blocks, thereby enhancing both ease of operation and coding efficiency

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

3Reliability

If developers refer to existing code base only when similar code is available, then tested code can be reused, but developers miss opportunities to reuse applicable code blocks due to lack of intelligent detection

Engineering Contradiction:
Improvecode reusabilityVSAvoidapplicable code blocks
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The system implements feedback by continuously monitoring developer input, determining relevant parameters, and comparing them against the reference model of existing code blocks. This feedback loop enables the system to identify applicable code blocks that match the developer's current coding context, even when the developer does not explicitly search for them, thereby preventing loss of information about reusable code while maintaining reliability through parameter-based matching

Inventive Principle:
Principle #23Feedback

4Measurement precision

If analytical tools perform static analysis of existing code base, then code metrics can be suggested, but real-time assistance during coding is not provided

Engineering Contradiction:
Improvecode analysisVSAvoidruntime assistance
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system transforms static code analysis into a dynamic real-time assistance mechanism. Instead of performing analysis only on existing code bases offline, the system dynamically adapts to developer input during coding, determining parameters from current code context, and providing real-time suggestions. This dynamic approach maintains measurement precision through parameter determination and mapping while eliminating the time loss associated with offline-only analysis tools

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10235141B2Method and system for providing source code suggestion to a user in real-time
Publication Date: 2019.03.19 HCL TECH LTD
  • US10235141B2 patent drawing
  • US10235141B2 patent drawing
  • US10235141B2 patent drawing

AI summary

Disclosed is a system for providing source code suggestion to a user in real-time. A mining module mines source code information, pre-stored in a source code repository, to create a reference model. A code receiving module receives input lines of code from a user, via a User Interface, in real-time. A mapping module maps the one or more parameters with the metadata corresponding to each source code block stored in the reference model. A code suggestion module identifies one or more target source code blocks from the plurality of source code blocks. The code suggestion module suggests at least one target source code block, of the one or more target source code blocks, to be populated in the input lines of code thereby providing the source code suggestion to a user in real-time.