edu.umd.cs.findbugs

Class QueryBugAnnotations

public abstract class QueryBugAnnotations extends Object

Search for bug instances whose text annotations contain one of a set of keywords.
Method Summary
voidaddKeyword(String keyword)
Add a keyword to the query.
protected abstract voidmatch(BugInstance bugInstance, String filename)
Called when a bug instance contains a query keyword.
voidscan(String filename)
Scan bug instances contained in given file, reporting those whose text annotations contain at least one of the keywords in the query.
voidscan(BugCollection bugCollection, String filename)
Scan bug instances contained in given bug collection, reporting those whose text annotations contain at least one of the keywords in the query.

Method Detail

addKeyword

public void addKeyword(String keyword)
Add a keyword to the query. A BugInstance's text annotation must contain at least one keyword in order to match the query.

Parameters: keyword the keyword

match

protected abstract void match(BugInstance bugInstance, String filename)
Called when a bug instance contains a query keyword.

Parameters: bugInstance the bug instance containing the keyword filename name of the file containing the bug instance

scan

public void scan(String filename)
Scan bug instances contained in given file, reporting those whose text annotations contain at least one of the keywords in the query.

Parameters: filename an XML file containing bug instances

scan

public void scan(BugCollection bugCollection, String filename)
Scan bug instances contained in given bug collection, reporting those whose text annotations contain at least one of the keywords in the query.

Parameters: bugCollection the bug collection filename the XML file from which the bug collection was read

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.