NEGWeb: Static defect detection via searching billions of lines of open source code
Suresh Thummalapenta, Tao Xie · NCSU Libraries Repository (North Carolina State University Libraries) · 2007
To find defects in programs, existing approaches mine programming rules as common patterns out of program source code and classify defects as violations of these mined programming rules.However, these existing approaches often cannot surface out many programming rules as common patterns because these approaches mine patterns from only one or a few project code bases.To better support static bug finding based on mining code, we develop a novel framework, called NEGWeb, for substantially expanding the mining scope to billions of lines of open source code based on a code search engine.NEGWeb detects violations related to neglected conditions around individual API calls.We evaluated NEGWeb to detect violations in local code bases or open source code bases.In our evaluation, we show that NEGWeb finds three real defects in Java code reported in the literature and also finds three previously unknown defects in a large-scale open source project called Columba (91, 508 lines of Java code) that reuses 2225 APIs.We also report a high percentage of real rules among the top 25 reported patterns mined for five popular open source applications.