# US 8,578,342 B2 · Fault detection and localization in dynamic software applications requiring user inputs and persistent states

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,578,342 B2
- Document ID: US8578342B2
- Status: Granted
- Kind: B2
- Application number: 12/502,562
- Filed: 2009-07-14
- Published: 2011-01-20
- Granted: 2013-11-05
- Earliest claimed: 2009-07-14
- Assignees: International Business Machines Corporation
- Applicants: Shay Artzi; Julian Dolby; Frank Tip
- Inventors: Shay Artzi; Julian Dolby; Frank Tip
- Web page: https://patentgrep.com/patent/US8578342B2

## CPC

- G06F 11/3692: {for test results analysis}
- G06F 9/454: {Multi-language systems; Localisation; Internationalisation}
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 21/51: at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
- G06F 2221/2119: Authenticating web pages, e.g. with suspicious links
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention provides a system, computer program product and a computer implemented method for prioritizing code fragments based on the use of a software oracle and on a correlation between the executed code fragments and the output they produce. Also described is a computer-implemented method generates additional user inputs based on execution information associated with path constraints and based on information from the oracle. Advantageously, the embodiment is useful in a test generation tool that generated many similar inputs when a failure-inducing input is found, in order to enhance fault localization. Further, described is a computer-implemented flow for extending the existing idea of concolic testing to applications that interact with persistent state.

## Claims

### Claim 1

A computer-implemented method for analyzing an application comprising a plurality of code fragments, and where the application requires user input and interacts with persistent state, the computer-implemented method comprising:
generating an initial input and persistent state of an environment in which at least a portion of the code fragments are executing, wherein the persistent state is a configuration of information in the environment that outlives an execution of the application;
executing the at least a portion of the code fragments that comprise the application with the initial input starting from the persistent state and associating execution information with the code fragments that have been executed;
recording usage of persistent state by the code fragments that have been executed;
examining at least one execution characteristics that these code fragments exhibited on execution; and
generating additional user inputs for the application based on the execution information associated with the fragments that have been executed, and based on the execution characteristics which have been examined, and the usage of persistent state that has been recorded.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, wherein the execution information associated with code fragments that have been executed consists of path constraints.

### Claim 3 (depends on 1)

The computer implemented method of claim 1, wherein the execution characteristics of the code fragments that have been executed is an output of the application, and an evaluation produced by an oracle corresponds to errors in at least one part of this output.

### Claim 4 (depends on 1)

The computer implemented method of claim 1, wherein the execution characteristics that the code fragments exhibited on execution is a creation of at least one new generated application.

### Claim 5 (depends on 4)

The computer implemented method of claim 4, wherein the examining of the execution characteristics involves performing a program analysis to detect security vulnerabilities in this generated application.

### Claim 6 (depends on 4)

The computer implemented method of claim 4, wherein the examining of the execution characteristics involves performing a program analysis to detect errors in this generated application.

### Claim 7 (depends on 1)

The computer implemented method of claim 1, wherein the execution characteristics that the code fragments exhibited on execution is a characteristic of performance of the code fragments that have been executed.

### Claim 8

A computer program product for analyzing an application comprising a plurality of code fragments, the computer program product comprising:
a storage medium readable by a computer system, the storage medium storing software programming instructions capable of performing with a processor programming code to carry out:
generating an initial input and persistent state of an environment in which at least a portion of the code fragments are executing, wherein the persistent state is a configuration of information in the environment that outlives an execution of the application;
executing the at least a portion of the code fragments that comprise the application with the initial input starting from the persistent state and associating execution information with the code fragments that have been executed;
recording usage of persistent state by the code fragments that have been executed;
examining at least one execution characteristics that these code fragments exhibited on execution; and
generating additional user inputs for the application based on the execution information associated with the fragments that have been executed, and based on the execution characteristics which have been examined, and the usage of persistent state that has been recorded.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the execution information associated with code fragments that have been executed consists of path constraints.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the execution characteristics of the code fragments that have been executed is an output of the application, and an evaluation produced by an oracle corresponds to errors in at least one part of this output.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the execution characteristics that the code fragments exhibited on execution is a creation of at least one new generated application.

### Claim 12 (depends on 11)

The computer program product of claim 11, wherein the examining of the execution characteristics involves performing a program analysis to detect security vulnerabilities in this generated application.

### Claim 13 (depends on 11)

The computer program product of claim 11, wherein the examining of the execution characteristics involves performing a program analysis to detect errors in this generated application.

### Claim 14 (depends on 8)

The computer program product of claim 8, wherein the execution characteristics that the code fragments exhibited on execution is a characteristic of performance of the code fragments that have been executed.

### Claim 15

A system for analyzing an application comprising a plurality of code fragments, the system comprising:
a computer processor, a monitor, and an input device;
a suitable storage medium for storing data and accessible by the computer processor; and
an initial input is generated and persistent state of an environment in which at least a portion of the code fragments are executing, wherein the persistent state is a configuration of information in the environment that outlives an execution of the application;
an execution unit for executing the at least a portion of the code fragments that comprise the application with the input starting from the persistent state and associating execution information with the code fragments that have been executed;
a recording unit for usage of persistent state by the code fragments that have been executed; and
additional user inputs generated for the application based on the execution information associated with the fragments that have been executed, and based on examining at least one execution characteristics that these code fragments exhibited on execution, and the usage of persistent state that has been recorded.

### Claim 16 (depends on 15)

The system of claim 15, wherein the execution information associated with code fragments that have been executed consists of path constraints.

### Claim 17 (depends on 15)

The system of claim 15, wherein the execution characteristics of the code fragments that have been executed is an output of the application, and an evaluation produced by an oracle corresponds to errors in at least one part of this output.

### Claim 18 (depends on 15)

The system of claim 15, wherein the execution characteristics that the code fragments exhibited on execution is a creation of at least one new generated application.

### Claim 19 (depends on 18)

The system of claim 18, wherein the examining of the execution characteristics involves performing a program analysis to detect security vulnerabilities in this generated application.

### Claim 20 (depends on 18)

The system of claim 18, wherein the examining of the execution characteristics involves performing a program analysis to detect errors in this generated application.
