Dynamic Code Snippet Promotion via Intelligent Scoring

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software developers face inefficiencies in manually searching through numerous code repositories to find relevant, high-quality code snippets that match their coding intentions, limiting their ability to locate the best fitting code snippets and assess their integration quality.

Innovation Solution

A dynamic code snippet promotion method that uses natural language processing and user project context analysis to search multiple code repositories, evaluate code snippets based on user-defined dimensions, and promote the highest scoring logical code blocks, automating the process to suggest relevant and high-quality code snippets.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If developers manually search through numerous code repositories to find relevant code snippets, then they can access a wide range of code examples, but the time and effort required to locate high-quality snippets increases significantly

Engineering Contradiction:
Improvenumber of code repositories searchedVSAvoidtime to locate code snippets
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The system enables self-service by automatically searching multiple code repositories, evaluating code snippets against coding intentions, and promoting high-quality snippets without requiring manual intervention from developers. The intelligent code snippet promotion system performs the search and evaluation tasks autonomously, saving developer time while maintaining access to numerous repositories.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the manual mechanical process of searching and evaluating code snippets with an automated intelligent system. The system uses coding intention analysis, property extraction, and scoring mechanisms to automatically identify and promote relevant code snippets, substituting human effort with computational processes.

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

2Reliability

If developers manually evaluate code snippets for quality and relevance, then they can assess integration quality, but the complexity and effort of the evaluation process increases

Engineering Contradiction:
Improvequality assessment of code snippetsVSAvoidevaluation process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system introduces an intermediary intelligent evaluation mechanism that acts as a mediator between code repositories and developers. This intermediary automatically extracts properties, evaluates code snippets against coding intentions, and scores snippets based on multiple criteria, simplifying the evaluation process while maintaining reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent transforms the complex qualitative evaluation process into quantifiable parameters and scores. By defining specific properties (e.g., relevance, quality, maintainability) and assigning numerical scores based on coding intentions and user feedback, the system converts subjective assessment into objective, automated evaluation.

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If the system promotes code snippets based on multiple properties and dimensions, then the relevance and quality of promoted snippets improves, but the computational complexity of scoring increases

Engineering Contradiction:
Improvescoring accuracy of code snippetsVSAvoidscoring system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The scoring system is segmented into multiple independent evaluation dimensions (e.g., relevance to coding intention, code quality, maintainability, user feedback). Each dimension is evaluated separately based on specific properties, allowing the system to maintain measurement precision while managing complexity through modular, independent scoring criteria.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11836469B2Dynamic code snippet promotion
Publication Date: 2023.12.05 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11836469B2 patent drawing
  • US11836469B2 patent drawing
  • US11836469B2 patent drawing

AI summary

Aspects include determining a coding intention and a dimension of interest to a user. A plurality of relevant projects that each include a logical code block that meets the coding intention are located. The locating includes searching a plurality of code repositories based at least in part on the coding intention. A score is assigned to each of the plurality of logical code blocks based at least in part on properties associated with the logical code blocks and on the dimension of interest to the user. A logical code block with the highest score is promoted to the user.