diff options
author | Godin <mandrikov@gmail.com> | 2010-10-18 14:48:32 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-10-18 14:48:32 +0000 |
commit | 7e212fe31cf53def323428e7c7ac35938f4ca691 (patch) | |
tree | e5a5ef30b1ab964a09557659f6638c804135a282 /plugins/sonar-findbugs-plugin | |
parent | 975d1f30ac58bb49867d0552e922a1f20e5682e7 (diff) | |
download | sonarqube-7e212fe31cf53def323428e7c7ac35938f4ca691.tar.gz sonarqube-7e212fe31cf53def323428e7c7ac35938f4ca691.zip |
SONAR-1772: Remove the use of the Maven Findbugs plugin to directly pilot the Findbugs library
Diffstat (limited to 'plugins/sonar-findbugs-plugin')
11 files changed, 1443 insertions, 4 deletions
diff --git a/plugins/sonar-findbugs-plugin/pom.xml b/plugins/sonar-findbugs-plugin/pom.xml index e5a6a2de718..22c29a476a9 100644 --- a/plugins/sonar-findbugs-plugin/pom.xml +++ b/plugins/sonar-findbugs-plugin/pom.xml @@ -17,11 +17,50 @@ <findbugs.version>1.3.9</findbugs.version> </properties> + <dependencyManagement> + <!-- Change versions for dependencies provided by sonar-plugin-api --> + <dependencies> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.6.2</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>2.6.0</version> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> <dependency> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-plugin-api</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </exclusion> + <exclusion> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + </exclusion> + <exclusion> + <groupId>dom4j</groupId> + <artifactId>dom4j</artifactId> + </exclusion> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>findbugs</artifactId> + <version>${findbugs.version}</version> </dependency> <dependency> <groupId>org.codehaus.sonar</groupId> @@ -63,12 +102,11 @@ <plugin> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-packaging-maven-plugin</artifactId> - <extensions>true</extensions> <configuration> - <pluginKey>findbugs</pluginKey> <pluginName>Findbugs</pluginName> <pluginDescription><![CDATA[Analyze Java code with <a href="http://findbugs.sourceforge.net/">Findbugs</a> ${findbugs.version}.]]></pluginDescription> <pluginClass>org.sonar.plugins.findbugs.FindbugsPlugin</pluginClass> + <useChildFirstClassLoader>true</useChildFirstClassLoader> </configuration> </plugin> <plugin> diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java new file mode 100644 index 00000000000..fe0e05e6bf1 --- /dev/null +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java @@ -0,0 +1,67 @@ +package org.sonar.plugins.findbugs; + +import org.sonar.api.BatchExtension; +import org.sonar.api.profiles.RulesProfile; +import org.sonar.api.resources.Project; +import org.sonar.api.utils.SonarException; +import org.sonar.plugins.findbugs.xml.ClassFilter; +import org.sonar.plugins.findbugs.xml.FindBugsFilter; +import org.sonar.plugins.findbugs.xml.Match; + +import java.io.File; +import java.io.IOException; +import java.io.StringWriter; + +/** + * @since 2.4 + */ +public class FindbugsConfiguration implements BatchExtension { + + private Project project; + private RulesProfile profile; + private FindbugsProfileExporter exporter; + + public FindbugsConfiguration(Project project, RulesProfile profile, FindbugsProfileExporter exporter) { + this.project = project; + this.profile = profile; + this.exporter = exporter; + } + + public File getTargetXMLReport() { + if (project.getConfiguration().getBoolean(FindbugsConstants.GENERATE_XML_KEY, FindbugsConstants.GENERATE_XML_DEFAULT_VALUE)) { + return new File(project.getFileSystem().getSonarWorkingDirectory(), "findbugs-result.xml"); + } + return null; + } + + public edu.umd.cs.findbugs.Project getFindbugsProject() { + try { + edu.umd.cs.findbugs.Project findbugsProject = new edu.umd.cs.findbugs.Project(); + for (File dir : project.getFileSystem().getSourceDirs()) { + findbugsProject.addSourceDir(dir.getAbsolutePath()); + } + findbugsProject.addFile(project.getFileSystem().getBuildOutputDir().getAbsolutePath()); + findbugsProject.setCurrentWorkingDirectory(project.getFileSystem().getBuildDir()); + return findbugsProject; + } catch (Exception e) { + throw new SonarException(e); + } + } + + public File saveIncludeConfigXml() throws IOException { + StringWriter conf = new StringWriter(); + exporter.exportProfile(profile, conf); + return project.getFileSystem().writeToWorkingDirectory(conf.toString(), "findbugs-include.xml"); + } + + public File saveExcludeConfigXml() throws IOException { + FindBugsFilter findBugsFilter = new FindBugsFilter(); + if (project.getExclusionPatterns() != null) { + for (String exclusion : project.getExclusionPatterns()) { + ClassFilter classFilter = new ClassFilter(FindbugsAntConverter.antToJavaRegexpConvertor(exclusion)); + findBugsFilter.addMatch(new Match(classFilter)); + } + } + return project.getFileSystem().writeToWorkingDirectory(findBugsFilter.toXml(), "findbugs-exclude.xml"); + } +} diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java index a49d06f620a..363cf01ddf2 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java @@ -27,4 +27,10 @@ public final class FindbugsConstants { public static final String REPOSITORY_NAME = "Findbugs"; public static final String PLUGIN_NAME = "Findbugs"; public static final String PLUGIN_KEY = CoreProperties.FINDBUGS_PLUGIN; + + /** + * @since 2.4 + */ + public static final String GENERATE_XML_KEY = "sonar.findbugs.generateXml"; + public static final boolean GENERATE_XML_DEFAULT_VALUE = true; // TODO should be false } diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java new file mode 100644 index 00000000000..d6465723b46 --- /dev/null +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java @@ -0,0 +1,85 @@ +package org.sonar.plugins.findbugs; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.io.output.NullOutputStream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.sonar.api.BatchExtension; +import org.sonar.api.utils.SonarException; +import org.sonar.api.utils.TimeProfiler; + +import edu.umd.cs.findbugs.*; +import edu.umd.cs.findbugs.annotations.Priority; +import edu.umd.cs.findbugs.config.UserPreferences; + +import java.io.File; +import java.io.OutputStream; +import java.io.PrintStream; + +/** + * @since 2.4 + */ +public class FindbugsExecutor implements BatchExtension { + private static Logger LOG = LoggerFactory.getLogger(FindbugsExecutor.class); + + private FindbugsConfiguration configuration; + + public FindbugsExecutor(FindbugsConfiguration configuration) { + this.configuration = configuration; + } + + public File execute() { + TimeProfiler profiler = new TimeProfiler().start("Execute Findbugs"); + ClassLoader initialClassLoader = Thread.currentThread().getContextClassLoader(); + Thread.currentThread().setContextClassLoader(FindBugs2.class.getClassLoader()); + + OutputStream xmlOutput = null; + try { + final FindBugs2 engine = new FindBugs2(); + + Project project = configuration.getFindbugsProject(); + engine.setProject(project); + + XMLBugReporter xmlBugReporter = new XMLBugReporter(project); + xmlBugReporter.setPriorityThreshold(Priority.LOW.getPriorityValue()); + // xmlBugReporter.setErrorVerbosity(BugReporter.SILENT); + + File xmlReport = configuration.getTargetXMLReport(); + if (xmlReport != null) { + LOG.info("Findbugs output report: " + xmlReport.getAbsolutePath()); + xmlOutput = FileUtils.openOutputStream(xmlReport); + } else { + xmlOutput = new NullOutputStream(); + } + xmlBugReporter.setOutputStream(new PrintStream(xmlOutput)); + + engine.setBugReporter(xmlBugReporter); + + engine.setProject(project); + + engine.setDetectorFactoryCollection(DetectorFactoryCollection.instance()); + UserPreferences userPreferences = UserPreferences.createDefaultUserPreferences(); + userPreferences.setEffort(UserPreferences.EFFORT_DEFAULT); + + engine.addFilter(configuration.saveIncludeConfigXml().getAbsolutePath(), true); + engine.addFilter(configuration.saveExcludeConfigXml().getAbsolutePath(), false); + + engine.setUserPreferences(userPreferences); + engine.setAnalysisFeatureSettings(FindBugs.DEFAULT_EFFORT); + + engine.finishSettings(); + + engine.execute(); + + profiler.stop(); + return xmlReport; + } catch (Exception e) { + throw new SonarException("Can not execute Findbugs", e); + } finally { + IOUtils.closeQuietly(xmlOutput); + Thread.currentThread().setContextClassLoader(initialClassLoader); + } + } + +} diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsNativeSensor.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsNativeSensor.java new file mode 100644 index 00000000000..9d0d823e234 --- /dev/null +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsNativeSensor.java @@ -0,0 +1,56 @@ +package org.sonar.plugins.findbugs; + +import org.apache.commons.lang.StringUtils; +import org.sonar.api.batch.Sensor; +import org.sonar.api.batch.SensorContext; +import org.sonar.api.profiles.RulesProfile; +import org.sonar.api.resources.JavaFile; +import org.sonar.api.resources.Project; +import org.sonar.api.rules.Rule; +import org.sonar.api.rules.RuleFinder; +import org.sonar.api.rules.Violation; + +import java.util.List; + +/** + * EXPERIMENTAL! + * + * @since 2.4 + */ +public class FindbugsNativeSensor implements Sensor { + + private RulesProfile profile; + private RuleFinder ruleFinder; + private FindbugsExecutor executor; + + public FindbugsNativeSensor(RulesProfile profile, RuleFinder ruleFinder, FindbugsExecutor executor) { + this.profile = profile; + this.ruleFinder = ruleFinder; + this.executor = executor; + } + + public boolean shouldExecuteOnProject(Project project) { + return project.getFileSystem().hasJavaSourceFiles() + && ( !profile.getActiveRulesByRepository(FindbugsConstants.REPOSITORY_KEY).isEmpty() || project.getReuseExistingRulesConfig()) + && project.getPom() != null && !StringUtils.equalsIgnoreCase(project.getPom().getPackaging(), "ear"); + } + + public void analyse(Project project, SensorContext context) { + FindbugsXmlReportParser reportParser = new FindbugsXmlReportParser(executor.execute()); + List<FindbugsXmlReportParser.Violation> fbViolations = reportParser.getViolations(); + for (FindbugsXmlReportParser.Violation fbViolation : fbViolations) { + Rule rule = ruleFinder.findByKey(FindbugsConstants.REPOSITORY_KEY, fbViolation.getType()); + JavaFile resource = new JavaFile(fbViolation.getSonarJavaFileKey()); + if (context.getResource(resource) != null) { + Violation violation = Violation.create(rule, resource).setLineId(fbViolation.getStart()).setMessage(fbViolation.getLongMessage()); + context.saveViolation(violation); + } + } + } + + @Override + public String toString() { + return getClass().getSimpleName(); + } + +} diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java index c43965d1b3b..0dec503b018 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java @@ -69,8 +69,10 @@ public class FindbugsPlugin implements Plugin { public List<Class<? extends Extension>> getExtensions() { List<Class<? extends Extension>> list = new ArrayList<Class<? extends Extension>>(); - list.add(FindbugsSensor.class); - list.add(FindbugsMavenPluginHandler.class); + list.add(FindbugsNativeSensor.class); + list.add(FindbugsConfiguration.class); + list.add(FindbugsExecutor.class); + // list.add(FindbugsMavenPluginHandler.class); list.add(FindbugsRuleRepository.class); list.add(FindbugsProfileExporter.class); list.add(FindbugsProfileImporter.class); diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java new file mode 100644 index 00000000000..cae79c1cf01 --- /dev/null +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java @@ -0,0 +1,42 @@ +package org.sonar.plugins.findbugs; + +import org.apache.commons.io.FileUtils; +import org.junit.Test; + +import edu.umd.cs.findbugs.Project; + +import java.io.File; + +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; +import static org.junit.internal.matchers.StringContains.containsString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class FindbugsExecutorTest { + + @Test + public void canGenerateXMLReport() throws Exception { + FindbugsConfiguration conf = mockConf(); + File report = new File("target/test-tmp/findbugs-report.xml"); + when(conf.getTargetXMLReport()).thenReturn(report); + FindbugsExecutor executor = new FindbugsExecutor(conf); + executor.execute(); + + assertThat(report.exists(), is(true)); + assertThat(FileUtils.readFileToString(report), containsString("<BugInstance")); + } + + private FindbugsConfiguration mockConf() throws Exception { + FindbugsConfiguration conf = mock(FindbugsConfiguration.class); + Project project = new Project(); + project.addFile(new File("test-resources/classes").getCanonicalPath()); + project.addSourceDir(new File("test-resources/src").getCanonicalPath()); + project.setCurrentWorkingDirectory(new File("test-resources")); + when(conf.getFindbugsProject()).thenReturn(project); + when(conf.saveExcludeConfigXml()).thenReturn(new File("test-resources/findbugs-exclude.xml")); + when(conf.saveIncludeConfigXml()).thenReturn(new File("test-resources/findbugs-include.xml")); + return conf; + } + +} diff --git a/plugins/sonar-findbugs-plugin/test-resources/classes/Hello.class b/plugins/sonar-findbugs-plugin/test-resources/classes/Hello.class Binary files differnew file mode 100644 index 00000000000..45f085b02d8 --- /dev/null +++ b/plugins/sonar-findbugs-plugin/test-resources/classes/Hello.class diff --git a/plugins/sonar-findbugs-plugin/test-resources/findbugs-exclude.xml b/plugins/sonar-findbugs-plugin/test-resources/findbugs-exclude.xml new file mode 100644 index 00000000000..f1255e54f86 --- /dev/null +++ b/plugins/sonar-findbugs-plugin/test-resources/findbugs-exclude.xml @@ -0,0 +1 @@ +<FindBugsFilter/>
\ No newline at end of file diff --git a/plugins/sonar-findbugs-plugin/test-resources/findbugs-include.xml b/plugins/sonar-findbugs-plugin/test-resources/findbugs-include.xml new file mode 100644 index 00000000000..e9a13f8b40c --- /dev/null +++ b/plugins/sonar-findbugs-plugin/test-resources/findbugs-include.xml @@ -0,0 +1,1129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated by Sonar --> +<FindBugsFilter> + <Match> + <Bug pattern="SA_LOCAL_SELF_COMPARISON"/> + </Match> + <Match> + <Bug pattern="UG_SYNC_SET_UNSYNC_GET"/> + </Match> + <Match> + <Bug pattern="IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION"/> + </Match> + <Match> + <Bug pattern="NM_FIELD_NAMING_CONVENTION"/> + </Match> + <Match> + <Bug pattern="BC_IMPOSSIBLE_DOWNCAST"/> + </Match> + <Match> + <Bug pattern="SA_FIELD_SELF_COMPUTATION"/> + </Match> + <Match> + <Bug pattern="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS"/> + </Match> + <Match> + <Bug pattern="TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK"/> + </Match> + <Match> + <Bug pattern="NO_NOTIFY_NOT_NOTIFYALL"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_BAD_ARGUMENT"/> + </Match> + <Match> + <Bug pattern="UPM_UNCALLED_PRIVATE_METHOD"/> + </Match> + <Match> + <Bug pattern="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH"/> + </Match> + <Match> + <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/> + </Match> + <Match> + <Bug pattern="LI_LAZY_INIT_UPDATE_STATIC"/> + </Match> + <Match> + <Bug pattern="DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED"/> + </Match> + <Match> + <Bug pattern="SE_NONLONG_SERIALVERSIONID"/> + </Match> + <Match> + <Bug pattern="ODR_OPEN_DATABASE_RESOURCE"/> + </Match> + <Match> + <Bug pattern="RC_REF_COMPARISON_BAD_PRACTICE"/> + </Match> + <Match> + <Bug pattern="NM_LCASE_HASHCODE"/> + </Match> + <Match> + <Bug pattern="VO_VOLATILE_REFERENCE_TO_ARRAY"/> + </Match> + <Match> + <Bug pattern="ITA_INEFFICIENT_TO_ARRAY"/> + </Match> + <Match> + <Bug pattern="DM_NUMBER_CTOR"/> + </Match> + <Match> + <Bug pattern="XSS_REQUEST_PARAMETER_TO_JSP_WRITER"/> + </Match> + <Match> + <Bug pattern="IJU_TEARDOWN_NO_SUPER"/> + </Match> + <Match> + <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/> + </Match> + <Match> + <Bug pattern="SIC_INNER_SHOULD_BE_STATIC"/> + </Match> + <Match> + <Bug pattern="NM_BAD_EQUAL"/> + </Match> + <Match> + <Bug pattern="DM_BOXED_PRIMITIVE_TOSTRING"/> + </Match> + <Match> + <Bug pattern="IJU_SUITE_NOT_STATIC"/> + </Match> + <Match> + <Bug pattern="IM_MULTIPLYING_RESULT_OF_IREM"/> + </Match> + <Match> + <Bug pattern="HE_HASHCODE_USE_OBJECT_EQUALS"/> + </Match> + <Match> + <Bug pattern="IL_CONTAINER_ADDED_TO_ITSELF"/> + </Match> + <Match> + <Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_BAD_CONVERSION"/> + </Match> + <Match> + <Bug pattern="SR_NOT_CHECKED"/> + </Match> + <Match> + <Bug pattern="DB_DUPLICATE_SWITCH_CLAUSES"/> + </Match> + <Match> + <Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL"/> + </Match> + <Match> + <Bug pattern="IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN"/> + </Match> + <Match> + <Bug pattern="RV_RETURN_VALUE_IGNORED"/> + </Match> + <Match> + <Bug pattern="RV_EXCEPTION_NOT_THROWN"/> + </Match> + <Match> + <Bug pattern="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"/> + </Match> + <Match> + <Bug pattern="CO_SELF_NO_OBJECT"/> + </Match> + <Match> + <Bug pattern="MS_MUTABLE_ARRAY"/> + </Match> + <Match> + <Bug pattern="DM_CONVERT_CASE"/> + </Match> + <Match> + <Bug pattern="INT_VACUOUS_COMPARISON"/> + </Match> + <Match> + <Bug pattern="UW_UNCOND_WAIT"/> + </Match> + <Match> + <Bug pattern="MS_FINAL_PKGPROTECT"/> + </Match> + <Match> + <Bug pattern="NP_BOOLEAN_RETURN_NULL"/> + </Match> + <Match> + <Bug pattern="DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE"/> + </Match> + <Match> + <Bug pattern="TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK"/> + </Match> + <Match> + <Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/> + </Match> + <Match> + <Bug pattern="DM_GC"/> + </Match> + <Match> + <Bug pattern="BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION"/> + </Match> + <Match> + <Bug pattern="BIT_SIGNED_CHECK_HIGH_BIT"/> + </Match> + <Match> + <Bug pattern="DE_MIGHT_DROP"/> + </Match> + <Match> + <Bug pattern="DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE"/> + </Match> + <Match> + <Bug pattern="RV_DONT_JUST_NULL_CHECK_READLINE"/> + </Match> + <Match> + <Bug pattern="RV_CHECK_FOR_POSITIVE_INDEXOF"/> + </Match> + <Match> + <Bug pattern="DMI_USELESS_SUBSTRING"/> + </Match> + <Match> + <Bug pattern="URF_UNREAD_FIELD"/> + </Match> + <Match> + <Bug pattern="NP_NULL_INSTANCEOF"/> + </Match> + <Match> + <Bug pattern="DM_MONITOR_WAIT_ON_CONDITION"/> + </Match> + <Match> + <Bug pattern="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK"/> + </Match> + <Match> + <Bug pattern="MS_PKGPROTECT"/> + </Match> + <Match> + <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE"/> + </Match> + <Match> + <Bug pattern="EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC"/> + </Match> + <Match> + <Bug pattern="SWL_SLEEP_WITH_LOCK_HELD"/> + </Match> + <Match> + <Bug pattern="EC_UNRELATED_INTERFACES"/> + </Match> + <Match> + <Bug pattern="DM_FP_NUMBER_CTOR"/> + </Match> + <Match> + <Bug pattern="FI_PUBLIC_SHOULD_BE_PROTECTED"/> + </Match> + <Match> + <Bug pattern="STI_INTERRUPTED_ON_CURRENTTHREAD"/> + </Match> + <Match> + <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE"/> + </Match> + <Match> + <Bug pattern="DMI_BAD_MONTH"/> + </Match> + <Match> + <Bug pattern="BIT_SIGNED_CHECK"/> + </Match> + <Match> + <Bug pattern="DE_MIGHT_IGNORE"/> + </Match> + <Match> + <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/> + </Match> + <Match> + <Bug pattern="IJU_SETUP_NO_SUPER"/> + </Match> + <Match> + <Bug pattern="EQ_OTHER_NO_OBJECT"/> + </Match> + <Match> + <Bug pattern="FI_MISSING_SUPER_CALL"/> + </Match> + <Match> + <Bug pattern="SQL_BAD_PREPARED_STATEMENT_ACCESS"/> + </Match> + <Match> + <Bug pattern="NP_NONNULL_PARAM_VIOLATION"/> + </Match> + <Match> + <Bug pattern="EQ_UNUSUAL"/> + </Match> + <Match> + <Bug pattern="FI_EMPTY"/> + </Match> + <Match> + <Bug pattern="NP_CLOSING_NULL"/> + </Match> + <Match> + <Bug pattern="NN_NAKED_NOTIFY"/> + </Match> + <Match> + <Bug pattern="SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS"/> + </Match> + <Match> + <Bug pattern="UWF_NULL_FIELD"/> + </Match> + <Match> + <Bug pattern="OS_OPEN_STREAM"/> + </Match> + <Match> + <Bug pattern="HE_USE_OF_UNHASHABLE_CLASS"/> + </Match> + <Match> + <Bug pattern="EQ_ABSTRACT_SELF"/> + </Match> + <Match> + <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/> + </Match> + <Match> + <Bug pattern="J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION"/> + </Match> + <Match> + <Bug pattern="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK"/> + </Match> + <Match> + <Bug pattern="RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES"/> + </Match> + <Match> + <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/> + </Match> + <Match> + <Bug pattern="EQ_SELF_USE_OBJECT"/> + </Match> + <Match> + <Bug pattern="JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS"/> + </Match> + <Match> + <Bug pattern="NM_CLASS_NOT_EXCEPTION"/> + </Match> + <Match> + <Bug pattern="QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT"/> + </Match> + <Match> + <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/> + </Match> + <Match> + <Bug pattern="SE_METHOD_MUST_BE_PRIVATE"/> + </Match> + <Match> + <Bug pattern="BC_IMPOSSIBLE_INSTANCEOF"/> + </Match> + <Match> + <Bug pattern="EC_ARRAY_AND_NONARRAY"/> + </Match> + <Match> + <Bug pattern="FI_EXPLICIT_INVOCATION"/> + </Match> + <Match> + <Bug pattern="SS_SHOULD_BE_STATIC"/> + </Match> + <Match> + <Bug pattern="BIT_IOR"/> + </Match> + <Match> + <Bug pattern="SE_NONFINAL_SERIALVERSIONID"/> + </Match> + <Match> + <Bug pattern="MS_SHOULD_BE_FINAL"/> + </Match> + <Match> + <Bug pattern="EQ_DONT_DEFINE_EQUALS_FOR_ENUM"/> + </Match> + <Match> + <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED"/> + </Match> + <Match> + <Bug pattern="EQ_ALWAYS_FALSE"/> + </Match> + <Match> + <Bug pattern="EI_EXPOSE_REP2"/> + </Match> + <Match> + <Bug pattern="RV_REM_OF_RANDOM_INT"/> + </Match> + <Match> + <Bug pattern="INT_VACUOUS_BIT_OPERATION"/> + </Match> + <Match> + <Bug pattern="SF_SWITCH_NO_DEFAULT"/> + </Match> + <Match> + <Bug pattern="IL_INFINITE_LOOP"/> + </Match> + <Match> + <Bug pattern="NP_NULL_PARAM_DEREF"/> + </Match> + <Match> + <Bug pattern="AM_CREATES_EMPTY_JAR_FILE_ENTRY"/> + </Match> + <Match> + <Bug pattern="EQ_COMPARING_CLASS_NAMES"/> + </Match> + <Match> + <Bug pattern="NP_ALWAYS_NULL_EXCEPTION"/> + </Match> + <Match> + <Bug pattern="DB_DUPLICATE_BRANCHES"/> + </Match> + <Match> + <Bug pattern="IMSE_DONT_CATCH_IMSE"/> + </Match> + <Match> + <Bug pattern="XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER"/> + </Match> + <Match> + <Bug pattern="DM_STRING_CTOR"/> + </Match> + <Match> + <Bug pattern="SE_NO_SERIALVERSIONID"/> + </Match> + <Match> + <Bug pattern="SE_BAD_FIELD_STORE"/> + </Match> + <Match> + <Bug pattern="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY"/> + </Match> + <Match> + <Bug pattern="SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION"/> + </Match> + <Match> + <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME"/> + </Match> + <Match> + <Bug pattern="RU_INVOKE_RUN"/> + </Match> + <Match> + <Bug pattern="SQL_BAD_RESULTSET_ACCESS"/> + </Match> + <Match> + <Bug pattern="IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD"/> + </Match> + <Match> + <Bug pattern="BX_BOXING_IMMEDIATELY_UNBOXED"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY"/> + </Match> + <Match> + <Bug pattern="HE_HASHCODE_NO_EQUALS"/> + </Match> + <Match> + <Bug pattern="SI_INSTANCE_BEFORE_FINALS_ASSIGNED"/> + </Match> + <Match> + <Bug pattern="UI_INHERITANCE_UNSAFE_GETRESOURCE"/> + </Match> + <Match> + <Bug pattern="NP_SYNC_AND_NULL_CHECK_FIELD"/> + </Match> + <Match> + <Bug pattern="RpC_REPEATED_CONDITIONAL_TEST"/> + </Match> + <Match> + <Bug pattern="DLS_DEAD_LOCAL_STORE_IN_RETURN"/> + </Match> + <Match> + <Bug pattern="EC_UNRELATED_CLASS_AND_INTERFACE"/> + </Match> + <Match> + <Bug pattern="RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION"/> + </Match> + <Match> + <Bug pattern="HE_INHERITS_EQUALS_USE_HASHCODE"/> + </Match> + <Match> + <Bug pattern="NP_DEREFERENCE_OF_READLINE_VALUE"/> + </Match> + <Match> + <Bug pattern="WA_NOT_IN_LOOP"/> + </Match> + <Match> + <Bug pattern="BC_IMPOSSIBLE_CAST"/> + </Match> + <Match> + <Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/> + </Match> + <Match> + <Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT"/> + </Match> + <Match> + <Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION"/> + </Match> + <Match> + <Bug pattern="DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION"/> + </Match> + <Match> + <Bug pattern="IC_INIT_CIRCULARITY"/> + </Match> + <Match> + <Bug pattern="UM_UNNECESSARY_MATH"/> + </Match> + <Match> + <Bug pattern="NM_CLASS_NAMING_CONVENTION"/> + </Match> + <Match> + <Bug pattern="STCAL_STATIC_CALENDAR_INSTANCE"/> + </Match> + <Match> + <Bug pattern="NP_ALWAYS_NULL"/> + </Match> + <Match> + <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/> + </Match> + <Match> + <Bug pattern="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH"/> + </Match> + <Match> + <Bug pattern="UUF_UNUSED_FIELD"/> + </Match> + <Match> + <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/> + </Match> + <Match> + <Bug pattern="INT_BAD_COMPARISON_WITH_SIGNED_BYTE"/> + </Match> + <Match> + <Bug pattern="NP_CLONE_COULD_RETURN_NULL"/> + </Match> + <Match> + <Bug pattern="HE_EQUALS_NO_HASHCODE"/> + </Match> + <Match> + <Bug pattern="IS_FIELD_NOT_GUARDED"/> + </Match> + <Match> + <Bug pattern="NM_LCASE_TOSTRING"/> + </Match> + <Match> + <Bug pattern="NM_WRONG_PACKAGE"/> + </Match> + <Match> + <Bug pattern="UCF_USELESS_CONTROL_FLOW"/> + </Match> + <Match> + <Bug pattern="DM_USELESS_THREAD"/> + </Match> + <Match> + <Bug pattern="DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION"/> + </Match> + <Match> + <Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"/> + </Match> + <Match> + <Bug pattern="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT"/> + </Match> + <Match> + <Bug pattern="ICAST_BAD_SHIFT_AMOUNT"/> + </Match> + <Match> + <Bug pattern="ICAST_IDIV_CAST_TO_DOUBLE"/> + </Match> + <Match> + <Bug pattern="FI_NULLIFY_SUPER"/> + </Match> + <Match> + <Bug pattern="MS_MUTABLE_HASHTABLE"/> + </Match> + <Match> + <Bug pattern="SE_READ_RESOLVE_MUST_RETURN_OBJECT"/> + </Match> + <Match> + <Bug pattern="SIO_SUPERFLUOUS_INSTANCEOF"/> + </Match> + <Match> + <Bug pattern="BOA_BADLY_OVERRIDDEN_ADAPTER"/> + </Match> + <Match> + <Bug pattern="IM_AVERAGE_COMPUTATION_COULD_OVERFLOW"/> + </Match> + <Match> + <Bug pattern="DM_NEW_FOR_GETCLASS"/> + </Match> + <Match> + <Bug pattern="NM_CONFUSING"/> + </Match> + <Match> + <Bug pattern="WMI_WRONG_MAP_ITERATOR"/> + </Match> + <Match> + <Bug pattern="NP_UNWRITTEN_FIELD"/> + </Match> + <Match> + <Bug pattern="SE_BAD_FIELD_INNER_CLASS"/> + </Match> + <Match> + <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/> + </Match> + <Match> + <Bug pattern="UCF_USELESS_CONTROL_FLOW_NEXT_LINE"/> + </Match> + <Match> + <Bug pattern="NP_GUARANTEED_DEREF"/> + </Match> + <Match> + <Bug pattern="EI_EXPOSE_STATIC_REP2"/> + </Match> + <Match> + <Bug pattern="NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER"/> + </Match> + <Match> + <Bug pattern="WA_AWAIT_NOT_IN_LOOP"/> + </Match> + <Match> + <Bug pattern="RC_REF_COMPARISON"/> + </Match> + <Match> + <Bug pattern="SC_START_IN_CTOR"/> + </Match> + <Match> + <Bug pattern="MF_CLASS_MASKS_FIELD"/> + </Match> + <Match> + <Bug pattern="DMI_INVOKING_HASHCODE_ON_ARRAY"/> + </Match> + <Match> + <Bug pattern="PS_PUBLIC_SEMAPHORES"/> + </Match> + <Match> + <Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/> + </Match> + <Match> + <Bug pattern="SKIPPED_CLASS_TOO_BIG"/> + </Match> + <Match> + <Bug pattern="HSC_HUGE_SHARED_STRING_CONSTANT"/> + </Match> + <Match> + <Bug pattern="UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_ILLEGAL"/> + </Match> + <Match> + <Bug pattern="SA_LOCAL_SELF_COMPUTATION"/> + </Match> + <Match> + <Bug pattern="SE_NO_SUITABLE_CONSTRUCTOR"/> + </Match> + <Match> + <Bug pattern="MWN_MISMATCHED_NOTIFY"/> + </Match> + <Match> + <Bug pattern="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS"/> + </Match> + <Match> + <Bug pattern="STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE"/> + </Match> + <Match> + <Bug pattern="SE_READ_RESOLVE_IS_STATIC"/> + </Match> + <Match> + <Bug pattern="SA_LOCAL_DOUBLE_ASSIGNMENT"/> + </Match> + <Match> + <Bug pattern="DP_DO_INSIDE_DO_PRIVILEGED"/> + </Match> + <Match> + <Bug pattern="RV_RETURN_VALUE_IGNORED2"/> + </Match> + <Match> + <Bug pattern="RI_REDUNDANT_INTERFACES"/> + </Match> + <Match> + <Bug pattern="MTIA_SUSPECT_SERVLET_INSTANCE_FIELD"/> + </Match> + <Match> + <Bug pattern="FI_FINALIZER_ONLY_NULLS_FIELDS"/> + </Match> + <Match> + <Bug pattern="IO_APPENDING_TO_OBJECT_OUTPUT_STREAM"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT"/> + </Match> + <Match> + <Bug pattern="NM_VERY_CONFUSING"/> + </Match> + <Match> + <Bug pattern="DM_RUN_FINALIZERS_ON_EXIT"/> + </Match> + <Match> + <Bug pattern="STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE"/> + </Match> + <Match> + <Bug pattern="FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER"/> + </Match> + <Match> + <Bug pattern="FI_FINALIZER_NULLS_FIELDS"/> + </Match> + <Match> + <Bug pattern="DMI_UNSUPPORTED_METHOD"/> + </Match> + <Match> + <Bug pattern="DMI_CONSTANT_DB_PASSWORD"/> + </Match> + <Match> + <Bug pattern="TLW_TWO_LOCK_WAIT"/> + </Match> + <Match> + <Bug pattern="RV_01_TO_INT"/> + </Match> + <Match> + <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD"/> + </Match> + <Match> + <Bug pattern="DMI_COLLECTION_OF_URLS"/> + </Match> + <Match> + <Bug pattern="BIT_AND_ZZ"/> + </Match> + <Match> + <Bug pattern="DM_STRING_VOID_CTOR"/> + </Match> + <Match> + <Bug pattern="NM_METHOD_NAMING_CONVENTION"/> + </Match> + <Match> + <Bug pattern="UL_UNRELEASED_LOCK"/> + </Match> + <Match> + <Bug pattern="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER"/> + </Match> + <Match> + <Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/> + </Match> + <Match> + <Bug pattern="SIC_THREADLOCAL_DEADLY_EMBRACE"/> + </Match> + <Match> + <Bug pattern="MF_METHOD_MASKS_FIELD"/> + </Match> + <Match> + <Bug pattern="DL_SYNCHRONIZATION_ON_SHARED_CONSTANT"/> + </Match> + <Match> + <Bug pattern="INT_BAD_REM_BY_1"/> + </Match> + <Match> + <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL"/> + </Match> + <Match> + <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ"/> + </Match> + <Match> + <Bug pattern="SA_FIELD_SELF_COMPARISON"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN"/> + </Match> + <Match> + <Bug pattern="QF_QUESTIONABLE_FOR_LOOP"/> + </Match> + <Match> + <Bug pattern="XFB_XML_FACTORY_BYPASS"/> + </Match> + <Match> + <Bug pattern="CI_CONFUSED_INHERITANCE"/> + </Match> + <Match> + <Bug pattern="SE_INNER_CLASS"/> + </Match> + <Match> + <Bug pattern="UWF_UNWRITTEN_FIELD"/> + </Match> + <Match> + <Bug pattern="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS"/> + </Match> + <Match> + <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL"/> + </Match> + <Match> + <Bug pattern="CN_IDIOM_NO_SUPER_CALL"/> + </Match> + <Match> + <Bug pattern="WS_WRITEOBJECT_SYNC"/> + </Match> + <Match> + <Bug pattern="FI_USELESS"/> + </Match> + <Match> + <Bug pattern="ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD"/> + </Match> + <Match> + <Bug pattern="NM_METHOD_CONSTRUCTOR_CONFUSION"/> + </Match> + <Match> + <Bug pattern="MWN_MISMATCHED_WAIT"/> + </Match> + <Match> + <Bug pattern="DM_NEXTINT_VIA_NEXTDOUBLE"/> + </Match> + <Match> + <Bug pattern="FL_MATH_USING_FLOAT_PRECISION"/> + </Match> + <Match> + <Bug pattern="ML_SYNC_ON_UPDATED_FIELD"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED"/> + </Match> + <Match> + <Bug pattern="DMI_NONSERIALIZABLE_OBJECT_WRITTEN"/> + </Match> + <Match> + <Bug pattern="MTIA_SUSPECT_STRUTS_INSTANCE_FIELD"/> + </Match> + <Match> + <Bug pattern="EQ_OTHER_USE_OBJECT"/> + </Match> + <Match> + <Bug pattern="RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE"/> + </Match> + <Match> + <Bug pattern="DLS_DEAD_LOCAL_STORE_OF_NULL"/> + </Match> + <Match> + <Bug pattern="DMI_BLOCKING_METHODS_ON_URL"/> + </Match> + <Match> + <Bug pattern="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE"/> + </Match> + <Match> + <Bug pattern="MS_CANNOT_BE_FINAL"/> + </Match> + <Match> + <Bug pattern="IM_BAD_CHECK_FOR_ODD"/> + </Match> + <Match> + <Bug pattern="DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY"/> + </Match> + <Match> + <Bug pattern="NP_STORE_INTO_NONNULL_FIELD"/> + </Match> + <Match> + <Bug pattern="SP_SPIN_ON_FIELD"/> + </Match> + <Match> + <Bug pattern="NM_VERY_CONFUSING_INTENTIONAL"/> + </Match> + <Match> + <Bug pattern="ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL"/> + </Match> + <Match> + <Bug pattern="IS2_INCONSISTENT_SYNC"/> + </Match> + <Match> + <Bug pattern="ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH"/> + </Match> + <Match> + <Bug pattern="XSS_REQUEST_PARAMETER_TO_SEND_ERROR"/> + </Match> + <Match> + <Bug pattern="DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS"/> + </Match> + <Match> + <Bug pattern="CN_IDIOM"/> + </Match> + <Match> + <Bug pattern="GC_UNCHECKED_TYPE_IN_GENERIC_CALL"/> + </Match> + <Match> + <Bug pattern="SE_PRIVATE_READ_RESOLVE_NOT_INHERITED"/> + </Match> + <Match> + <Bug pattern="DMI_INVOKING_TOSTRING_ON_ARRAY"/> + </Match> + <Match> + <Bug pattern="SW_SWING_METHODS_INVOKED_IN_SWING_THREAD"/> + </Match> + <Match> + <Bug pattern="DL_SYNCHRONIZATION_ON_BOOLEAN"/> + </Match> + <Match> + <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/> + </Match> + <Match> + <Bug pattern="NP_ARGUMENT_MIGHT_BE_NULL"/> + </Match> + <Match> + <Bug pattern="DM_EXIT"/> + </Match> + <Match> + <Bug pattern="CO_ABSTRACT_SELF"/> + </Match> + <Match> + <Bug pattern="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED"/> + </Match> + <Match> + <Bug pattern="DC_DOUBLECHECK"/> + </Match> + <Match> + <Bug pattern="UL_UNRELEASED_LOCK_EXCEPTION_PATH"/> + </Match> + <Match> + <Bug pattern="EC_BAD_ARRAY_COMPARE"/> + </Match> + <Match> + <Bug pattern="SE_BAD_FIELD"/> + </Match> + <Match> + <Bug pattern="SA_LOCAL_SELF_ASSIGNMENT"/> + </Match> + <Match> + <Bug pattern="REC_CATCH_EXCEPTION"/> + </Match> + <Match> + <Bug pattern="TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED"/> + </Match> + <Match> + <Bug pattern="DMI_VACUOUS_SELF_COLLECTION_CALL"/> + </Match> + <Match> + <Bug pattern="UR_UNINIT_READ"/> + </Match> + <Match> + <Bug pattern="DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR"/> + </Match> + <Match> + <Bug pattern="BIT_AND"/> + </Match> + <Match> + <Bug pattern="RR_NOT_CHECKED"/> + </Match> + <Match> + <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/> + </Match> + <Match> + <Bug pattern="DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES"/> + </Match> + <Match> + <Bug pattern="NP_TOSTRING_COULD_RETURN_NULL"/> + </Match> + <Match> + <Bug pattern="EQ_SELF_NO_OBJECT"/> + </Match> + <Match> + <Bug pattern="GC_UNRELATED_TYPES"/> + </Match> + <Match> + <Bug pattern="EC_NULL_ARG"/> + </Match> + <Match> + <Bug pattern="HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS"/> + </Match> + <Match> + <Bug pattern="NP_NONNULL_RETURN_VIOLATION"/> + </Match> + <Match> + <Bug pattern="IL_INFINITE_RECURSIVE_LOOP"/> + </Match> + <Match> + <Bug pattern="DM_STRING_TOSTRING"/> + </Match> + <Match> + <Bug pattern="VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG"/> + </Match> + <Match> + <Bug pattern="AM_CREATES_EMPTY_ZIP_FILE_ENTRY"/> + </Match> + <Match> + <Bug pattern="NS_NON_SHORT_CIRCUIT"/> + </Match> + <Match> + <Bug pattern="DLS_DEAD_LOCAL_STORE"/> + </Match> + <Match> + <Bug pattern="DM_BOOLEAN_CTOR"/> + </Match> + <Match> + <Bug pattern="BC_BAD_CAST_TO_CONCRETE_COLLECTION"/> + </Match> + <Match> + <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS"/> + </Match> + <Match> + <Bug pattern="LI_LAZY_INIT_STATIC"/> + </Match> + <Match> + <Bug pattern="HE_EQUALS_USE_HASHCODE"/> + </Match> + <Match> + <Bug pattern="RV_ABSOLUTE_VALUE_OF_RANDOM_INT"/> + </Match> + <Match> + <Bug pattern="DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD"/> + </Match> + <Match> + <Bug pattern="FE_FLOATING_POINT_EQUALITY"/> + </Match> + <Match> + <Bug pattern="NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER"/> + </Match> + <Match> + <Bug pattern="ICAST_INTEGER_MULTIPLY_CAST_TO_LONG"/> + </Match> + <Match> + <Bug pattern="STI_INTERRUPTED_ON_UNKNOWNTHREAD"/> + </Match> + <Match> + <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE"/> + </Match> + <Match> + <Bug pattern="SA_FIELD_SELF_ASSIGNMENT"/> + </Match> + <Match> + <Bug pattern="DMI_EMPTY_DB_PASSWORD"/> + </Match> + <Match> + <Bug pattern="IJU_BAD_SUITE_METHOD"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_MISSING_ARGUMENT"/> + </Match> + <Match> + <Bug pattern="WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL"/> + </Match> + <Match> + <Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION"/> + </Match> + <Match> + <Bug pattern="BIT_ADD_OF_SIGNED_BYTE"/> + </Match> + <Match> + <Bug pattern="TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED"/> + </Match> + <Match> + <Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE"/> + </Match> + <Match> + <Bug pattern="RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION"/> + </Match> + <Match> + <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE"/> + </Match> + <Match> + <Bug pattern="EQ_ALWAYS_TRUE"/> + </Match> + <Match> + <Bug pattern="STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE"/> + </Match> + <Match> + <Bug pattern="BC_BAD_CAST_TO_ABSTRACT_COLLECTION"/> + </Match> + <Match> + <Bug pattern="ISC_INSTANTIATE_STATIC_CLASS"/> + </Match> + <Match> + <Bug pattern="IT_NO_SUCH_ELEMENT"/> + </Match> + <Match> + <Bug pattern="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE"/> + </Match> + <Match> + <Bug pattern="EI_EXPOSE_REP"/> + </Match> + <Match> + <Bug pattern="JLM_JSR166_LOCK_MONITORENTER"/> + </Match> + <Match> + <Bug pattern="BIT_IOR_OF_SIGNED_BYTE"/> + </Match> + <Match> + <Bug pattern="MSF_MUTABLE_SERVLET_FIELD"/> + </Match> + <Match> + <Bug pattern="IS_INCONSISTENT_SYNC"/> + </Match> + <Match> + <Bug pattern="RV_REM_OF_HASHCODE"/> + </Match> + <Match> + <Bug pattern="LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE"/> + </Match> + <Match> + <Bug pattern="ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND"/> + </Match> + <Match> + <Bug pattern="SE_NONSTATIC_SERIALVERSIONID"/> + </Match> + <Match> + <Bug pattern="BC_VACUOUS_INSTANCEOF"/> + </Match> + <Match> + <Bug pattern="RV_ABSOLUTE_VALUE_OF_HASHCODE"/> + </Match> + <Match> + <Bug pattern="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN"/> + </Match> + <Match> + <Bug pattern="DMI_CALLING_NEXT_FROM_HASNEXT"/> + </Match> + <Match> + <Bug pattern="NP_NULL_ON_SOME_PATH"/> + </Match> + <Match> + <Bug pattern="RS_READOBJECT_SYNC"/> + </Match> + <Match> + <Bug pattern="EC_INCOMPATIBLE_ARRAY_COMPARE"/> + </Match> + <Match> + <Bug pattern="BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY"/> + </Match> + <Match> + <Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT"/> + </Match> + <Match> + <Bug pattern="BC_UNCONFIRMED_CAST"/> + </Match> + <Match> + <Bug pattern="SA_FIELD_DOUBLE_ASSIGNMENT"/> + </Match> + <Match> + <Bug pattern="EQ_GETCLASS_AND_CLASS_CONSTANT"/> + </Match> + <Match> + <Bug pattern="VA_FORMAT_STRING_ARG_MISMATCH"/> + </Match> + <Match> + <Bug pattern="MS_OOI_PKGPROTECT"/> + </Match> + <Match> + <Bug pattern="EC_UNRELATED_TYPES"/> + </Match> + <Match> + <Bug pattern="MS_EXPOSE_REP"/> + </Match> + <Match> + <Bug pattern="BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR"/> + </Match> + <Match> + <Bug pattern="SF_SWITCH_FALLTHROUGH"/> + </Match> + <Match> + <Bug pattern="DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT"/> + </Match> + <Match> + <Bug pattern="HRS_REQUEST_PARAMETER_TO_COOKIE"/> + </Match> + <Match> + <Bug pattern="ESync_EMPTY_SYNC"/> + </Match> + <Match> + <Bug pattern="NP_IMMEDIATE_DEREFERENCE_OF_READLINE"/> + </Match> + <Match> + <Bug pattern="IJU_NO_TESTS"/> + </Match> + <Match> + <Bug pattern="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS"/> + </Match> + <Match> + <Bug pattern="RE_POSSIBLE_UNINTENDED_PATTERN"/> + </Match> + <Match> + <Bug pattern="DLS_OVERWRITTEN_INCREMENT"/> + </Match> +</FindBugsFilter>
\ No newline at end of file diff --git a/plugins/sonar-findbugs-plugin/test-resources/src/Hello.java b/plugins/sonar-findbugs-plugin/test-resources/src/Hello.java new file mode 100644 index 00000000000..5bb582c7254 --- /dev/null +++ b/plugins/sonar-findbugs-plugin/test-resources/src/Hello.java @@ -0,0 +1,13 @@ +class Hello { + + static String name; + + public void methodWithViolations(String n) { + name = n; + } + + @Override + public boolean equals(Object obj) { + return false; + } +}
\ No newline at end of file |