PR-Miner: Automatically extracting implicit programming rules and detecting violations in large software code. Programs usually follow many implicit programming rules, most of which are too tedious to be documented by programmers. When these rules are violated by programmers who are unaware of or forget about them, defects can be easily introduced. Therefore, it is highly desirable to have tools to automatically extract such rules and also to automatically detect violations. Previous work in this direction focuses on simple function-pair based programming rules and additionally requires programmers to provide rule templates.This paper proposes a general method called PR-Miner that uses a data mining technique called frequent itemset mining to efficiently extract implicit programming rules from large software code written in an industrial programming language such as C, requiring little effort from programmers and no prior knowledge of the software. Benefiting from frequent itemset mining, PR-Miner can extract programming rules in general forms (without being constrained by any fixed rule templates) that can contain multiple program elements of various types such as functions, variables and data types. In addition, we also propose an efficient algorithm to automatically detect violations to the extracted programming rules, which are strong indications of bugs.Our evaluation with large software code, including Linux, PostgreSQL Server and the Apache HTTP Server, with 84K--3M lines of code each, shows that PR-Miner can efficiently extract thousands of general programming rules and detect violations within 2 minutes. Moreover, PR-Miner has detected many violations to the extracted rules. Among the top 60 violations reported by PR-Miner, 16 have been confirmed as bugs in the latest version of Linux, 6 in PostgreSQL and 1 in Apache. Most of them violate complex programming rules that contain more than 2 elements and are thereby difficult for previous tools to detect. We reported these bugs and they are currently being fixed by developers.

This software is also peer reviewed by journal TOMS.

References in zbMATH (referenced in 4 articles )

Showing results 1 to 4 of 4.
Sorted by year (citations)

  1. Wu, Qian; Liang, Guang-Tai; Wang, Qian-Xiang; Mei, Hong: Mining effective temporal specifications from heterogeneous API data (2011) ioport
  2. Hata, Hideaki; Mizuno, Osamu; Kikuno, Tohru: Fault-prone module detection using large-scale text features based on spam filtering (2010) ioport
  3. Lo, David; Khoo, Siau-Cheng; Wong, Limsoon: Non-redundant sequential rules-theory and algorithm (2009) ioport
  4. Han, Jiawei; Cheng, Hong; Xin, Dong; Yan, Xifeng: Frequent pattern mining: Current status and future directions (2007) ioport