if (contentList[i].getName().endsWith(".jar"))
if (contentList[i].getName().endsWith(".jar")) { if (FindBugs.DEBUG) System.out.println("Found plugin: " + contentList[i].toString());
	private void loadPlugins() {		// Load all detector plugins.			if (pluginList == null) {			String homeDir = FindBugs.getHome();			File pluginDir = new File(homeDir + File.separator + "plugin");			File[] contentList = pluginDir.listFiles();			if (contentList == null) {				System.err.println("Error: The path " + pluginDir.getPath() + " does not seem to be a directory!");				System.err.println("No FindBugs plugins could be loaded");				pluginList = new File[0];				return;			}			ArrayList<File> arr = new ArrayList<File>();			for (int i = 0; i < contentList.length; ++i) {				if (contentList[i].getName().endsWith(".jar"))					arr.add(contentList[i]);			}			pluginList = (File[]) arr.toArray(new File[arr.size()]);		}		int numLoaded = 0;		for (int i = 0; i < pluginList.length; ++i) {			File file = pluginList[i];			try {				URL url = file.toURL();				PluginLoader pluginLoader = new PluginLoader(url, this.getClass().getClassLoader());					// Register all of the detectors that this plugin contains				DetectorFactory[] detectorFactoryList = pluginLoader.getDetectorFactoryList();				for (int j = 0; j < detectorFactoryList.length; ++j)					registerDetector(detectorFactoryList[j]);				I18N i18n = I18N.instance();					// Register the BugPatterns				BugPattern[] bugPatternList = pluginLoader.getBugPatternList();				for (int j = 0; j < bugPatternList.length; ++j)					i18n.registerBugPattern(bugPatternList[j]);					// Register the BugCodes				BugCode[] bugCodeList = pluginLoader.getBugCodeList();				for (int j = 0; j < bugCodeList.length; ++j)					i18n.registerBugCode(bugCodeList[j]);				++numLoaded;			} catch (Exception e) {				System.err.println("Warning: could not load plugin " + file.getPath() + ": " + e.toString());			}		}			//System.out.println("Loaded " + numLoaded + " plugins");	}