4.6 Article

Inferring Bug Signatures to Detect Real Bugs

Journal

IEEE TRANSACTIONS ON SOFTWARE ENGINEERING
Volume 48, Issue 2, Pages 571-584

Publisher

IEEE COMPUTER SOC
DOI: 10.1109/TSE.2020.2996975

Keywords

Computer bugs; Tools; Benchmark testing; Software; Manuals; History; Sun; Bug fix; bug signature; partial code analysis

Funding

  1. National Key R&D Program of China [2018YFC083050]
  2. NSF [CCF1846467, HRD-C-SPECC 1736209]

Ask authors/readers for more resources

Current static bug detection tools based on manual bug patterns have limitations in detecting all types of bugs. This study introduces a new approach, DePa, which extracts bug signatures from accurate partial-code analysis of bug fixes. Evaluation on 6,048 past bug fixes from four Apache projects demonstrates that DePa detected 27 unique previously unknown bugs, with three already confirmed and repaired by developers.
Static tools like Findbugs allow their users to manually define bug patterns, so they can detect more types of bugs, but due to the complexity and variety of programs, it is difficult to manually enumerate all bug patterns, especially for those related to API usages or project-specific rules. Therefore, existing bug-detection tools (e.g., Findbugs) based on manual bug patterns are insufficient in detecting many bugs. Meanwhile, with the rapid development of software, many past bug fixes accumulate in software version histories. These bug fixes contain valuable samples of illegal coding practices. The gap between existing bug samples and well-defined bug patterns motivates our research. In the literature, researchers have explored techniques on learning bug signatures from existing bugs, and a bug signature is defined as a set of program elements explaining the cause/effect of the bug. However, due to various limitations, existing approaches cannot analyze past bug fixes in large scale, and to the best of our knowledge, no previously unknown bugs were ever reported by their work. The major challenge to automatically analyze past bug fixes is that, bug-inducing inputs are typically not recorded, and many bug fixes are partial programs that have compilation errors. As a result, for most bugs in the version history, it is infeasible to reproduce them for dynamic analysis or to feed buggy/fixed code directly into static analysis tools which mostly depend on compilable complete programs. In this paper, we propose an approach, called DePa, that extracts bug signatures based on accurate partial-code analysis of bug fixes. With its support, we conduct the first large scale evaluation on 6,048 past bug fixes collected from four popular Apache projects. In particular, we use DePa to infer bug signatures from these fixes, and to check the latest versions of the four projects with the inferred bug signatures. Our results show that DePa detected 27 unique previously unknown bugs in total, including at least one bug from each project. These bugs are not detected by their developers nor other researchers. Among them, three of our reported bugs are already confirmed and repaired by their developers. Furthermore, our results show that the state-of-the-art tools detected only two of our found bugs, and our filtering techniques improve our precision from 25.5 to 51.5 percent.

Authors

I am an author on this paper
Click your name to claim this paper and add it to your profile.

Reviews

Primary Rating

4.6
Not enough ratings

Secondary Ratings

Novelty
-
Significance
-
Scientific rigor
-
Rate this paper

Recommended

No Data Available
No Data Available