findBugs.setTrainingMode(trainingMode);
if (trainingOutputDir != null) { findBugs.enableTrainingOutput(trainingOutputDir); } if (trainingInputDir != null) { findBugs.enableTrainingInput(trainingInputDir); }
		public FindBugs createEngine() throws IOException, FilterException {			TextUIBugReporter textuiBugReporter = null;			switch (bugReporterType) {			case PRINTING_REPORTER:				textuiBugReporter = new PrintingBugReporter();				break;			case SORTING_REPORTER:				textuiBugReporter = new SortingBugReporter();				break;			case XML_REPORTER:				{					XMLBugReporter xmlBugReporter = new XMLBugReporter(project);					xmlBugReporter.setAddMessages(xmlWithMessages);					textuiBugReporter = xmlBugReporter;				}				break;			case EMACS_REPORTER:				textuiBugReporter = new EmacsBugReporter();				break;			case HTML_REPORTER:				textuiBugReporter = new HTMLBugReporter(project, stylesheet);				break;			case XDOCS_REPORTER:				textuiBugReporter = new XDocsBugReporter(project);				break;			default:				throw new IllegalStateException();			}			if (quiet)				textuiBugReporter.setErrorVerbosity(BugReporter.SILENT);			textuiBugReporter.setPriorityThreshold(priorityThreshold);			if (outputStream != null)				textuiBugReporter.setOutputStream(outputStream);			BugReporter bugReporter = textuiBugReporter;			if (bugCategorySet != null) {				bugReporter = new CategoryFilteringBugReporter(bugReporter, bugCategorySet);			}			FindBugs findBugs = new FindBugs(bugReporter, project);						findBugs.setUserPreferences(userPreferences);			if (filterFile != null)				findBugs.setFilter(filterFile, include);			findBugs.setClassScreener(classScreener);						findBugs.setRelaxedReportingMode(relaxedReportingMode);			findBugs.setTrainingMode(trainingMode);			return findBugs;		}