Natural Language Code Search Service Integration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software developers face challenges in finding relevant source code snippets efficiently, as existing tools often require switching between development environments and external resources, lacking comprehensive capabilities for completing programming tasks without leaving the development tool.

Innovation Solution

A natural language code search service that combines search engine and neural model-generated code snippets to provide idioms and frequently-used code patterns, using data mining techniques to detect and rank high-quality code snippets based on type usage and method/API invocations, enhancing the quality and relevance of search results.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If developers use existing software development tools, then they have basic code writing capabilities, but they cannot find relevant code snippets efficiently without switching to external resources

Engineering Contradiction:
Improvecode search capabilityVSAvoidtime spent searching for code
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent combines multiple code search sources (search engine results, neural model-generated code, frequent subtree mining results) into a unified search service that integrates directly within the development tool, eliminating the need to switch between external resources and reducing search time

Inventive Principle:
Principle #5Merging (Combining)

2Reliability

If developers review multiple external resources for code snippets, then they may find relevant code, but they spend considerable time switching between tools and resources

Engineering Contradiction:
Improvecode snippet relevanceVSAvoidtime spent reviewing resources
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the code search process into distinct components (search engine provider, neural model provider, frequent subtree mining) that operate in parallel and contribute different types of code snippets, which are then integrated and ranked to provide comprehensive yet efficient search results

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by pre-generating code snippets through neural models and frequent subtree mining before the actual search query, so that when a developer searches, relevant code is already prepared and immediately available, reducing wait time

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If developers use online documentation and forums for code information, then they can find usage examples, but they lack integrated capabilities within the development tool

Engineering Contradiction:
Improvecode information accessibilityVSAvoidnumber of tools to switch between
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent creates a universal code search service that can handle multiple types of code information needs (usage examples, implementation patterns, frequent idioms) through a single integrated interface within the development tool, replacing the need to switch between documentation, forums, and code repositories

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

Data Source

PatentEP4127905B1Natural language code search
Publication Date: 2024.08.28 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP4127905B1 patent drawingFigure 1
  • EP4127905B1 patent drawingFigure 2
  • EP4127905B1 patent drawingFigure 3

AI summary

A natural language code search service provides idioms or frequently-occurring code patterns for a code fragment based on similar type usage and method/API invocation usage. The search service uses a data mining technique that mines code snippets found from various websites and code snippets generated from a neural model to detect idioms in the code snippets that were previously unknown and which can be reused. A search is initiated through a natural language query within a code development tool or application thereby avoiding the need to switch out of the current application to perform the search.