Software Repair Explanation Generation via Template Library
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Automated repair systems for software programs often provide repairs without explanations, making it difficult for users to understand the nature and purpose of the changes made, leading to potential rejection or improper implementation of the repairs.
Innovation Solution
A computing system is configured to analyze repairs and generate natural language explanations using an explanation template library, determining the change type of edits and providing meaningful explanations that detail the changes made, thereby improving the understanding and acceptance of repairs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If automated repair systems provide only edit listings without explanations, then the system complexity is reduced and processing speed is improved, but user understanding and acceptance of repairs deteriorates
Solution Approach 1:
The patent introduces an explanation template library as an intermediary component between the automated repair system and the user. This library contains pre-defined templates that describe common repair patterns in natural language. When a repair is generated, the system selects appropriate templates to explain the edits, providing users with meaningful context without requiring the system to generate complex explanations from scratch. This resolves the contradiction by adding a manageable intermediary layer that enhances user understanding while controlling system complexity.
Solution Approach 2:
The patent changes the parameter of explanation depth by introducing configurable explanation levels. Instead of always providing detailed explanations, the system can adjust the amount and type of information provided based on user needs and context. This allows the system to balance between providing sufficient understanding and avoiding excessive complexity, resolving the contradiction by making the explanation parameter adjustable rather than fixed.
2Reliability
If detailed natural language explanations are generated for each repair, then user understanding and acceptance improve, but processing time and computational resources increase
Solution Approach 1:
The patent applies preliminary action by pre-defining explanation templates for common repair patterns before actual repairs are generated. These templates contain natural language descriptions of typical fixes, such as 'The method changes the condition from A to B to fix the bug'. When a repair is generated, the system simply matches it to the appropriate pre-defined template rather than generating explanations from scratch. This resolves the time contradiction by performing the explanatory work in advance and reusing it, significantly reducing processing time while maintaining detailed explanations.
Solution Approach 2:
The patent uses copying by replicating proven explanation patterns from the template library for similar repair scenarios. Instead of creating unique explanations for each repair, the system copies and adapts templates that have been validated for specific repair types. This approach maintains high repair acceptance by providing consistent, high-quality explanations while minimizing computational overhead through template reuse rather than generation.
3Loss of information
If comprehensive explanations of all edits are provided, then completeness of information is improved, but readability and ease of comprehension deteriorates due to information overload
Solution Approach 1:
The patent applies segmentation by dividing the repair explanation into distinct, organized sections. Each explanation template is structured to present information in logical segments such as the problem description, the specific change made, and the expected outcome. This segmentation allows comprehensive information to be presented in a structured, digestible format that maintains readability while ensuring completeness, resolving the contradiction between providing all necessary information and keeping it easy to understand.
Solution Approach 2:
The patent applies local quality by providing different levels of explanation detail for different parts of the repair based on their importance and complexity. Critical changes receive more detailed explanations, while minor or obvious changes receive simpler descriptions. The explanation templates are designed to highlight the most important aspects of each repair locally, ensuring that users get comprehensive information where needed without being overwhelmed by unnecessary details throughout, thus maintaining both completeness and readability.
Data Source
AI summary
Operations may include obtaining a repair related to correcting an error of source code of a software program, the repair including an edit to make to the source code. The operations may further include determining a change type of the edit. The operations may additionally include identifying an explanation template from a library of explanation templates based on the change type corresponding to the explanation template in the library of explanation templates. In addition, the operations may include generating a change explanation for the edit based on the explanation template. The change explanation may provide a natural language explanation of the changes made by the edit.


