if (option.equals("-sortByClass"))
if (option.equals("-low")) lowestPriorityReported = Detector.LOW_PRIORITY; else if (option.equals("-medium")) lowestPriorityReported = Detector.NORMAL_PRIORITY; else if (option.equals("-high")) lowestPriorityReported = Detector.HIGH_PRIORITY; else if (option.equals("-sortByClass"))
  public static void main(String argv[]) throws Exception  { 	BugReporter bugReporter = null;	boolean quiet = false;	String filterFile = null;	boolean include = false;	HashMap<String, String> classNameToSourceFileMap = new HashMap<String, String>();	// Process command line options	int argCount = 0;	while (argCount < argv.length) {		String option = argv[argCount];		if (!option.startsWith("-"))			break;		if (option.equals("-sortByClass"))			bugReporter = new SortingBugReporter();		else if (option.equals("-xml"))			bugReporter = new XMLBugReporter(classNameToSourceFileMap);		else if (option.equals("-visitors") || option.equals("-omitVisitors")) {			++argCount;			if (argCount == argv.length) throw new IllegalArgumentException(option + " option requires argument");			boolean omit = option.equals("-omitVisitors");			if (!omit) {				// Selecting detectors explicitly, so start out by				// disabling all of them.  The selected ones will				// be re-enabled.				Iterator<DetectorFactory> factoryIter =					DetectorFactoryCollection.instance().factoryIterator();				while (factoryIter.hasNext()) {					DetectorFactory factory = factoryIter.next();					factory.setEnabled(false);				}			}			// Explicitly enable or disable the selector detectors.			StringTokenizer tok = new StringTokenizer(argv[argCount], ",");			while (tok.hasMoreTokens()) {				String visitorName = tok.nextToken();				DetectorFactory factory = DetectorFactoryCollection.instance().getFactory(visitorName);				if (factory == null)					throw new IllegalArgumentException("Unknown detector: " + visitorName);				factory.setEnabled(!omit);			}		} else if (option.equals("-exclude") || option.equals("-include")) {			++argCount;			if (argCount == argv.length) throw new IllegalArgumentException(option + " option requires argument");			filterFile = argv[argCount];			include = option.equals("-include");		} else if (option.equals("-quiet")) {			quiet = true;		} else			throw new IllegalArgumentException("Unknown option: " + option);		++argCount;	}	if (argCount == argv.length) {		InputStream in = FindBugs.class.getClassLoader().getResourceAsStream("USAGE");		if (in == null)  {			System.out.println("FindBugs tool, version " + Version.RELEASE);			System.out.println("usage: java -jar findbugs.jar [options] <classfiles, zip files or jar files>");			System.out.println("Example: java -jar findbugs.jar rt.jar");			System.out.println("Options:");			System.out.println("   -quiet                                 suppress error messages");			System.out.println("   -sortByClass                           sort bug reports by class");			System.out.println("   -xml                                   XML output");			System.out.println("   -visitors <visitor 1>,<visitor 2>,...  run only named visitors");			System.out.println("   -omitVisitors <v1>,<v2>,...            omit named visitors");			System.out.println("   -exclude <filter file>                 exclude bugs matching given filter");			System.out.println("   -include <filter file>                 include only bugs matching given filter");			}		else			IO.copy(in,System.out);		return;		}	if (bugReporter == null)		bugReporter = new PrintingBugReporter();	if (quiet)		bugReporter.setErrorVerbosity(BugReporter.SILENT);	FindBugs findBugs = new FindBugs(bugReporter, classNameToSourceFileMap);	if (filterFile != null)		findBugs.setFilter(filterFile, include);	String[] fileList = new String[argv.length - argCount];	System.arraycopy(argv, argCount, fileList, 0, fileList.length);	findBugs.execute(fileList);  }