Automated Software Repair Candidate Prioritization via Code Pattern Frequency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Automated software repair systems often fail to effectively select and prioritize repair candidates for faults in software programs, leading to inefficient correction of bugs.
Innovation Solution
A method that identifies fault locations in software programs using test suites, obtains repair candidates, determines the number of occurrences of repair code patterns in existing software programs, and prioritizes these candidates based on their frequency in a common code pattern database, thereby selecting and applying the most effective repairs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If automated repair systems use traditional methods to identify and correct faults, then repair operations can be performed, but the selection of repair candidates is ineffective and inefficient
Solution Approach 1:
The system performs preliminary analysis by collecting repair code patterns from multiple existing software programs before selecting repair candidates. This pre-processing of repair patterns from a code repository enables the system to evaluate and prioritize candidates based on their frequency and effectiveness in real-world codebases, rather than selecting repairs randomly or based on simple heuristics.
Solution Approach 2:
The system uses feedback from the code repository containing repair patterns from existing software programs to evaluate and prioritize repair candidates. By analyzing how often certain repair patterns appear in successful software code, the system can determine which candidates are most likely to be effective, creating a feedback loop that improves repair selection accuracy.
2Adaptability or versatility
If repair candidates are selected without prioritization based on code pattern frequency, then all candidates can be considered, but the repair process becomes inefficient
Solution Approach 1:
The system applies local quality by prioritizing repair candidates based on their specific code pattern frequency in the repository. Instead of treating all candidates equally, it identifies which candidates have higher-quality patterns (more frequent in existing code) and prioritizes those, allowing the system to consider a wide range of candidates while efficiently focusing on the most promising ones.
Solution Approach 2:
The system changes the selection parameter from uniform consideration to frequency-based prioritization. By using the occurrence frequency of repair code patterns as a prioritization criterion, the system transforms the candidate selection process to favor repairs that have been proven effective in similar contexts, reducing the time needed to identify successful repairs.
Data Source
AI summary
According to an aspect of an embodiment, a method may identifying a fault location of a fault in a tested software program using a test suite and obtaining a repair candidate for the fault. In addition, the method may include obtaining a repair code pattern of the repair candidate and determining a number of occurrences of the repair code pattern in existing code of multiple existing software programs. Moreover, the method may include prioritizing the repair candidate as a repair of the tested software program based on the number of occurrences of the repair code pattern. The method may also include performing repair operations on the tested software program according to the prioritizing of the repair candidate.


