Package edu.umd.cs.findbugs
Class QueryBugAnnotations
java.lang.Object
edu.umd.cs.findbugs.QueryBugAnnotations
Search for bug instances whose text annotations contain one of a set of
keywords.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addKeyword
(String keyword) Add a keyword to the query.protected abstract void
match
(BugInstance bugInstance, String filename) Called when a bug instance contains a query keyword.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.void
Scan bug instances contained in given file, reporting those whose text annotations contain at least one of the keywords in the query.
-
Constructor Details
-
QueryBugAnnotations
public QueryBugAnnotations()
-
-
Method Details
-
addKeyword
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
-
scan
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- Throws:
Exception
-
scan
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 collectionfilename
- the XML file from which the bug collection was read- Throws:
Exception
-
match
Called when a bug instance contains a query keyword.- Parameters:
bugInstance
- the bug instance containing the keywordfilename
- name of the file containing the bug instance- Throws:
Exception
-