Automated Patch Selection Module for APR Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional Automatic Program Repair (APR) systems are inefficient as they require users to manually select from multiple patches, leading to a need for an automated method to determine the most efficient patch among candidates.

Innovation Solution

A method and module that generate and evaluate patches based on code change rate, code complexity, and context similarity, selecting and outputting the patch with the highest final score, which includes calculating scores for code change rate, code complexity, and context similarity to automatically determine the most suitable patch.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If multiple patches are presented to the user for selection, then the user has more options to choose from, but the efficiency of the APR system decreases due to manual selection requirements

Engineering Contradiction:
Improvepatch selection optionsVSAvoidAPR system efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The system automatically evaluates and ranks patches using multiple criteria (code change rate, code complexity, context similarity) without requiring user intervention. The patch selection module autonomously determines the most suitable patch by calculating scores and comparing them against predefined thresholds, enabling the system to serve itself in the selection process.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The invention transforms the patch selection process by changing evaluation parameters from simple generation to multi-dimensional scoring. It introduces specific parameters (code change rate, code complexity, context similarity) and their corresponding weights to quantitatively assess patches, converting a subjective manual selection into an objective automated evaluation based on parameter optimization.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If automated patch selection is implemented, then system efficiency improves, but the complexity of the selection module increases

Engineering Contradiction:
Improvepatch selection efficiencyVSAvoidselection module complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The selection module is divided into distinct functional components: a calculation unit that computes individual scores for each patch based on multiple criteria, and a determination unit that ranks patches based on these scores. This segmentation allows the complex selection process to be broken down into manageable, modular operations that can be independently optimized and maintained.

Inventive Principle:
Principle #1Segmentation

3Measurement precision

If multiple evaluation criteria are used for patch selection, then the accuracy of patch selection improves, but the calculation time and processing complexity increase

Engineering Contradiction:
Improvepatch evaluation accuracyVSAvoidpatch evaluation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system calculates scores for multiple patches simultaneously using parallel evaluation of the three criteria (code change rate, code complexity, context similarity). By performing partial evaluations in parallel and using weighted scoring, it achieves comprehensive assessment without sequentially processing each criterion for every patch, thereby reducing total evaluation time while maintaining accuracy.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11822915B2Method for selecting the last patch from among a plurality patches for same location and the last patch selection module
Publication Date: 2023.11.21 SURESOFT TECH
  • US11822915B2 patent drawing
  • US11822915B2 patent drawing

AI summary

A method of selecting a last patch from among a plurality of patches for a same location according to an embodiment of this invention includes generating a plurality of patches for a same location in a program; calculating a final score based on a code change rate, a code complexity, and a context similarity for each of the plurality of patches.