/**
  * Enables or disables a FindBugs plugin.
  *
  * @param plugins
  * @param enabled
  */
 protected void enablePlugins(String pluginId, boolean enabled) {
   Plugin plugin = Plugin.getByPluginId(pluginId);
   if (plugin != null) {
     if (!enabled && plugin.cannotDisable()) {
       fail(
           "Cannot disable plugin: " + plugin.getPluginId() + '\n' + plugin.getShortDescription());
     } else {
       plugin.setGloballyEnabled(enabled);
     }
   }
 }
 private static void checkFBContribInstalled() {
   fb_contribInstalled = Plugin.getByPluginId("com.mebigfatguy.fbcontrib") != null;
   System.out.printf(
       "fb-contrib (com.mebigfatguy.fbcontrib) is %sinstalled%n",
       fb_contribInstalled ? "" : "not ");
 }
 private static void checkFindSecurityBugsInstalled() {
   findSecurityBugsInstalled = Plugin.getByPluginId("com.h3xstream.findsecbugs") != null;
   System.out.printf(
       "Find Security Bugs (com.h3xstream.findsecbugs) is %sinstalled%n",
       findSecurityBugsInstalled ? "" : "not ");
 }