Automated Software Bug Repair Using Fuzz Testing and Genetic Algorithms

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for detecting and repairing software bugs are costly and require significant development team input, especially when the original developer is no longer available to maintain the software, and there is a need for automated solutions to address bugs without user intervention.

Innovation Solution

A system using a fuzz tester to identify initial test variables that cause faulty responses in a computer program, which are then used by a genetic algorithm to modify and select functionally equivalent computer program candidates, automatically repairing bugs without requiring development team input.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional bug detection and repair methods are used, then bugs can be detected, but significant development team input and costs are required

Engineering Contradiction:
Improvebug detection capabilityVSAvoidautomated repair capability
Core Design Contradiction:
ReliabilityVSExtent of automation

Solution Approach 1:

The system enables software to self-diagnose and self-repair bugs through automated fuzz testing and genetic algorithm-based patch generation, eliminating the need for human development team intervention in the repair process

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical human debugging process with an automated computational system that uses fuzz testers to detect bugs and genetic algorithms to generate and evaluate repair patches

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

2Reliability

If manual debugging processes are used, then bugs can be repaired, but significant time and resources are consumed

Engineering Contradiction:
Improvesoftware correctnessVSAvoidtime to detect and repair bugs
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary automated testing and patch generation before human intervention is needed, continuously scanning for bugs and preparing repair solutions in advance

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The genetic algorithm systematically varies program parameters and code structures to explore different repair solutions, efficiently searching the solution space to find working patches

Inventive Principle:
Principle #35Parameter changes

3Reliability

If development team resources are required for bug repair, then bugs can be fixed, but costs increase significantly

Engineering Contradiction:
Improvebug repair capabilityVSAvoidcost of software maintenance
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The automated system performs bug detection and repair independently without requiring expensive human development resources, making maintenance accessible even for legacy software

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system creates and evaluates multiple candidate patches through genetic algorithms, selecting the best repair solution without requiring human analysis of each option

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11080179B2Device, system, and method for automatically detecting and repairing a bug in a computer program using a genetic algorithm
Publication Date: 2021.08.03 THE UNITED STATES OF AMERICA AS REPRESENTED BY THE SECRETARY OF THE NAVY
  • US11080179B2 patent drawing
  • US11080179B2 patent drawing
  • US11080179B2 patent drawing

AI summary

An initial test variable determined by a fuzz tester to cause a faulty response of an original computer program due to a bug within the original computer program is added to a suite of test variables. Computer program candidates that are functionally equivalent to the original computer program are tested using a suite of test variables including the initial test variable. The computer program candidates are modified and selected using a genetic algorithm based on results of the testing to produce bug-free computer program candidates that are functionally equivalent to the original computer program.