[Fb-contrib-commit] SF.net SVN: fb-contrib:[1807] trunk/fb-contrib
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2016-11-23 20:08:49
|
Revision: 1807
http://sourceforge.net/p/fb-contrib/code/1807
Author: dbrosius
Date: 2016-11-23 20:08:45 +0000 (Wed, 23 Nov 2016)
Log Message:
-----------
sync from github
Modified Paths:
--------------
trunk/fb-contrib/build.xml
trunk/fb-contrib/etc/bugrank.txt
trunk/fb-contrib/etc/findbugs.xml
trunk/fb-contrib/etc/messages.xml
trunk/fb-contrib/htdocs/index.shtml
trunk/fb-contrib/htdocs/repository.html
trunk/fb-contrib/pom.xml
trunk/fb-contrib/samples.xml
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ConcurrentCollectionIssues.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/ModifyingUnmodifiableCollection.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/SuboptimalExpressionOrder.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/BugType.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureBuilder.java
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureUtils.java
trunk/fb-contrib/src/test/java/com/mebigfatguy/fbcontrib/utils/RegisterUtilsTest.java
Added Paths:
-----------
trunk/fb-contrib/src/main/java/com/mebigfatguy/fbcontrib/detect/UnsynchronizedSingletonFieldWrites.java
trunk/fb-contrib/src/samples/java/USFW_Sample.java
Modified: trunk/fb-contrib/build.xml
===================================================================
--- trunk/fb-contrib/build.xml 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/build.xml 2016-11-23 20:08:45 UTC (rev 1807)
@@ -31,7 +31,7 @@
<property name="javac.debug" value="on" />
<property name="test_reports.dir" value="${target.dir}/reports/test"/>
- <property name="fb-contrib.version" value="6.8.1" />
+ <property name="fb-contrib.version" value="6.8.2" />
<property name="sonatype.dir" value="${user.home}/.fb-contrib-${fb-contrib.version}-sonatype" />
@@ -109,6 +109,9 @@
<pathelement location="${lib.dir}/testng-${testng.version}.jar" />
<pathelement location="${lib.dir}/jcommander-${jcommander.version}.jar" />
<pathelement location="${lib.dir}/mockito-all-${mockito-all.version}.jar" />
+ <pathelement location="${findbugs.dir}/lib/dom4j-1.6.1.jar" />
+ <pathelement location="${findbugs.dir}/lib/jaxen-1.1.6.jar" />
+
</path>
<path id="fb-contrib.samples.classpath">
<pathelement location="${lib.dir}/javax.servlet.jsp-api-${javax.servlet.jsp-api.version}.jar" />
Modified: trunk/fb-contrib/etc/bugrank.txt
===================================================================
--- trunk/fb-contrib/etc/bugrank.txt 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/etc/bugrank.txt 2016-11-23 20:08:45 UTC (rev 1807)
@@ -238,6 +238,7 @@
+0 BugPattern URV_INHERITED_METHOD_WITH_RELATED_TYPES
+0 BugPattern URV_UNRELATED_RETURN_VALUES
+0 BugPattern USBR_UNNECESSARY_STORE_BEFORE_RETURN
++0 BugPattern USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES
+0 BugPattern USS_USE_STRING_SPLIT
+0 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_ACTUAL_CONSTANT
+0 BugPattern UTAO_JUNIT_ASSERTION_ODDITIES_ASSERT_USED
Modified: trunk/fb-contrib/etc/findbugs.xml
===================================================================
--- trunk/fb-contrib/etc/findbugs.xml 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/etc/findbugs.xml 2016-11-23 20:08:45 UTC (rev 1807)
@@ -20,7 +20,7 @@
<!-- Detectors -->
-<!-- COMMENT OUT FOR RELEASE
+<!-- COMMENT OUT FOR RELEASE
<Detector class="com.mebigfatguy.fbcontrib.debug.OCSDebugger" speed="fast"/>
@@ -311,8 +311,10 @@
<Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousShadedClassUse" speed="fast" reports="SSCU_SUSPICIOUS_SHADED_CLASS_USE"/>
- COMMENT OUT FOR POINT RELEASE -->
+ <Detector class="com.mebigfatguy.fbcontrib.detect.UnsynchronizedSingletonFieldWrites" speed="fast" reports="USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES"/>
+ COMMENT OUT FOR POINT RELEASE -->
+
<!-- BugPattern -->
<BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" category="PERFORMANCE" />
@@ -582,4 +584,5 @@
<BugPattern abbrev="CCI" type="CCI_CONCURRENT_COLLECTION_ISSUES_USE_PUT_IS_RACY" category="CORRECTNESS"/>
<BugPattern abbrev="UTWR" type="UTWR_USE_TRY_WITH_RESOURCES" category="STYLE" experimental="true"/>
<BugPattern abbrev="SSCU" type="SSCU_SUSPICIOUS_SHADED_CLASS_USE" category="CORRECTNESS" experimental="true"/>
+ <BugPattern abbrev="USFW" type="USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES" category="CORRECTNESS" experimental="true"/>
</FindbugsPlugin>
Modified: trunk/fb-contrib/etc/messages.xml
===================================================================
--- trunk/fb-contrib/etc/messages.xml 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/etc/messages.xml 2016-11-23 20:08:45 UTC (rev 1807)
@@ -1665,6 +1665,16 @@
</Details>
</Detector>
+ <Detector class="com.mebigfatguy.fbcontrib.detect.UnsynchronizedSingletonFieldWrites">
+ <Details>
+ <![CDATA[
+ <p>Looks for writes to fields of classes that are believed to be classes used only as Singletons. These
+ classes include Enums, as well as spring beans that are Singleton scoped.</p>
+ <p>It is a fast detector.</p>
+ ]]>
+ </Details>
+ </Detector>
+
<Detector class="com.mebigfatguy.fbcontrib.debug.OCSDebugger">
<Details></Details>
</Detector>
@@ -5679,6 +5689,17 @@
]]>
</Details>
</BugPattern>
+
+ <BugPattern type="USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES">
+ <ShortDescription>Method of Singleton class writes to a field in an unsynchronized manner</ShortDescription>
+ <LongDescription>Method {1} of Singleton class writes to a field in an unsynchronized manner</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method writes to a field of this class. Since this class is seen as a Singleton this can produce race
+ conditions, or cause non-visible changes to other threads, because the field isn't accessed synchronously.
+ ]]>
+ </Details>
+ </BugPattern>
<!-- BugCode -->
@@ -5819,4 +5840,5 @@
<BugCode abbrev="CCI">Concurrent Collection Issues</BugCode>
<BugCode abbrev="UTWR">Use Try With Resources</BugCode>
<BugCode abbrev="SSCU">Suspicious Shaded Class Use</BugCode>
+ <BugCode abbrev="USFW">Unsynchronous Singleton Field Writes</BugCode>
</MessageCollection>
Modified: trunk/fb-contrib/htdocs/index.shtml
===================================================================
--- trunk/fb-contrib/htdocs/index.shtml 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/htdocs/index.shtml 2016-11-23 20:08:45 UTC (rev 1807)
@@ -68,7 +68,7 @@
</li>
</ul>
</p>
- <p style="font-weight: bold;">The latest version of fb-contrib is 6.8.1 available for download
+ <p style="font-weight: bold;">The latest version of fb-contrib is 6.8.2 available for download
<a href="http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22fb-contrib%22">here</a>.</p>
<p style="font-weight: bold;">This version requires FindBugs 3.0.1 or better</p>
<p style="font-weight: bold;">Please note that active development for this project is now done on
Modified: trunk/fb-contrib/htdocs/repository.html
===================================================================
--- trunk/fb-contrib/htdocs/repository.html 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/htdocs/repository.html 2016-11-23 20:08:45 UTC (rev 1807)
@@ -22,7 +22,7 @@
<table style="margin-left: 40px; background-color: #A0A0FF; padding: 20px; border-width: 1px; border-style: outset; border-color: #000000;">
<tr><td><b>GroupId:</b></td><td>com.mebigfatguy.fb-contrib</td></tr>
<tr><td><b>ArtifactId:</b></td><td>fb-contrib</td></tr>
- <tr><td><b>Version:</b></td><td>6.8.1</td></tr>
+ <tr><td><b>Version:</b></td><td>6.8.2</td></tr>
</table>
</div>
Modified: trunk/fb-contrib/pom.xml
===================================================================
--- trunk/fb-contrib/pom.xml 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/pom.xml 2016-11-23 20:08:45 UTC (rev 1807)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.mebigfatguy.fb-contrib</groupId>
<artifactId>fb-contrib</artifactId>
- <version>6.8.1</version>
+ <version>6.8.2</version>
<prerequisites>
<maven>2.2.1</maven>
Modified: trunk/fb-contrib/samples.xml
===================================================================
--- trunk/fb-contrib/samples.xml 2016-11-18 03:39:38 UTC (rev 1806)
+++ trunk/fb-contrib/samples.xml 2016-11-23 20:08:45 UTC (rev 1807)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<BugCollection version="3.0.1" sequence="0" timestamp="1479256649283" analysisTimestamp="1479256649381" release="">
+<BugCollection version="3.0.1" sequence="0" timestamp="1479928382089" analysisTimestamp="1479928382559" release="">
<Project projectName="Samples">
<Jar>/home/dave/dev/fb-contrib/target/classes/samples</Jar>
<AuxClasspathEntry>/home/dave/dev/fb-contrib/lib/javax.servlet.jsp-api-2.3.1.jar</AuxClasspathEntry>
@@ -1516,6 +1516,29 @@
<Message>Called method String.getBytes(Charset)</Message>
</Method>
</BugInstance>
+ <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="1" rank="15" abbrev="DLS" category="STYLE" instanceHash="79def569ec98541fd73e544709b9ac25" instanceOccurrenceNum="0" instanceOccurrenceMax="0" cweid="563">
+ <ShortMessage>Dead store to local variable</ShortMessage>
+ <LongMessage>Dead store to context in new BED_Sample(String)</LongMessage>
+ <Class classname="BED_Sample" primary="true">
+ <SourceLine classname="BED_Sample" start="18" end="105" sourcefile="BED_Sample.java" sourcepath="BED_Sample.java">
+ <Message>At BED_Sample.java:[lines 18-105]</Message>
+ </SourceLine>
+ <Message>In class BED_Sample</Message>
+ </Class>
+ <Method classname="BED_Sample" name="<init>" signature="(Ljava/lang/String;)V" isStatic="false" primary="true">
+ <SourceLine classname="BED_Sample" start="22" end="26" startBytecode="0" endBytecode="16" sourcefile="BED_Sample.java" sourcepath="BED_Sample.java"/>
+ <Message>In method new BED_Sample(String)</Message>
+ </Method>
+ <LocalVariable name="context" register="3" pc="29" role="LOCAL_VARIABLE_NAMED">
+ <Message>Local variable named context</Message>
+ </LocalVariable>
+ <SourceLine classname="BED_Sample" primary="true" start="25" end="25" startBytecode="28" endBytecode="28" sourcefile="BED_Sample.java" sourcepath="BED_Sample.java">
+ <Message>At BED_Sample.java:[line 25]</Message>
+ </SourceLine>
+ <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.DEAD_OBJECT_STORE" value="true"/>
+ <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.LOCAL_NAME" value="context"/>
+ <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.METHOD_RESULT" value="true"/>
+ </BugInstance>
<BugInstance type="DLS_DEAD_LOCAL_STORE" priority="1" rank="15" abbrev="DLS" category="STYLE" instanceHash="d9c72c4d31bddfd053659d13b086adf2" instanceOccurrenceNum="0" instanceOccurrenceMax="0" cweid="563">
<ShortMessage>Dead store to local variable</ShortMessage>
<LongMessage>Dead store to is in BED_Sample.doIt()</LongMessage>
@@ -2401,6 +2424,23 @@
<Message>At CAAL_Sample.java:[line 15]</Message>
</SourceLine>
</BugInstance>
+ <BugInstance type="CAAL_CONFUSING_ARRAY_AS_LIST" priority="2" rank="7" abbrev="CAAL" category="CORRECTNESS" instanceHash="3975618977829f30228696fd98eda368" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Method calls Array.asList on an array of primitive values</ShortMessage>
+ <LongMessage>Method CAAL_Sample.testCAAL(char[]) calls Array.asList on an array of primitive values</LongMessage>
+ <Class classname="CAAL_Sample" primary="true">
+ <SourceLine classname="CAAL_Sample" start="4" end="36" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[lines 4-36]</Message>
+ </SourceLine>
+ <Message>In class CAAL_Sample</Message>
+ </Class>
+ <Method classname="CAAL_Sample" name="testCAAL" signature="([C)V" isStatic="false" primary="true">
+ <SourceLine classname="CAAL_Sample" start="11" end="12" startBytecode="0" endBytecode="78" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java"/>
+ <Message>In method CAAL_Sample.testCAAL(char[])</Message>
+ </Method>
+ <SourceLine classname="CAAL_Sample" primary="true" start="11" end="11" startBytecode="8" endBytecode="8" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[line 11]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="CAAL_CONFUSING_ARRAY_AS_LIST" priority="2" rank="7" abbrev="CAAL" category="CORRECTNESS" instanceHash="9130cff189697a73dc4c8b172b28e88f" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Method calls Array.asList on an array of primitive values</ShortMessage>
<LongMessage>Method CAAL_Sample.testCAAL(double[]) calls Array.asList on an array of primitive values</LongMessage>
@@ -2526,6 +2566,29 @@
<Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.METHOD_RESULT" value="true"/>
<Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.NO_LOADS" value="true"/>
</BugInstance>
+ <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="2" rank="17" abbrev="DLS" category="STYLE" instanceHash="8d45810983ce3547c197ddc3bd02a09a" instanceOccurrenceNum="0" instanceOccurrenceMax="0" cweid="563">
+ <ShortMessage>Dead store to local variable</ShortMessage>
+ <LongMessage>Dead store to l in CAAL_Sample.testCAAL(char[])</LongMessage>
+ <Class classname="CAAL_Sample" primary="true">
+ <SourceLine classname="CAAL_Sample" start="4" end="36" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[lines 4-36]</Message>
+ </SourceLine>
+ <Message>In class CAAL_Sample</Message>
+ </Class>
+ <Method classname="CAAL_Sample" name="testCAAL" signature="([C)V" isStatic="false" primary="true">
+ <SourceLine classname="CAAL_Sample" start="11" end="12" startBytecode="0" endBytecode="8" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java"/>
+ <Message>In method CAAL_Sample.testCAAL(char[])</Message>
+ </Method>
+ <LocalVariable name="l" register="2" pc="12" role="LOCAL_VARIABLE_NAMED">
+ <Message>Local variable named l</Message>
+ </LocalVariable>
+ <SourceLine classname="CAAL_Sample" primary="true" start="11" end="11" startBytecode="11" endBytecode="11" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[line 11]</Message>
+ </SourceLine>
+ <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.LOCAL_NAME" value="l"/>
+ <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.METHOD_RESULT" value="true"/>
+ <Property name="edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.NO_LOADS" value="true"/>
+ </BugInstance>
<BugInstance type="DLS_DEAD_LOCAL_STORE" priority="2" rank="17" abbrev="DLS" category="STYLE" instanceHash="16a66803b6865903daa61b77c398f1ae" instanceOccurrenceNum="0" instanceOccurrenceMax="0" cweid="563">
<ShortMessage>Dead store to local variable</ShortMessage>
<LongMessage>Dead store to l in CAAL_Sample.testCAAL(double[])</LongMessage>
@@ -2694,6 +2757,23 @@
<Message>At CAAL_Sample.java:[line 16]</Message>
</SourceLine>
</BugInstance>
+ <BugInstance type="UC_USELESS_VOID_METHOD" priority="3" rank="20" abbrev="UC" category="STYLE" instanceHash="24df9110e0ec9d2b233d21bf82af853d" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Useless non-empty void method</ShortMessage>
+ <LongMessage>Method CAAL_Sample.testCAAL(char[]) seems to be useless</LongMessage>
+ <Class classname="CAAL_Sample" primary="true">
+ <SourceLine classname="CAAL_Sample" start="4" end="36" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[lines 4-36]</Message>
+ </SourceLine>
+ <Message>In class CAAL_Sample</Message>
+ </Class>
+ <Method classname="CAAL_Sample" name="testCAAL" signature="([C)V" isStatic="false" primary="true">
+ <SourceLine classname="CAAL_Sample" start="11" end="12" startBytecode="0" endBytecode="78" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java"/>
+ <Message>In method CAAL_Sample.testCAAL(char[])</Message>
+ </Method>
+ <SourceLine classname="CAAL_Sample" primary="true" start="12" end="12" startBytecode="12" endBytecode="12" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[line 12]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="UC_USELESS_VOID_METHOD" priority="3" rank="20" abbrev="UC" category="STYLE" instanceHash="c04ebe3ef7884c235addb6c48bd5d1f9" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Useless non-empty void method</ShortMessage>
<LongMessage>Method CAAL_Sample.testCAAL(double[]) seems to be useless</LongMessage>
@@ -2922,6 +3002,30 @@
<Message>At CAAL_Sample.java:[line 15]</Message>
</SourceLine>
</BugInstance>
+ <BugInstance type="VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG" priority="1" rank="7" abbrev="VA" category="CORRECTNESS" instanceHash="17bf4f8f0183d1e020ae2fd1b0821168" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Primitive array passed to function expecting a variable number of object arguments</ShortMessage>
+ <LongMessage>char[] passed to varargs method java.util.Arrays.asList(Object[]) in CAAL_Sample.testCAAL(char[])</LongMessage>
+ <Class classname="CAAL_Sample" primary="true">
+ <SourceLine classname="CAAL_Sample" start="4" end="36" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[lines 4-36]</Message>
+ </SourceLine>
+ <Message>In class CAAL_Sample</Message>
+ </Class>
+ <Method classname="CAAL_Sample" name="testCAAL" signature="([C)V" isStatic="false" primary="true">
+ <SourceLine classname="CAAL_Sample" start="11" end="12" startBytecode="0" endBytecode="78" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java"/>
+ <Message>In method CAAL_Sample.testCAAL(char[])</Message>
+ </Method>
+ <Type descriptor="[C" role="TYPE_FOUND">
+ <Message>Actual type char[]</Message>
+ </Type>
+ <Method classname="java.util.Arrays" name="asList" signature="([Ljava/lang/Object;)Ljava/util/List;" isStatic="true" role="METHOD_CALLED">
+ <SourceLine classname="java.util.Arrays" start="3800" end="3800" startBytecode="0" endBytecode="32" sourcefile="Arrays.java" sourcepath="java/util/Arrays.java"/>
+ <Message>Called method java.util.Arrays.asList(Object[])</Message>
+ </Method>
+ <SourceLine classname="CAAL_Sample" primary="true" start="11" end="11" startBytecode="8" endBytecode="8" sourcefile="CAAL_Sample.java" sourcepath="CAAL_Sample.java">
+ <Message>At CAAL_Sample.java:[line 11]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG" priority="1" rank="7" abbrev="VA" category="CORRECTNESS" instanceHash="c2a4b2be51b7ea4a120c2699541e106f" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Primitive array passed to function expecting a variable number of object arguments</ShortMessage>
<LongMessage>double[] passed to varargs method java.util.Arrays.asList(Object[]) in CAAL_Sample.testCAAL(double[])</LongMessage>
@@ -3257,14 +3361,14 @@
<Message>In class CAO_Sample</Message>
</Class>
<Method classname="CAO_Sample" name="testci" signature="(I)V" isStatic="false" primary="true">
- <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/>
+ <SourceLine classname="CAO_Sample" start="8" end="9" startBytecode="0" endBytecode="64" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/>
<Message>In method CAO_Sample.testci(int)</Message>
</Method>
<String value="- Method declared public but could be declared private">
<Message>Value - Method declared public but could be declared private</Message>
</String>
- <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java" synthetic="true">
- <Message>In CAO_Sample.java</Message>
+ <SourceLine classname="CAO_Sample" start="8" end="9" startBytecode="0" endBytecode="64" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java" synthetic="true">
+ <Message>At CAO_Sample.java:[lines 8-9]</Message>
</SourceLine>
</BugInstance>
<BugInstance type="OPM_OVERLY_PERMISSIVE_METHOD" priority="3" rank="20" abbrev="OPM" category="STYLE" instanceHash="ade4bec616aadf73e7d58c481278d97e" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
@@ -3277,14 +3381,14 @@
<Message>In class CAO_Sample</Message>
</Class>
<Method classname="CAO_Sample" name="testcj" signature="(J)V" isStatic="false" primary="true">
- <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/>
+ <SourceLine classname="CAO_Sample" start="16" end="17" startBytecode="0" endBytecode="64" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/>
<Message>In method CAO_Sample.testcj(long)</Message>
</Method>
<String value="- Method declared public but could be declared private">
<Message>Value - Method declared public but could be declared private</Message>
</String>
- <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java" synthetic="true">
- <Message>In CAO_Sample.java</Message>
+ <SourceLine classname="CAO_Sample" start="16" end="17" startBytecode="0" endBytecode="64" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java" synthetic="true">
+ <Message>At CAO_Sample.java:[lines 16-17]</Message>
</SourceLine>
</BugInstance>
<BugInstance type="CBC_CONTAINS_BASED_CONDITIONAL" priority="2" rank="17" abbrev="CBC" category="STYLE" instanceHash="9fa3a87f741346028d7886158f00bdae" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
@@ -9488,23 +9592,6 @@
<Message>At ISB_Sample.java:[line 87]</Message>
</SourceLine>
</BugInstance>
- <BugInstance type="UPM_UNCALLED_PRIVATE_METHOD" priority="3" rank="20" abbrev="UPM" category="PERFORMANCE" instanceHash="bb44e2770c499a3b25207bc8b824abb2" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
- <ShortMessage>Private method is never called</ShortMessage>
- <LongMessage>Private method ISB_Sample.getBigger(String, String) is never called</LongMessage>
- <Class classname="ISB_Sample" primary="true">
- <SourceLine classname="ISB_Sample" start="5" end="127" sourcefile="ISB_Sample.java" sourcepath="ISB_Sample.java">
- <Message>At ISB_Sample.java:[lines 5-127]</Message>
- </SourceLine>
- <Message>In class ISB_Sample</Message>
- </Class>
- <Method classname="ISB_Sample" name="getBigger" signature="(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" isStatic="true" primary="true">
- <SourceLine classname="ISB_Sample" start="100" end="102" startBytecode="0" endBytecode="83" sourcefile="ISB_Sample.java" sourcepath="ISB_Sample.java"/>
- <Message>In method ISB_Sample.getBigger(String, String)</Message>
- </Method>
- <SourceLine classname="ISB_Sample" start="100" end="102" startBytecode="0" endBytecode="83" sourcefile="ISB_Sample.java" sourcepath="ISB_Sample.java" synthetic="true">
- <Message>At ISB_Sample.java:[lines 100-102]</Message>
- </SourceLine>
- </BugInstance>
<BugInstance type="USBR_UNNECESSARY_STORE_BEFORE_RETURN" priority="2" rank="17" abbrev="USBR" category="STYLE" instanceHash="ac5afe94dd68746f7b2d7ef7adcf0c9e" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Method stores return result in local before immediately returning it</ShortMessage>
<LongMessage>Method ISB_Sample.testISB8() stores return result in local before immediately returning it</LongMessage>
@@ -11270,6 +11357,23 @@
<Message>Value LO_Sample</Message>
</String>
</BugInstance>
+ <BugInstance type="LO_SUSPECT_LOG_PARAMETER" priority="2" rank="7" abbrev="LO" category="CORRECTNESS" instanceHash="9b05ba81d400239efa6dc9159d301831" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Constructor declares a Logger parameter</ShortMessage>
+ <LongMessage>Constructor new LO_Sample(Logger) declares a Logger parameter</LongMessage>
+ <Class classname="LO_Sample" primary="true">
+ <SourceLine classname="LO_Sample" start="15" end="129" sourcefile="LO_Sample.java" sourcepath="LO_Sample.java">
+ <Message>At LO_Sample.java:[lines 15-129]</Message>
+ </SourceLine>
+ <Message>In class LO_Sample</Message>
+ </Class>
+ <Method classname="LO_Sample" name="<init>" signature="(Lorg/apache/log4j/Logger;)V" isStatic="false" primary="true">
+ <SourceLine classname="LO_Sample" start="38" end="40" startBytecode="0" endBytecode="69" sourcefile="LO_Sample.java" sourcepath="LO_Sample.java"/>
+ <Message>In method new LO_Sample(Logger)</Message>
+ </Method>
+ <SourceLine classname="LO_Sample" start="38" end="40" startBytecode="0" endBytecode="69" sourcefile="LO_Sample.java" sourcepath="LO_Sample.java" synthetic="true">
+ <Message>At LO_Sample.java:[lines 38-40]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="NP_ALWAYS_NULL_EXCEPTION" priority="1" rank="7" abbrev="NP" category="CORRECTNESS" instanceHash="9e480fcdab07a3541fb8d0e22bcd9be4" instanceOccurrenceNum="0" instanceOccurrenceMax="0" cweid="476">
<ShortMessage>Null pointer dereference in method on exception path</ShortMessage>
<LongMessage>Null pointer dereference of is in LO_Sample.testStutter() on exception path</LongMessage>
@@ -11339,14 +11443,14 @@
<Message>In class LO_Sample</Message>
</Class>
<Method classname="LO_Sample" name="<init>" signature="(Lorg/apache/log4j/Logger;)V" isStatic="false" primary="true">
- <SourceLine classname="LO_Sample" sourcefile="LO_Sample.java" sourcepath="LO_Sample.java"/>
+ <SourceLine classname="LO_Sample" start="38" end="40" startBytecode="0" endBytecode="69" sourcefile="LO_Sample.java" sourcepath="LO_Sample.java"/>
<Message>In method new LO_Sample(Logger)</Message>
</Method>
<String value="- Method declared public but could be declared private">
<Message>Value - Method declared public but could be declared private</Message>
</String>
- <SourceLine classname="LO_Sample" sourcefile="LO_Sample.java" sourcepath="LO_Sample.java" synthetic="true">
- <Message>In LO_Sample.java</Message>
+ <SourceLine classname="LO_Sample" start="38" end="40" startBytecode="0" endBytecode="69" sourcefile="LO_Sample.java" sourcepath="LO_Sample.java" synthetic="true">
+ <Message>At LO_Sample.java:[lines 38-40]</Message>
</SourceLine>
</BugInstance>
<BugInstance type="OS_OPEN_STREAM" priority="2" rank="16" abbrev="OS" category="BAD_PRACTICE" instanceHash="fb704331445d9f9d7a142368140da5ab" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
@@ -21751,6 +21855,26 @@
<Message>At PCOA_Sample.java:[lines 3-30]</Message>
</SourceLine>
</BugInstance>
+ <BugInstance type="OPM_OVERLY_PERMISSIVE_METHOD" priority="3" rank="20" abbrev="OPM" category="STYLE" instanceHash="fd022969c43d0b90018ba04d6bae5023" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>This method is declared more permissively than is used in the code base</ShortMessage>
+ <LongMessage>This method PCOA_Sample.nonOverridableMethod() is declared more permissively than is used in the code base</LongMessage>
+ <Class classname="PCOA_Sample" primary="true">
+ <SourceLine classname="PCOA_Sample" start="3" end="30" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java">
+ <Message>At PCOA_Sample.java:[lines 3-30]</Message>
+ </SourceLine>
+ <Message>In class PCOA_Sample</Message>
+ </Class>
+ <Method classname="PCOA_Sample" name="nonOverridableMethod" signature="()V" isStatic="false" primary="true">
+ <SourceLine classname="PCOA_Sample" start="26" end="26" startBytecode="0" endBytecode="42" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java"/>
+ <Message>In method PCOA_Sample.nonOverridableMethod()</Message>
+ </Method>
+ <String value="- Method declared public but could be declared private">
+ <Message>Value - Method declared public but could be declared private</Message>
+ </String>
+ <SourceLine classname="PCOA_Sample" start="26" end="26" startBytecode="0" endBytecode="42" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java" synthetic="true">
+ <Message>At PCOA_Sample.java:[line 26]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="OPM_OVERLY_PERMISSIVE_METHOD" priority="3" rank="20" abbrev="OPM" category="STYLE" instanceHash="91ab82fc9f135956756569048b3528e1" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>This method is declared more permissively than is used in the code base</ShortMessage>
<LongMessage>This method PCOA_Sample.overridableMethod() is declared more permissively than is used in the code base</LongMessage>
@@ -21808,40 +21932,6 @@
<Message>At PCOA_Sample.java:[line 29]</Message>
</SourceLine>
</BugInstance>
- <BugInstance type="UPM_UNCALLED_PRIVATE_METHOD" priority="3" rank="20" abbrev="UPM" category="PERFORMANCE" instanceHash="bbad39c94dbc7d829302b3d23130500a" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
- <ShortMessage>Private method is never called</ShortMessage>
- <LongMessage>Private method PCOA_Sample.privateCallsOverridable() is never called</LongMessage>
- <Class classname="PCOA_Sample" primary="true">
- <SourceLine classname="PCOA_Sample" start="3" end="30" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java">
- <Message>At PCOA_Sample.java:[lines 3-30]</Message>
- </SourceLine>
- <Message>In class PCOA_Sample</Message>
- </Class>
- <Method classname="PCOA_Sample" name="privateCallsOverridable" signature="()V" isStatic="false" primary="true">
- <SourceLine classname="PCOA_Sample" start="29" end="30" startBytecode="0" endBytecode="50" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java"/>
- <Message>In method PCOA_Sample.privateCallsOverridable()</Message>
- </Method>
- <SourceLine classname="PCOA_Sample" start="29" end="30" startBytecode="0" endBytecode="50" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java" synthetic="true">
- <Message>At PCOA_Sample.java:[lines 29-30]</Message>
- </SourceLine>
- </BugInstance>
- <BugInstance type="UPM_UNCALLED_PRIVATE_METHOD" priority="3" rank="20" abbrev="UPM" category="PERFORMANCE" instanceHash="80c6202fa8a34d7b906f1aa16f776be2" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
- <ShortMessage>Private method is never called</ShortMessage>
- <LongMessage>Private method PCOA_Sample.privateNonFinalMethod() is never called</LongMessage>
- <Class classname="PCOA_Sample" primary="true">
- <SourceLine classname="PCOA_Sample" start="3" end="30" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java">
- <Message>At PCOA_Sample.java:[lines 3-30]</Message>
- </SourceLine>
- <Message>In class PCOA_Sample</Message>
- </Class>
- <Method classname="PCOA_Sample" name="privateNonFinalMethod" signature="()V" isStatic="false" primary="true">
- <SourceLine classname="PCOA_Sample" start="23" end="23" startBytecode="0" endBytecode="42" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java"/>
- <Message>In method PCOA_Sample.privateNonFinalMethod()</Message>
- </Method>
- <SourceLine classname="PCOA_Sample" start="23" end="23" startBytecode="0" endBytecode="42" sourcefile="PCOA_Sample.java" sourcepath="PCOA_Sample.java" synthetic="true">
- <Message>At PCOA_Sample.java:[line 23]</Message>
- </SourceLine>
- </BugInstance>
<BugInstance type="IMC_IMMATURE_CLASS_NO_PACKAGE" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="4da66eafef8d0a5a2fd51eed622ce9f0" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Class is defined in the default package</ShortMessage>
<LongMessage>Class PCOA_Sample$FinalClass id defined in the default package</LongMessage>
@@ -28361,6 +28451,23 @@
<Message>At SPP_Sample.java:[line 61]</Message>
</SourceLine>
</BugInstance>
+ <BugInstance type="FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER" priority="1" rank="6" abbrev="FE" category="CORRECTNESS" instanceHash="928c8daeafb0028a8ef59951281d17a1" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Doomed test for equality to NaN</ShortMessage>
+ <LongMessage>Doomed test for equality to NaN in SPP_Sample.testNAN(float)</LongMessage>
+ <Class classname="SPP_Sample" primary="true">
+ <SourceLine classname="SPP_Sample" start="26" end="432" sourcefile="SPP_Sample.java" sourcepath="SPP_Sample.java">
+ <Message>At SPP_Sample.java:[lines 26-432]</Message>
+ </SourceLine>
+ <Message>In class SPP_Sample</Message>
+ </Class>
+ <Method classname="SPP_Sample" name="testNAN" signature="(F)V" isStatic="false" primary="true">
+ <SourceLine classname="SPP_Sample" start="87" end="90" startBytecode="0" endBytecode="84" sourcefile="SPP_Sample.java" sourcepath="SPP_Sample.java"/>
+ <Message>In method SPP_Sample.testNAN(float)</Message>
+ </Method>
+ <SourceLine classname="SPP_Sample" primary="true" start="87" end="87" startBytecode="3" endBytecode="3" sourcefile="SPP_Sample.java" sourcepath="SPP_Sample.java">
+ <Message>At SPP_Sample.java:[line 87]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER" priority="1" rank="6" abbrev="FE" category="CORRECTNESS" instanceHash="faa9639f56568b33510e4ba9c7bb8d0d" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Doomed test for equality to NaN</ShortMessage>
<LongMessage>Doomed test for equality to NaN in SPP_Sample.testNAN2(Double)</LongMessage>
@@ -33777,6 +33884,23 @@
<Message>At UEC_Sample.java:[lines 1-11]</Message>
</SourceLine>
</BugInstance>
+ <BugInstance type="DM_STRING_TOSTRING" priority="3" rank="20" abbrev="Dm" category="PERFORMANCE" instanceHash="23a4ba620b71c65c5c200ff59c663c4c" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Method invokes toString() method on a String</ShortMessage>
+ <LongMessage>UMTP_Sample.fpUseClass(Class) invokes toString() method on a String</LongMessage>
+ <Class classname="UMTP_Sample" primary="true">
+ <SourceLine classname="UMTP_Sample" start="4" end="41" sourcefile="UMTP_Sample.java" sourcepath="UMTP_Sample.java">
+ <Message>At UMTP_Sample.java:[lines 4-41]</Message>
+ </SourceLine>
+ <Message>In class UMTP_Sample</Message>
+ </Class>
+ <Method classname="UMTP_Sample" name="fpUseClass" signature="(Ljava/lang/Class;)Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="UMTP_Sample" start="18" end="18" startBytecode="0" endBytecode="77" sourcefile="UMTP_Sample.java" sourcepath="UMTP_Sample.java"/>
+ <Message>In method UMTP_Sample.fpUseClass(Class)</Message>
+ </Method>
+ <SourceLine classname="UMTP_Sample" primary="true" start="18" end="18" startBytecode="4" endBytecode="4" sourcefile="UMTP_Sample.java" sourcepath="UMTP_Sample.java">
+ <Message>At UMTP_Sample.java:[line 18]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="IMC_IMMATURE_CLASS_NO_PACKAGE" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="1743d798a28a9204e043c118961af4f1" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Class is defined in the default package</ShortMessage>
<LongMessage>Class UMTP_Sample id defined in the default package</LongMessage>
@@ -34511,6 +34635,313 @@
<Message>At USBR_Sample.java:[line 11]</Message>
</SourceLine>
</BugInstance>
+ <BugInstance type="FCBL_FIELD_COULD_BE_LOCAL" priority="2" rank="7" abbrev="FCBL" category="CORRECTNESS" instanceHash="3c49a28c984213110186414194179c34" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class defines fields that are used only as locals</ShortMessage>
+ <LongMessage>Class USFW1_Sample defines fields that are used only as locals</LongMessage>
+ <Class classname="USFW1_Sample" primary="true">
+ <SourceLine classname="USFW1_Sample" start="19" end="25" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 19-25]</Message>
+ </SourceLine>
+ <Message>In class USFW1_Sample</Message>
+ </Class>
+ <Field classname="USFW1_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW1_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW1_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW1_Sample" primary="true" start="24" end="24" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 24]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_PACKAGE" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="e34081ca9ca24818de6ee6090f70dd77" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class is defined in the default package</ShortMessage>
+ <LongMessage>Class USFW1_Sample id defined in the default package</LongMessage>
+ <Class classname="USFW1_Sample" primary="true">
+ <SourceLine classname="USFW1_Sample" start="19" end="25" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 19-25]</Message>
+ </SourceLine>
+ <Message>In class USFW1_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW1_Sample" start="19" end="25" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 19-25]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_TOSTRING" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="b44204aa983e441147720ad6955da95" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class does not implement a toString method</ShortMessage>
+ <LongMessage>Class USFW1_Sample does not implement a toString method</LongMessage>
+ <Class classname="USFW1_Sample" primary="true">
+ <SourceLine classname="USFW1_Sample" start="19" end="25" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 19-25]</Message>
+ </SourceLine>
+ <Message>In class USFW1_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW1_Sample" start="19" end="25" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 19-25]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="URF_UNREAD_FIELD" priority="2" rank="18" abbrev="UrF" category="PERFORMANCE" instanceHash="c20b99d5c97f1999a33ef65bb1d7db60" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Unread field</ShortMessage>
+ <LongMessage>Unread field: USFW1_Sample.s</LongMessage>
+ <Class classname="USFW1_Sample" primary="true">
+ <SourceLine classname="USFW1_Sample" start="19" end="25" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 19-25]</Message>
+ </SourceLine>
+ <Message>In class USFW1_Sample</Message>
+ </Class>
+ <Field classname="USFW1_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW1_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW1_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW1_Sample" primary="true" start="24" end="24" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 24]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES" priority="2" rank="7" abbrev="USFW" category="CORRECTNESS" instanceHash="a531aa141737cb0f3b69bdffe883477d" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Method of Singleton class writes to a field in an unsynchronized manner</ShortMessage>
+ <LongMessage>Method USFW1_Sample.writeToField() of Singleton class writes to a field in an unsynchronized manner</LongMessage>
+ <Class classname="USFW1_Sample" primary="true">
+ <SourceLine classname="USFW1_Sample" start="19" end="25" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 19-25]</Message>
+ </SourceLine>
+ <Message>In class USFW1_Sample</Message>
+ </Class>
+ <Method classname="USFW1_Sample" name="writeToField" signature="()V" isStatic="false" primary="true">
+ <SourceLine classname="USFW1_Sample" start="24" end="25" startBytecode="0" endBytecode="52" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java"/>
+ <Message>In method USFW1_Sample.writeToField()</Message>
+ </Method>
+ <SourceLine classname="USFW1_Sample" primary="true" start="24" end="24" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 24]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="FCBL_FIELD_COULD_BE_LOCAL" priority="2" rank="7" abbrev="FCBL" category="CORRECTNESS" instanceHash="d71900b03cc1b974d2158b4f506ac356" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class defines fields that are used only as locals</ShortMessage>
+ <LongMessage>Class USFW2_Sample defines fields that are used only as locals</LongMessage>
+ <Class classname="USFW2_Sample" primary="true">
+ <SourceLine classname="USFW2_Sample" start="30" end="36" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 30-36]</Message>
+ </SourceLine>
+ <Message>In class USFW2_Sample</Message>
+ </Class>
+ <Field classname="USFW2_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW2_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW2_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW2_Sample" primary="true" start="35" end="35" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 35]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_PACKAGE" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="9a22440126fafa919b1dcf01f20b1424" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class is defined in the default package</ShortMessage>
+ <LongMessage>Class USFW2_Sample id defined in the default package</LongMessage>
+ <Class classname="USFW2_Sample" primary="true">
+ <SourceLine classname="USFW2_Sample" start="30" end="36" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 30-36]</Message>
+ </SourceLine>
+ <Message>In class USFW2_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW2_Sample" start="30" end="36" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 30-36]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_TOSTRING" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="21a68bfb2f6bae7766e7622442032bba" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class does not implement a toString method</ShortMessage>
+ <LongMessage>Class USFW2_Sample does not implement a toString method</LongMessage>
+ <Class classname="USFW2_Sample" primary="true">
+ <SourceLine classname="USFW2_Sample" start="30" end="36" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 30-36]</Message>
+ </SourceLine>
+ <Message>In class USFW2_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW2_Sample" start="30" end="36" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 30-36]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="URF_UNREAD_FIELD" priority="2" rank="18" abbrev="UrF" category="PERFORMANCE" instanceHash="ccca16fb63e7d50e321e7ad447e1b0f9" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Unread field</ShortMessage>
+ <LongMessage>Unread field: USFW2_Sample.s</LongMessage>
+ <Class classname="USFW2_Sample" primary="true">
+ <SourceLine classname="USFW2_Sample" start="30" end="36" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 30-36]</Message>
+ </SourceLine>
+ <Message>In class USFW2_Sample</Message>
+ </Class>
+ <Field classname="USFW2_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW2_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW2_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW2_Sample" primary="true" start="35" end="35" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 35]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES" priority="2" rank="7" abbrev="USFW" category="CORRECTNESS" instanceHash="85217e5671ddd28c2741952c24cf6923" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Method of Singleton class writes to a field in an unsynchronized manner</ShortMessage>
+ <LongMessage>Method USFW2_Sample.writeToField() of Singleton class writes to a field in an unsynchronized manner</LongMessage>
+ <Class classname="USFW2_Sample" primary="true">
+ <SourceLine classname="USFW2_Sample" start="30" end="36" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 30-36]</Message>
+ </SourceLine>
+ <Message>In class USFW2_Sample</Message>
+ </Class>
+ <Method classname="USFW2_Sample" name="writeToField" signature="()V" isStatic="false" primary="true">
+ <SourceLine classname="USFW2_Sample" start="35" end="36" startBytecode="0" endBytecode="52" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java"/>
+ <Message>In method USFW2_Sample.writeToField()</Message>
+ </Method>
+ <SourceLine classname="USFW2_Sample" primary="true" start="35" end="35" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 35]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="FCBL_FIELD_COULD_BE_LOCAL" priority="2" rank="7" abbrev="FCBL" category="CORRECTNESS" instanceHash="81c66402d84fee76107634f2213951c7" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class defines fields that are used only as locals</ShortMessage>
+ <LongMessage>Class USFW3_Sample defines fields that are used only as locals</LongMessage>
+ <Class classname="USFW3_Sample" primary="true">
+ <SourceLine classname="USFW3_Sample" start="41" end="47" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 41-47]</Message>
+ </SourceLine>
+ <Message>In class USFW3_Sample</Message>
+ </Class>
+ <Field classname="USFW3_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW3_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW3_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW3_Sample" primary="true" start="46" end="46" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 46]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_PACKAGE" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="dc5fcd2202d7fee9c733a927e430b0bd" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class is defined in the default package</ShortMessage>
+ <LongMessage>Class USFW3_Sample id defined in the default package</LongMessage>
+ <Class classname="USFW3_Sample" primary="true">
+ <SourceLine classname="USFW3_Sample" start="41" end="47" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 41-47]</Message>
+ </SourceLine>
+ <Message>In class USFW3_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW3_Sample" start="41" end="47" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 41-47]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_TOSTRING" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="3acb5e1f761eee7eb0dc0e8d60a00ce1" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class does not implement a toString method</ShortMessage>
+ <LongMessage>Class USFW3_Sample does not implement a toString method</LongMessage>
+ <Class classname="USFW3_Sample" primary="true">
+ <SourceLine classname="USFW3_Sample" start="41" end="47" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 41-47]</Message>
+ </SourceLine>
+ <Message>In class USFW3_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW3_Sample" start="41" end="47" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 41-47]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="URF_UNREAD_FIELD" priority="2" rank="18" abbrev="UrF" category="PERFORMANCE" instanceHash="480ff380bd8ac61ccd672c6775e00162" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Unread field</ShortMessage>
+ <LongMessage>Unread field: USFW3_Sample.s</LongMessage>
+ <Class classname="USFW3_Sample" primary="true">
+ <SourceLine classname="USFW3_Sample" start="41" end="47" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 41-47]</Message>
+ </SourceLine>
+ <Message>In class USFW3_Sample</Message>
+ </Class>
+ <Field classname="USFW3_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW3_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW3_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW3_Sample" primary="true" start="46" end="46" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 46]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="FCBL_FIELD_COULD_BE_LOCAL" priority="2" rank="7" abbrev="FCBL" category="CORRECTNESS" instanceHash="8f39f55b61442fb46343705463810554" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class defines fields that are used only as locals</ShortMessage>
+ <LongMessage>Class USFW_Sample defines fields that are used only as locals</LongMessage>
+ <Class classname="USFW_Sample" primary="true">
+ <SourceLine classname="USFW_Sample" start="8" end="14" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 8-14]</Message>
+ </SourceLine>
+ <Message>In class USFW_Sample</Message>
+ </Class>
+ <Field classname="USFW_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW_Sample" primary="true" start="13" end="13" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 13]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_PACKAGE" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="bdfff8aa127727983cdcf921ea39e916" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class is defined in the default package</ShortMessage>
+ <LongMessage>Class USFW_Sample id defined in the default package</LongMessage>
+ <Class classname="USFW_Sample" primary="true">
+ <SourceLine classname="USFW_Sample" start="8" end="14" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 8-14]</Message>
+ </SourceLine>
+ <Message>In class USFW_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW_Sample" start="8" end="14" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 8-14]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="IMC_IMMATURE_CLASS_NO_TOSTRING" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="19ce30e518c5878695c1be18b1124063" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Class does not implement a toString method</ShortMessage>
+ <LongMessage>Class USFW_Sample does not implement a toString method</LongMessage>
+ <Class classname="USFW_Sample" primary="true">
+ <SourceLine classname="USFW_Sample" start="8" end="14" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 8-14]</Message>
+ </SourceLine>
+ <Message>In class USFW_Sample</Message>
+ </Class>
+ <SourceLine classname="USFW_Sample" start="8" end="14" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java" synthetic="true">
+ <Message>At USFW_Sample.java:[lines 8-14]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="URF_UNREAD_FIELD" priority="2" rank="18" abbrev="UrF" category="PERFORMANCE" instanceHash="d2d350004426f5b9cc2d0a44562e0720" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Unread field</ShortMessage>
+ <LongMessage>Unread field: USFW_Sample.s</LongMessage>
+ <Class classname="USFW_Sample" primary="true">
+ <SourceLine classname="USFW_Sample" start="8" end="14" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 8-14]</Message>
+ </SourceLine>
+ <Message>In class USFW_Sample</Message>
+ </Class>
+ <Field classname="USFW_Sample" name="s" signature="Ljava/lang/String;" isStatic="false" primary="true">
+ <SourceLine classname="USFW_Sample" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>In USFW_Sample.java</Message>
+ </SourceLine>
+ <Message>Field USFW_Sample.s</Message>
+ </Field>
+ <SourceLine classname="USFW_Sample" primary="true" start="13" end="13" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 13]</Message>
+ </SourceLine>
+ </BugInstance>
+ <BugInstance type="USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES" priority="2" rank="7" abbrev="USFW" category="CORRECTNESS" instanceHash="bd51f08cc960e76c1ac83210ebdd3c17" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
+ <ShortMessage>Method of Singleton class writes to a field in an unsynchronized manner</ShortMessage>
+ <LongMessage>Method USFW_Sample.writeToField() of Singleton class writes to a field in an unsynchronized manner</LongMessage>
+ <Class classname="USFW_Sample" primary="true">
+ <SourceLine classname="USFW_Sample" start="8" end="14" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[lines 8-14]</Message>
+ </SourceLine>
+ <Message>In class USFW_Sample</Message>
+ </Class>
+ <Method classname="USFW_Sample" name="writeToField" signature="()V" isStatic="false" primary="true">
+ <SourceLine classname="USFW_Sample" start="13" end="14" startBytecode="0" endBytecode="52" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java"/>
+ <Message>In method USFW_Sample.writeToField()</Message>
+ </Method>
+ <SourceLine classname="USFW_Sample" primary="true" start="13" end="13" startBytecode="3" endBytecode="3" sourcefile="USFW_Sample.java" sourcepath="USFW_Sample.java">
+ <Message>At USFW_Sample.java:[line 13]</Message>
+ </SourceLine>
+ </BugInstance>
<BugInstance type="IMC_IMMATURE_CLASS_NO_PACKAGE" priority="3" rank="20" abbrev="IMC" category="STYLE" instanceHash="a6e119a301a05ba89ab95f33ca3e7e87" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Class is defined in the default package</ShortMessage>
<LongMessage>Class USS_Sample id defined in the default package</LongMessage>
@@ -37827,6 +38258,16 @@
]]></Details>
</BugPattern>
+ <BugPattern type="LO_SUSPECT_LOG_PARAMETER" abbrev="LO" category="CORRECTNESS">
+ <ShortDescription>Constructor declares a Logger parameter</ShortDescription>
+ <Details><![CDATA[
+
+ <p>This constructor declares a parameter that is a Logger. As loggers are meant to be
+ created statically per class, it doesn't make sense that you would pass a Logger from one
+ class to another. Declare the Logger static in each class instead.</p>
+
+ ]]></Details>
+ </BugPattern>
<BugPattern type="SPP_CONVERSION_OF_STRING_LITERAL" abbrev="SPP" category="CORRECTNESS">
<ShortDescription>Method converts a String literal</ShortDescription>
<Details><![CDATA[
@@ -37870,6 +38311,15 @@
]]></Details>
</BugPattern>
+ <BugPattern type="USFW_UNSYNCHRONIZED_SINGLETON_FIELD_WRITES" abbrev="USFW" category="CORRECTNESS">
+ <ShortDescription>Method of Singleton class writes to a field in an unsynchronized manner</ShortDescription>
+ <Details><![CDATA[
+
+ <p>This method writes to a field of this class. Since this class is seen as a Singleton this can produce race
+ conditions, or cause non-visible changes to other threads, because the field isn't accessed synchronously.
+
+ ...
[truncated message content] |