Method and System for a Program-Analysis-Based Identification of Bug Introducing Code Changes
Publication Date: 2010-Aug-31
The IP.com Prior Art Database
A method and system for a program-analysis-based identification of bug-introducing code changes is disclosed.
Method and System for a Program -Analysis-Based Identification of Bug Introducing Code Changes
Disclosed is a method and system for automatically identifying bug-introducing code changes in a program. The method further includes using program-analysis techniques for determining semantics of code changes in order to identify bug introducing code changes.
During a lifecycle of a software system, several changes are made to the code for fixing bugs, adding new features and for re-factoring the code. However, some of these changes introduce bugs in the code (i.e., they are bug-introducing code changes). As a result, a significant amount of time is spent during a lifecycle of a software system for fixing bugs which are uncovered through various testing process and corrective maintenance procedures (bug-fix code changes). Information about bug-fix code changes is readily available through log messages or change categories in configuration management systems. However, information about bug-introducing code changes is rarely available because of the difficulty of computing the information. Further, the existing solutions for computing bug-introducing code changes are based on text analyses which have various drawbacks.
A method and system is proposed by the publication for automatically identifying bug introducing code changes in a program. Bugs are introduced into a program as a result of incorrect code, design and requirements. A deviance in program behavior (which a bug-fix is intended to correct) changes the semantics of the program behavior and causes incorrect flow of control or data in the program. Program-analysis techniques are employed for identifying differences in the dependences between a bug-fix version and a preceding version. As a result, the semantics of the changes associated with the bug-fix version and the preceding version are captured. Examples of program-analysis may include, control flow analysis, control-dependence analysis and data dependence analysis.
In response to identification of the differences in the dependences, a "bug region" is identified. Thereafter, a backward slice with respect to statements in the initial bug region is computed. In a scenario, a forward slice may also be computed with respect to statements in the initial bug region. Upon computing the backward slice, appropriate rules (or heuristics) are formulated for identifying bug introducing versions as shown in Fig. 1. Subsequent to identification of the bug introducing versions, a backward traversal in the code-revision history is carried out for identifying a version in which the bug region was established and consequently the bug was introduced. In a scenario, the bug regions may also be computed using dynamic analysis and path-sensitive analysis.
In a scenario, an intraprocedural algorithm as disclosed herein is utilized for identifying bug introducing code changes associated with a program for intraprocedural analys...