FindBugs™ 1.3.9

edu.umd.cs.findbugs
Class BugRanker

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

public class BugRanker
extends java.lang.Object

Bug rankers are used to compute a bug rank for each bug instance. Bug ranks 1-20 are for bugs that are visible to users. Bug rank 1 is more the most relevant/scary bugs. A bug rank greater than 20 is for issues that should not be shown to users. The following bug rankers may exist:

A bug ranker is comprised of a list of bug patterns, bug kinds and bug categories. For each, either an absolute or relative bug rank is provided. A relative rank is one preceeded by a + or -. For core bug detectors, the bug ranker search order is: For third party plugins, the bug ranker search order is: The overall search order is Search stops at the first absolute bug rank found, and the result is the sum of all of relative bug ranks plus the final absolute bug rank. Since all bug categories are defined by the core bug ranker, we should always find an absolute bug rank.

Author:
Bill Pugh

Field Summary
static java.lang.String ADJUST_FILENAME
           
static java.lang.String FILENAME
           
 
Constructor Summary
BugRanker(java.net.URL u)
           
 
Method Summary
static int findRank(BugInstance bug)
           
static int findRank(BugPattern pattern, int priority)
           
static int findRank(BugPattern pattern, Plugin plugin, int priority)
           
static int rankBug(BugInstance bug, BugRanker... rankers)
           
static void trimToMaxRank(BugCollection origCollection, int maxRank)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILENAME

public static final java.lang.String FILENAME
See Also:
Constant Field Values

ADJUST_FILENAME

public static final java.lang.String ADJUST_FILENAME
See Also:
Constant Field Values
Constructor Detail

BugRanker

public BugRanker(@CheckForNull
                 java.net.URL u)
          throws java.io.IOException
Parameters:
u - may be null. In this case, a default value will be used for all bugs
Throws:
java.io.IOException
Method Detail

rankBug

public static int rankBug(BugInstance bug,
                          BugRanker... rankers)

findRank

public static int findRank(BugInstance bug)

findRank

public static int findRank(BugPattern pattern,
                           Plugin plugin,
                           int priority)

findRank

public static int findRank(BugPattern pattern,
                           int priority)

trimToMaxRank

public static void trimToMaxRank(BugCollection origCollection,
                                 int maxRank)

FindBugs™ 1.3.9

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