if (loaded) throw new IllegalStateException(); loaded = true;
	void loadPlugins() {		// Load all detector plugins.			//If we are running under jaws, just use the loaded plugin	    if (SystemProperties.getBoolean("findbugs.jaws")) {			URL u = DetectorFactoryCollection.class.getResource("/findbugs.xml");			// JOptionPane.showMessageDialog(null, "Loading plugin from " + u);		    URL[] plugins = new URL[1];		    if (u != null) {		    	String path = u.toString();		    	path = path.substring(0, path.length() - "findbugs.xml".length());		        if (FindBugs.DEBUG) System.out.println("Jaws uses plugin: " + path);		        try {					plugins[0] = new URL(path);									} catch (MalformedURLException e) {					throw new RuntimeException(e);				}		        setPluginList(plugins);		    		    }		}			    determinePlugins();		int numLoaded = 0;		for (final URL url : pluginList) {			try {				if (FindBugs.DEBUG) System.out.println("Loading plugin: " + url.toString());				PluginLoader pluginLoader =					AccessController.doPrivileged(new PrivilegedExceptionAction<PluginLoader>() {						public PluginLoader run() throws PluginException {							return	new PluginLoader(url, this.getClass().getClassLoader());						}											});							Plugin plugin = pluginLoader.getPlugin();				pluginByIdMap.put(plugin.getPluginId(), plugin);				// Register all of the detectors that this plugin contains				for (Iterator<DetectorFactory> j = plugin.detectorFactoryIterator();				     j.hasNext();) {					DetectorFactory factory = j.next();					registerDetector(factory);				}				I18N i18n = I18N.instance();				// Register the BugPatterns				for (Iterator<BugPattern> j = plugin.bugPatternIterator(); j.hasNext();) {					BugPattern bugPattern = j.next();					i18n.registerBugPattern(bugPattern);				}				// Register the BugCodes				for (Iterator<BugCode> j = plugin.bugCodeIterator(); j.hasNext();) {					BugCode bugCode = j.next();					i18n.registerBugCode(bugCode);				}				++numLoaded;			} catch (PluginException e) {				System.err.println("Warning: could not load plugin " + url + ": " + e.toString());				if (FindBugs.DEBUG)					e.printStackTrace();			} catch (PrivilegedActionException e) {				System.err.println("Warning: could not load plugin " + url + ": " + e.toString());				if (FindBugs.DEBUG)					e.printStackTrace();			}		}					//System.out.println("Loaded " + numLoaded + " plugins");	}