IEEE Access (Jan 2019)
Detecting Defects Based on Mining and Confirming Programming Patterns From Different Versions of Projects
Abstract
Many implied programming patterns are contained in large-scale software. Most of the implied programming patterns are missing proper documentation. Defects would be brought into the software, if any of the patterns is violated by programmers. To alleviate this problem, many works are proposed to find defects by mining programming patterns from the software. However, a great many of candidate patterns and defects are reported by these approaches. These patterns and defects need to be manually confirmed, and the applicability and scalability of these approaches are restricted by this problem. In view of this problem, this paper proposes an approach to automated mining, confirming, filtering function call sequence patterns (FCSPs), and detecting defects which violate the patterns. At first, FCSPs are mined from a previous stable version and an update version under analyzing, respectively; then, the FCSPs are confirmed by analyzing correlations; after that, useful FCSPs are filtered with respect to the FCSPs mined from the previous version; finally, the version under analyzing is scanned for suspicious defects against the filtered FCSPs. 3 open source projects are selected as the experimental subjects to evaluate the approach. As the experimental result shows, the efficiency of defect detection is improved by the proposed approach. It confirms programming candidate FCSPs with 82% F1-measure and 77% accuracy, and eliminates 55% suspicious defects without sacrificing the performance.
Keywords