private static Set<String> handleBugCategories(UserPreferences userPreferences, String categories) {
static Set<String> handleBugCategories(UserPreferences userPreferences, String categories) {
	private static Set<String> handleBugCategories(UserPreferences userPreferences, String categories) {		// Parse list of bug categories		Set<String> categorySet = new HashSet<String>();		StringTokenizer tok = new StringTokenizer(categories, ",");		while (tok.hasMoreTokens()) {			categorySet.add(tok.nextToken());		}//		// Enable only those detectors that can emit those categories//		// (and the ones that produce unknown bug patterns, just to be safe).//		// Skip disabled detectors, though.//		for (Iterator<DetectorFactory> i = DetectorFactoryCollection.instance().factoryIterator(); i.hasNext();) {//			DetectorFactory factory = i.next();//			if (!factory.isEnabledForCurrentJRE())//				continue;//			Collection<BugPattern> reported = factory.getReportedBugPatterns();//			boolean enable = false;//			if (reported.isEmpty()) {//				// Don't know what bug patterns are produced by this detector//				if (DEBUG) System.out.println("Unknown bug patterns for " + factory.getShortName());//				enable = true;//			} else {//				for (Iterator<BugPattern> j = reported.iterator(); j.hasNext();) {//					BugPattern bugPattern = j.next();//					if (categorySet.contains(bugPattern.getCategory())) {//						if (DEBUG)//							System.out.println("MATCH ==> " + categorySet +//							        " -- " + bugPattern.getCategory());//						enable = true;//						break;//					}//				}//			}//			if (DEBUG && enable) {//				System.out.println("Enabling " + factory.getShortName());//			}//			userPreferences.enableDetector(factory, enable);//		}		return categorySet;	}