FindBugs™ 1.3.9

edu.umd.cs.findbugs
Class QueryBugAnnotations

java.lang.Object
  extended by edu.umd.cs.findbugs.QueryBugAnnotations

public abstract class QueryBugAnnotations
extends java.lang.Object

Search for bug instances whose text annotations contain one of a set of keywords.


Constructor Summary
QueryBugAnnotations()
           
 
Method Summary
 void addKeyword(java.lang.String keyword)
          Add a keyword to the query.
protected abstract  void match(BugInstance bugInstance, java.lang.String filename)
          Called when a bug instance contains a query keyword.
 void scan(BugCollection bugCollection, java.lang.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(java.lang.String filename)
          Scan bug instances contained in given file, reporting those whose text annotations contain at least one of the keywords in the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryBugAnnotations

public QueryBugAnnotations()
Method Detail

addKeyword

public void addKeyword(java.lang.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

scan

public void scan(java.lang.String filename)
          throws java.lang.Exception
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:
java.lang.Exception

scan

public void scan(BugCollection bugCollection,
                 java.lang.String filename)
          throws java.lang.Exception
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
Throws:
java.lang.Exception

match

protected abstract void match(BugInstance bugInstance,
                              java.lang.String filename)
                       throws java.lang.Exception
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
Throws:
java.lang.Exception

FindBugs™ 1.3.9

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