fb-contrib-commit Mailing List for fb-contrib (Page 39)
Brought to you by:
dbrosius
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(56) |
Oct
(60) |
Nov
(58) |
Dec
(89) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(66) |
Feb
(55) |
Mar
(85) |
Apr
(115) |
May
(35) |
Jun
(28) |
Jul
(3) |
Aug
(48) |
Sep
(37) |
Oct
(22) |
Nov
(14) |
Dec
(66) |
2007 |
Jan
(45) |
Feb
(63) |
Mar
(10) |
Apr
(1) |
May
(1) |
Jun
(12) |
Jul
|
Aug
|
Sep
(25) |
Oct
(21) |
Nov
(39) |
Dec
|
2008 |
Jan
(7) |
Feb
|
Mar
(26) |
Apr
(5) |
May
(2) |
Jun
(32) |
Jul
(9) |
Aug
(10) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
|
2009 |
Jan
(10) |
Feb
(31) |
Mar
(32) |
Apr
(35) |
May
(25) |
Jun
|
Jul
(31) |
Aug
(10) |
Sep
(95) |
Oct
(35) |
Nov
(10) |
Dec
(34) |
2010 |
Jan
(90) |
Feb
(4) |
Mar
(7) |
Apr
(20) |
May
(20) |
Jun
(13) |
Jul
(7) |
Aug
(18) |
Sep
(25) |
Oct
(4) |
Nov
(16) |
Dec
(2) |
2011 |
Jan
(1) |
Feb
|
Mar
(11) |
Apr
(3) |
May
(2) |
Jun
(26) |
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
2012 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(14) |
Nov
(3) |
Dec
(4) |
2013 |
Jan
(3) |
Feb
(2) |
Mar
(1) |
Apr
(4) |
May
|
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(3) |
2014 |
Jan
(4) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(3) |
Dec
(3) |
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
(7) |
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(5) |
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
(3) |
2018 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(5) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dbr...@us...> - 2007-06-26 21:55:46
|
Revision: 891 http://svn.sourceforge.net/fb-contrib/?rev=891&view=rev Author: dbrosius Date: 2007-06-26 14:55:38 -0700 (Tue, 26 Jun 2007) Log Message: ----------- remove false positives when the add is in a conditional (inside the loop) Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-06-26 21:27:23 UTC (rev 890) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-06-26 21:55:38 UTC (rev 891) @@ -38,8 +38,8 @@ private OpcodeStack stack; /** register to alias register */ private Map<Integer, Integer> userValues; - /** alias register to loop end */ - private Map<Integer, Integer> loops; + /** alias register to loop info */ + private Map<Integer, LoopInfo> loops; /** * constructs a UTA detector given the reporter to report bugs on @@ -82,7 +82,7 @@ try { stack.resetForMethodEntry(this); userValues = new HashMap<Integer, Integer>(); - loops = new HashMap<Integer, Integer>(); + loops = new HashMap<Integer, LoopInfo>(); super.visitCode(obj); } finally { userValues = null; @@ -130,8 +130,8 @@ if (reg >= 0) { uValue = (Integer)valueItem.getUserValue(); if (uValue != null) { - Integer loopEnd = loops.get(uValue); - if ((loopEnd != null) && (getPC() < loopEnd.intValue())) { + LoopInfo loop = loops.get(uValue); + if ((loop != null) && loop.isInLoop(getPC())) { bugReporter.reportBug(new BugInstance(this, "UAA_USE_ADD_ALL", NORMAL_PRIORITY) .addClass(this) .addMethod(this) @@ -164,12 +164,24 @@ OpcodeStack.Item itm = stack.getStackItem(0); uValue = (Integer)itm.getUserValue(); if (uValue != null) { - loops.put(uValue, Integer.valueOf(getBranchTarget())); + loops.put(uValue, new LoopInfo(getPC(), getBranchTarget())); } } + } else { + LoopInfo loop = findLoop(getPC()); + if (loop != null) { + loop.addConditionalRange(getPC(), getBranchTarget()); + } } } } + } else if ((seen > IFEQ) && (seen <= IF_ACMPNE)) { + if (getBranchOffset() > 0) { + LoopInfo loop = findLoop(getPC()); + if (loop != null) { + loop.addConditionalRange(getPC(), getBranchTarget()); + } + } } else if (seen == CHECKCAST) { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); @@ -225,4 +237,45 @@ return -1; } + + private LoopInfo findLoop(int pc) { + for (LoopInfo loop : loops.values()) { + if (loop.isInLoop(pc)) + return loop; + } + + return null; + } + + static class LoopInfo + { + private int start; + private int end; + private Map<Integer, Integer> conditionalRanges = new HashMap<Integer, Integer>(); + + public LoopInfo(int loopStart, int loopEnd) + { + start = loopStart; + end = loopEnd; + } + + public void addConditionalRange(int condStart, int condEnd) + { + conditionalRanges.put(Integer14.valueOf(condStart), Integer14.valueOf(condEnd)); + } + + public boolean isInLoop(int pc) + { + if ((pc < start) || (pc > end)) + return false; + + for (Map.Entry<Integer, Integer> entry : conditionalRanges.entrySet()) + { + if ((pc >= entry.getKey().intValue()) && pc <= entry.getValue().intValue()) + return false; + } + + return true; + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-06-26 21:27:24
|
Revision: 890 http://svn.sourceforge.net/fb-contrib/?rev=890&view=rev Author: dbrosius Date: 2007-06-26 14:27:23 -0700 (Tue, 26 Jun 2007) Log Message: ----------- starting to work a little, with many false positives Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-06-25 22:17:43 UTC (rev 889) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-06-26 21:27:23 UTC (rev 890) @@ -36,7 +36,10 @@ private BugReporter bugReporter; private OpcodeStack stack; - private Map<Integer, Object> userValues; + /** register to alias register */ + private Map<Integer, Integer> userValues; + /** alias register to loop end */ + private Map<Integer, Integer> loops; /** * constructs a UTA detector given the reporter to report bugs on @@ -70,7 +73,7 @@ } /** - * implements the visitor to reset the stack and uservalues + * implements the visitor to reset the stack and userValues and loops * * @param obj the context object of the currently parsed code block */ @@ -78,10 +81,12 @@ public void visitCode(Code obj) { try { stack.resetForMethodEntry(this); - userValues = new HashMap<Integer, Object>(); + userValues = new HashMap<Integer, Integer>(); + loops = new HashMap<Integer, Integer>(); super.visitCode(obj); } finally { userValues = null; + loops = null; } } @@ -93,7 +98,7 @@ @Override public void sawOpcode(int seen) { int reg = -1; - Object uValue = null; + Integer uValue = null; boolean sawAlias = false; boolean sawLoad = false; @@ -101,15 +106,7 @@ if (seen == INVOKEINTERFACE) { String methodName = getNameConstantOperand(); String signature = getSigConstantOperand(); - if ("size".equals(methodName) && "()I".equals(signature)) { - if (stack.getStackDepth() > 0) { - OpcodeStack.Item itm = stack.getStackItem(0); - reg = isLocalCollection(itm); - if (reg >= 0) { - sawAlias = true; - } - } - } else if ("get".equals(methodName) && "(I)Ljava/lang/Object;".equals(signature)) { + if ("get".equals(methodName) && "(I)Ljava/lang/Object;".equals(signature)) { if (stack.getStackDepth() > 1) { OpcodeStack.Item itm = stack.getStackItem(1); reg = isLocalCollection(itm); @@ -117,7 +114,7 @@ sawAlias = true; } } - } else if ("keySet".equals(methodName) || "values".equals(methodName) || "iterator".equals(methodName) || "next".equals(methodName)) { + } else if ("keySet".equals(methodName) || "values".equals(methodName) || "iterator".equals(methodName) || "next".equals(methodName) || "hasNext".equals(methodName)) { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); reg = isLocalCollection(itm); @@ -130,41 +127,54 @@ OpcodeStack.Item colItem = stack.getStackItem(1); OpcodeStack.Item valueItem = stack.getStackItem(0); reg = isLocalCollection(colItem); - if ((reg >= 0) - && (valueItem.getUserValue() != null)) { - bugReporter.reportBug(new BugInstance(this, "UAA_USE_ADD_ALL", NORMAL_PRIORITY) - .addClass(this) - .addMethod(this) - .addSourceLine(this)); + if (reg >= 0) { + uValue = (Integer)valueItem.getUserValue(); + if (uValue != null) { + Integer loopEnd = loops.get(uValue); + if ((loopEnd != null) && (getPC() < loopEnd.intValue())) { + bugReporter.reportBug(new BugInstance(this, "UAA_USE_ADD_ALL", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); + } + } } } } } else if (((seen == ISTORE) || ((seen >= ISTORE_0) && (seen <= ISTORE_3))) || ((seen == ASTORE) || ((seen >= ASTORE_0) && (seen <= ASTORE_3)))) { if (stack.getStackDepth() > 0) { - uValue = stack.getStackItem(0).getUserValue(); + uValue = (Integer)stack.getStackItem(0).getUserValue(); userValues.put(Integer14.valueOf(RegisterUtils.getStoreReg(this, seen)), uValue); } } else if (((seen == ILOAD) || ((seen >= ILOAD_0) && (seen <= ILOAD_3))) || ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3)))) { sawLoad = true; - } else if (seen == IF_ICMPGE) { - if (stack.getStackDepth() > 1) { - OpcodeStack.Item itm1 = stack.getStackItem(1); - OpcodeStack.Item itm2 = stack.getStackItem(0); - reg = itm1.getRegisterNumber(); - if ((reg >= 0) && (itm1.couldBeZero())) { - uValue = itm2.getUserValue(); - if (uValue != null) { - userValues.put(Integer14.valueOf(reg), uValue); + } else if (seen == IFEQ) { + if (stack.getStackDepth() > 0) { + if (getBranchOffset() > 0) { + int gotoPos = getBranchTarget() - 3; + byte[] code = getCode().getCode(); + if ((0x00FF & code[gotoPos]) == GOTO) { + short brOffset = (short)(0x0FF & code[gotoPos+1]); + brOffset <<= 8; + brOffset |= (0x0FF & code[gotoPos+2]); + gotoPos += brOffset; + if (brOffset < getPC()) { + OpcodeStack.Item itm = stack.getStackItem(0); + uValue = (Integer)itm.getUserValue(); + if (uValue != null) { + loops.put(uValue, Integer.valueOf(getBranchTarget())); + } + } } } } } else if (seen == CHECKCAST) { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); - uValue = itm.getUserValue(); - if (uValue instanceof Integer) { + uValue = (Integer)itm.getUserValue(); + if (uValue != null) { reg = ((Integer)uValue).intValue(); sawAlias = true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-06-25 22:17:40
|
Revision: 889 http://svn.sourceforge.net/fb-contrib/?rev=889&view=rev Author: dbrosius Date: 2007-06-25 15:17:43 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Fix keyset, values, iterator processing Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java 2007-06-25 22:14:58 UTC (rev 888) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java 2007-06-25 22:17:43 UTC (rev 889) @@ -132,8 +132,8 @@ } } } else if ("keySet".equals(methodName) || "values".equals(methodName) || "iterator".equals(methodName) || "next".equals(methodName)) { - if (stack.getStackDepth() > 1) { - OpcodeStack.Item itm = stack.getStackItem(1); + if (stack.getStackDepth() > 0) { + OpcodeStack.Item itm = stack.getStackItem(0); reg = isLocalCollection(itm); if (reg >= 0) { sawAlias = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-06-25 22:14:57
|
Revision: 888 http://svn.sourceforge.net/fb-contrib/?rev=888&view=rev Author: dbrosius Date: 2007-06-25 15:14:58 -0700 (Mon, 25 Jun 2007) Log Message: ----------- some fixes - still not working Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-06-24 22:58:05 UTC (rev 887) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-06-25 22:14:58 UTC (rev 888) @@ -118,8 +118,8 @@ } } } else if ("keySet".equals(methodName) || "values".equals(methodName) || "iterator".equals(methodName) || "next".equals(methodName)) { - if (stack.getStackDepth() > 1) { - OpcodeStack.Item itm = stack.getStackItem(1); + if (stack.getStackDepth() > 0) { + OpcodeStack.Item itm = stack.getStackItem(0); reg = isLocalCollection(itm); if (reg >= 0) { sawAlias = true; @@ -132,7 +132,7 @@ reg = isLocalCollection(colItem); if ((reg >= 0) && (valueItem.getUserValue() != null)) { - bugReporter.reportBug(new BugInstance(this, "UTA_USE_ADD_ALL", NORMAL_PRIORITY) + bugReporter.reportBug(new BugInstance(this, "UAA_USE_ADD_ALL", NORMAL_PRIORITY) .addClass(this) .addMethod(this) .addSourceLine(this)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-06-24 22:58:04
|
Revision: 887 http://svn.sourceforge.net/fb-contrib/?rev=887&view=rev Author: dbrosius Date: 2007-06-24 15:58:05 -0700 (Sun, 24 Jun 2007) Log Message: ----------- Initial checkin of UAA - doesn't work a lick Modified Paths: -------------- trunk/fb-contrib/etc/findbugs.xml trunk/fb-contrib/etc/messages.xml Added Paths: ----------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2007-06-24 22:23:02 UTC (rev 886) +++ trunk/fb-contrib/etc/findbugs.xml 2007-06-24 22:58:05 UTC (rev 887) @@ -277,10 +277,11 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousJDKVersionUse" speed="slow" - reports="SJVU_SUSPICIOUS_JDK_VERSION_USE" - hidden="true" - disabled="true" /> + reports="SJVU_SUSPICIOUS_JDK_VERSION_USE" /> + <Detector class="com.mebigfatguy.fbcontrib.detect.UseAddAll" + speed="fast" + reports="UAA_USE_ADD_ALL" /> <!-- BugPattern --> @@ -370,4 +371,5 @@ <BugPattern abbrev="DWI" type="DWI_MODIFYING_WHILE_ITERATING" category="CORRECTNESS" experimental="true" /> <BugPattern abbrev="USS" type="USS_USE_STRING_SPLIT" category="STYLE" /> <BugPattern abbrev="SJVU" type="SJVU_SUSPICIOUS_JDK_VERSION_USE" category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="UAA" type="UAA_USE_ADD_ALL" category="STYLE" experimental="true" /> </FindbugsPlugin> \ No newline at end of file Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2007-06-24 22:23:02 UTC (rev 886) +++ trunk/fb-contrib/etc/messages.xml 2007-06-24 22:58:05 UTC (rev 887) @@ -754,6 +754,18 @@ ]]> </Details> </Detector> + + <Detector class="com.mebigfatguy.fbcontrib.detect.UseAddAll"> + <Details> + <![CDATA[ + <p>looks for loops that transfers the contents of one collection to another. These collection sources might + be local variables or member fields, including sets, maps key/values, lists, or arrays. It is simpler to + just use the addAll method of the collection class. In the case where the source is an array, you can use + Arrays.asList(array), and use that as the source to addAll.</p> + <p>It is a fast detector.</p> + ]]> + </Details> + </Detector> <!-- BugPattern --> @@ -1897,6 +1909,19 @@ </Details> </BugPattern> + <BugPattern type="UAA_USE_ADD_ALL"> + <ShortDescription>method uses simple loop to copy contents of one collection to another</ShortDescription> + <LongDescription>method {1} uses simple loop to copy contents of one colleciton to another</LongDescription> + <Details> + <![CDATA[ + <p>This method uses a simple for loop to copy the contents of a set, list, map key/value, array or other collection + to another collection. It is simpler and more straight forward to just call the addAll method of the destination collection + passing in the source collection. In the case that the source is an array, you can use Array.asList method to massage the array + into a collection</p> + ]]> + </Details> + </BugPattern> + <!-- BugCode --> <BugCode abbrev="ISB">Inefficient String Buffering</BugCode> @@ -1961,4 +1986,5 @@ <BugCode abbrev="DWI">Deleting While Iterating</BugCode> <BugCode abbrev="USS">Use String Split</BugCode> <BugCode abbrev="SJVU">Suspicious JDK Version Use</BugCode> + <BugCode abbrev="UAA">Use Add All</BugCode> </MessageCollection> \ No newline at end of file Added: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java (rev 0) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-06-24 22:58:05 UTC (rev 887) @@ -0,0 +1,218 @@ +package com.mebigfatguy.fbcontrib.detect; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.bcel.Repository; +import org.apache.bcel.classfile.Code; +import org.apache.bcel.classfile.JavaClass; + +import com.mebigfatguy.fbcontrib.utils.Integer14; +import com.mebigfatguy.fbcontrib.utils.RegisterUtils; + +import edu.umd.cs.findbugs.BugInstance; +import edu.umd.cs.findbugs.BugReporter; +import edu.umd.cs.findbugs.BytecodeScanningDetector; +import edu.umd.cs.findbugs.OpcodeStack; +import edu.umd.cs.findbugs.ba.ClassContext; + +/** + * looks for loops that transfers the contents of one collection to another. These collection sources + * might be local variables or member fields, including sets, maps key/values, lists, or arrays. + * It is simpler to just use the addAll method of the collection class. In the case where the + * source is an array, you can use Arrays.asList(array), and use that as the source to addAll. + */ +public class UseAddAll extends BytecodeScanningDetector { + private static JavaClass collectionClass; + private static ClassNotFoundException ex; + static { + try { + collectionClass = Repository.lookupClass("java/util/Collection"); + } catch (ClassNotFoundException cnfe) { + collectionClass = null; + ex = cnfe; + } + } + + private BugReporter bugReporter; + private OpcodeStack stack; + private Map<Integer, Object> userValues; + + /** + * constructs a UTA detector given the reporter to report bugs on + * @param bugReporter the sync of bug reports + */ + public UseAddAll(BugReporter bugReporter) { + this.bugReporter = bugReporter; + } + + /** + * implements the visitor to create and clear the stack, and report missing class errors + * + * @param classContext the context object of the currently parsed class + */ + @Override + public void visitClassContext(ClassContext classContext) { + if (collectionClass == null) { + if (ex != null) { + bugReporter.reportMissingClass(ex); + ex = null; + } + return; + } + + try { + stack = new OpcodeStack(); + super.visitClassContext(classContext); + } finally { + stack = null; + } + } + + /** + * implements the visitor to reset the stack and uservalues + * + * @param obj the context object of the currently parsed code block + */ + @Override + public void visitCode(Code obj) { + try { + stack.resetForMethodEntry(this); + userValues = new HashMap<Integer, Object>(); + super.visitCode(obj); + } finally { + userValues = null; + } + } + + /** + * implements the visitor to look for manually copying of collections to collections + * + * @param seen the opcode of the currently parsed instruction + */ + @Override + public void sawOpcode(int seen) { + int reg = -1; + Object uValue = null; + boolean sawAlias = false; + boolean sawLoad = false; + + try { + if (seen == INVOKEINTERFACE) { + String methodName = getNameConstantOperand(); + String signature = getSigConstantOperand(); + if ("size".equals(methodName) && "()I".equals(signature)) { + if (stack.getStackDepth() > 0) { + OpcodeStack.Item itm = stack.getStackItem(0); + reg = isLocalCollection(itm); + if (reg >= 0) { + sawAlias = true; + } + } + } else if ("get".equals(methodName) && "(I)Ljava/lang/Object;".equals(signature)) { + if (stack.getStackDepth() > 1) { + OpcodeStack.Item itm = stack.getStackItem(1); + reg = isLocalCollection(itm); + if (reg >= 0) { + sawAlias = true; + } + } + } else if ("keySet".equals(methodName) || "values".equals(methodName) || "iterator".equals(methodName) || "next".equals(methodName)) { + if (stack.getStackDepth() > 1) { + OpcodeStack.Item itm = stack.getStackItem(1); + reg = isLocalCollection(itm); + if (reg >= 0) { + sawAlias = true; + } + } + } else if ("add".equals(methodName) && "(Ljava/lang/Object;)Z".equals(signature)) { + if (stack.getStackDepth() > 1) { + OpcodeStack.Item colItem = stack.getStackItem(1); + OpcodeStack.Item valueItem = stack.getStackItem(0); + reg = isLocalCollection(colItem); + if ((reg >= 0) + && (valueItem.getUserValue() != null)) { + bugReporter.reportBug(new BugInstance(this, "UTA_USE_ADD_ALL", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); + } + } + } + } else if (((seen == ISTORE) || ((seen >= ISTORE_0) && (seen <= ISTORE_3))) + || ((seen == ASTORE) || ((seen >= ASTORE_0) && (seen <= ASTORE_3)))) { + if (stack.getStackDepth() > 0) { + uValue = stack.getStackItem(0).getUserValue(); + userValues.put(Integer14.valueOf(RegisterUtils.getStoreReg(this, seen)), uValue); + } + } else if (((seen == ILOAD) || ((seen >= ILOAD_0) && (seen <= ILOAD_3))) + || ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3)))) { + sawLoad = true; + } else if (seen == IF_ICMPGE) { + if (stack.getStackDepth() > 1) { + OpcodeStack.Item itm1 = stack.getStackItem(1); + OpcodeStack.Item itm2 = stack.getStackItem(0); + reg = itm1.getRegisterNumber(); + if ((reg >= 0) && (itm1.couldBeZero())) { + uValue = itm2.getUserValue(); + if (uValue != null) { + userValues.put(Integer14.valueOf(reg), uValue); + } + } + } + } else if (seen == CHECKCAST) { + if (stack.getStackDepth() > 0) { + OpcodeStack.Item itm = stack.getStackItem(0); + uValue = itm.getUserValue(); + if (uValue instanceof Integer) { + reg = ((Integer)uValue).intValue(); + sawAlias = true; + } + } + } + } catch (ClassNotFoundException cnfe) { + bugReporter.reportMissingClass(cnfe); + } finally { + stack.sawOpcode(this, seen); + if (sawAlias) { + if (stack.getStackDepth() > 0) { + OpcodeStack.Item itm = stack.getStackItem(0); + itm.setUserValue(Integer14.valueOf(reg)); + } + } else if (sawLoad) { + if (stack.getStackDepth() > 0) { + OpcodeStack.Item itm = stack.getStackItem(0); + reg = itm.getRegisterNumber(); + if (reg >= 0) { + uValue = userValues.get(Integer14.valueOf(reg)); + itm.setUserValue(uValue); + } + } + } + } + } + + /** + * determines if the stack item refers to a collection that is stored in a local variable + * + * param item the stack item to check + * + * @return the register number of the local variable that this collection refers to, or -1 + * @throws ClassNotFoundException if the items class cannot be found + */ + private int isLocalCollection(OpcodeStack.Item item) throws ClassNotFoundException { + Integer aliasReg = (Integer)item.getUserValue(); + if (aliasReg != null) + return aliasReg.intValue(); + + int reg = item.getRegisterNumber(); + if (reg < 0) + return -1; + + JavaClass cls = item.getJavaClass(); + if ((cls != null) && cls.implementationOf(collectionClass)) + return reg; + + return -1; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-06-24 22:23:03
|
Revision: 886 http://svn.sourceforge.net/fb-contrib/?rev=886&view=rev Author: dbrosius Date: 2007-06-24 15:23:02 -0700 (Sun, 24 Jun 2007) Log Message: ----------- add some initial test cases for UAA Added Paths: ----------- trunk/fb-contrib/samples/UAA_Sample.java Added: trunk/fb-contrib/samples/UAA_Sample.java =================================================================== --- trunk/fb-contrib/samples/UAA_Sample.java (rev 0) +++ trunk/fb-contrib/samples/UAA_Sample.java 2007-06-24 22:23:02 UTC (rev 886) @@ -0,0 +1,54 @@ +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + + +public class UAA_Sample { + + private Set<String> in = new HashSet<String>(); + private Set<String> out = new HashSet<String>(); + + public Set<String> testLocalSet(Set<String> in) { + Set<String> out = new HashSet<String>(); + out.add("Foo"); + out.add("Bar"); + for (String s : in) { + out.add(s); + } + return out; + } + + public Set<String> testFPCondition(Set<String> in) { + Set<String> out = new HashSet<String>(); + for (String s : in) { + if (s.startsWith("a")) + out.add(s); + } + return out; + } + + public Set<String> testKeyOrValueAdd(Map<String, String> in) + { + Set<String> out = new HashSet<String>(); + for (String s : in.keySet()) + out.add(s); + + for (String s : in.values()) + out.add(s); + + return out; + } + + public void testMemberSet() { + for (String s : in) + out.add(s); + } + + public Set<String> testFromArray(String[] in) { + Set<String> out = new HashSet<String>(); + for (String s : in) + out.add(s); + + return out; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-06-08 02:53:17
|
Revision: 885 http://svn.sourceforge.net/fb-contrib/?rev=885&view=rev Author: dbrosius Date: 2007-06-07 19:53:18 -0700 (Thu, 07 Jun 2007) Log Message: ----------- add check for s.toCharArray()[0] Modified Paths: -------------- trunk/fb-contrib/etc/findbugs.xml trunk/fb-contrib/etc/messages.xml trunk/fb-contrib/samples/SPP_Sample.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2007-05-27 21:13:53 UTC (rev 884) +++ trunk/fb-contrib/etc/findbugs.xml 2007-06-08 02:53:18 UTC (rev 885) @@ -256,7 +256,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.SillynessPotPourri" speed="fast" - reports="SPP_NEGATIVE_BITSET_ITEM,SPP_INTERN_ON_CONSTANT,SPP_NO_CHAR_SB_CTOR,SPP_USE_MATH_CONSTANT,SPP_STUTTERED_ASSIGNMENT,SPP_USE_ISNAN,SPP_USE_BIGDECIMAL_STRING_CTOR,SPP_STRINGBUFFER_WITH_EMPTY_STRING,SPP_EQUALS_ON_ENUM,SPP_INVALID_BOOLEAN_NULL_CHECK" /> + reports="SPP_NEGATIVE_BITSET_ITEM,SPP_INTERN_ON_CONSTANT,SPP_NO_CHAR_SB_CTOR,SPP_USE_MATH_CONSTANT,SPP_STUTTERED_ASSIGNMENT,SPP_USE_ISNAN,SPP_USE_BIGDECIMAL_STRING_CTOR,SPP_STRINGBUFFER_WITH_EMPTY_STRING,SPP_EQUALS_ON_ENUM,SPP_INVALID_BOOLEAN_NULL_CHECK,SPP_USE_CHARAT" /> <Detector class="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" speed="fast" @@ -363,6 +363,7 @@ <BugPattern abbrev="SPP" type="SPP_STRINGBUFFER_WITH_EMPTY_STRING" category="PERFORMANCE" /> <BugPattern abbrev="SPP" type="SPP_EQUALS_ON_ENUM" category="CORRECTNESS" /> <BugPattern abbrev="SPP" type="SPP_INVALID_BOOLEAN_NULL_CHECK" category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="SPP" type="SPP_USE_CHARAT" category="PERFORMANCE" experimental="true" /> <BugPattern abbrev="BAS" type="BAS_BLOATED_ASSIGNMENT_SCOPE" category="PERFORMANCE" /> <BugPattern abbrev="SCII" type="SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTATOR" category="STYLE" /> <BugPattern abbrev="DWI" type="DWI_DELETING_WHILE_ITERATING" category="CORRECTNESS" /> Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2007-05-27 21:13:53 UTC (rev 884) +++ trunk/fb-contrib/etc/messages.xml 2007-06-08 02:53:18 UTC (rev 885) @@ -1796,6 +1796,18 @@ </Details> </BugPattern> + <BugPattern type="SPP_USE_CHARAT"> + <ShortDescription>Method fetches character array just to do the equivalent of the charAt method</ShortDescription> + <LongDescription>Method {1} fetches character array just to do the equivalent of the charAt method</LongDescription> + <Details> + <![CDATA[ + <p>This method calls the toCharArray method on a String the fetch an array of characters, only + to retrieve one of those characters by index. It is more performant to just use the charAt method. + </p> + ]]> + </Details> + </BugPattern> + <BugPattern type="BAS_BLOATED_ASSIGNMENT_SCOPE"> <ShortDescription>Method assigns a variable in a larger scope then is needed</ShortDescription> <LongDescription>Method {1} assigns a variable in a larger scope then is needed</LongDescription> Modified: trunk/fb-contrib/samples/SPP_Sample.java =================================================================== --- trunk/fb-contrib/samples/SPP_Sample.java 2007-05-27 21:13:53 UTC (rev 884) +++ trunk/fb-contrib/samples/SPP_Sample.java 2007-06-08 02:53:18 UTC (rev 885) @@ -71,4 +71,11 @@ if (e && e.booleanValue()) System.out.println("Booya"); } + + public char usechatAt(String s) + { + if (s.length() > 0) + return s.toCharArray()[0]; + return ' '; + } } Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2007-05-27 21:13:53 UTC (rev 884) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2007-06-08 02:53:18 UTC (rev 885) @@ -86,6 +86,7 @@ @Override public void sawOpcode(int seen) { int reg = -1; + String userValue = null; try { stack.mergeJumps(this); @@ -142,6 +143,25 @@ .addSourceLine(this)); } } + } else if ((seen >= ICONST_0) && (seen <= ICONST_3)) { + if (stack.getStackDepth() > 0) { + OpcodeStack.Item item = stack.getStackItem(0); + String tca = (String)item.getUserValue(); + if ("toCharArray".equals(tca)) { + userValue = "iconst"; + } + } + } else if (seen == CALOAD) { + if (stack.getStackDepth() > 0) { + OpcodeStack.Item item = stack.getStackItem(0); + String ic = (String)item.getUserValue(); + if ("iconst".equals(ic)) { + bugReporter.reportBug(new BugInstance(this, "SPP_USE_CHARAT", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); + } + } } else if (seen == INVOKEVIRTUAL) { String className = getClassConstantOperand(); String methodName = getNameConstantOperand(); @@ -178,6 +198,8 @@ } } } + } else if ("toCharArray".equals(methodName)) { + userValue = "toCharArray"; } } else if ("equals(Ljava/lang/Object;)Z".equals(methodName + getSigConstantOperand())) { try { @@ -274,6 +296,11 @@ } finally { stack.sawOpcode(this, seen); + if (userValue != null) + { + OpcodeStack.Item item = stack.getStackItem(0); + item.setUserValue(userValue); + } lastOpcode = seen; lastReg = reg; System.arraycopy(lastPCs, 1, lastPCs, 0, 3); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-05-27 21:13:54
|
Revision: 884 http://svn.sourceforge.net/fb-contrib/?rev=884&view=rev Author: dbrosius Date: 2007-05-27 14:13:53 -0700 (Sun, 27 May 2007) Log Message: ----------- don't report .intern on static strings in static initializers Modified Paths: -------------- trunk/fb-contrib/samples/SPP_Sample.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java Modified: trunk/fb-contrib/samples/SPP_Sample.java =================================================================== --- trunk/fb-contrib/samples/SPP_Sample.java 2007-04-29 19:37:54 UTC (rev 883) +++ trunk/fb-contrib/samples/SPP_Sample.java 2007-05-27 21:13:53 UTC (rev 884) @@ -5,6 +5,7 @@ { private static final double pi = 3.14; private static final double e = 2.72; + public static final String FALSE_POSITIVE = "INTERN_OK_HERE".intern(); static enum Flap { Smack, Jack }; Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2007-04-29 19:37:54 UTC (rev 883) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2007-05-27 21:13:53 UTC (rev 884) @@ -165,13 +165,17 @@ } } else if ("java/lang/String".equals(className)) { if ("intern".equals(methodName)) { - if (stack.getStackDepth() > 0) { - OpcodeStack.Item item = stack.getStackItem(0); - if (item.getConstant() != null) { - bugReporter.reportBug(new BugInstance(this, "SPP_INTERN_ON_CONSTANT", NORMAL_PRIORITY) - .addClass(this) - .addMethod(this) - .addSourceLine(this)); + String owningMethod = getMethod().getName(); + if (!"<clinit>".equals(owningMethod)) + { + if (stack.getStackDepth() > 0) { + OpcodeStack.Item item = stack.getStackItem(0); + if (item.getConstant() != null) { + bugReporter.reportBug(new BugInstance(this, "SPP_INTERN_ON_CONSTANT", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-04-29 19:37:56
|
Revision: 883 http://svn.sourceforge.net/fb-contrib/?rev=883&view=rev Author: dbrosius Date: 2007-04-29 12:37:54 -0700 (Sun, 29 Apr 2007) Log Message: ----------- more tests Modified Paths: -------------- trunk/fb-contrib/samples/ISB_Sample.java Modified: trunk/fb-contrib/samples/ISB_Sample.java =================================================================== --- trunk/fb-contrib/samples/ISB_Sample.java 2007-03-17 02:01:58 UTC (rev 882) +++ trunk/fb-contrib/samples/ISB_Sample.java 2007-04-29 19:37:54 UTC (rev 883) @@ -94,5 +94,16 @@ int j = 2; throw new RuntimeException("i=" + i + ", j=" + j); } + + public void testFPISB11(StringBuilder sb, String a, String b) + { + ISB_Sample isb = new ISB_Sample(); + sb.append(isb.xform(a + b)); + } + + public String xform(String a) + { + return a; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-18 12:10:19
|
Revision: 882 http://svn.sourceforge.net/fb-contrib/?rev=882&view=rev Author: dbrosius Date: 2007-03-16 19:01:58 -0700 (Fri, 16 Mar 2007) Log Message: ----------- fix for bug [ 1678805 ] False+: UCC_UNRELATED_COLLECTION_CONTENTS reused reg slots, and no variable table attribute Modified Paths: -------------- trunk/fb-contrib/samples/UCC_Sample.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java Modified: trunk/fb-contrib/samples/UCC_Sample.java =================================================================== --- trunk/fb-contrib/samples/UCC_Sample.java 2007-03-13 03:31:20 UTC (rev 881) +++ trunk/fb-contrib/samples/UCC_Sample.java 2007-03-17 02:01:58 UTC (rev 882) @@ -1,4 +1,5 @@ import java.awt.Color; +import java.io.File; import java.util.ArrayList; import java.util.Date; import java.util.GregorianCalendar; @@ -44,4 +45,17 @@ s.add(new int[]{ 3,2}); s.add(new Color(0, 128, 255)); } + + public void bug1678805() + { + final File[] files = new File[5]; + for (int i = 0; i < 5; i++) + files[i] = getPath(); + + } + + private File getPath() + { + return new File("c:\\temp"); + } } \ No newline at end of file Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java 2007-03-13 03:31:20 UTC (rev 881) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java 2007-03-17 02:01:58 UTC (rev 882) @@ -145,6 +145,10 @@ OpcodeStack.Item addItm = stack.getStackItem(0); checkAdd(arrayItm, addItm); } + } else if (seen == ASTORE) { + Integer reg = Integer14.valueOf(RegisterUtils.getAStoreReg(this, seen)); + localCollections.remove(reg); + localSourceLineAnnotations.remove(reg); } } catch (ClassNotFoundException cnfe) { bugReporter.reportMissingClass(cnfe); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-13 03:31:20
|
Revision: 881 http://svn.sourceforge.net/fb-contrib/?rev=881&view=rev Author: dbrosius Date: 2007-03-12 20:31:20 -0700 (Mon, 12 Mar 2007) Log Message: ----------- if you can't find an iterator for a group, short-circuit the attempt to find a modifying statement Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2007-03-11 15:11:02 UTC (rev 880) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2007-03-13 03:31:20 UTC (rev 881) @@ -187,14 +187,16 @@ int id = findCollectionGroup(itm, true); if (id >= 0) { Integer it = groupToIterator.get(Integer14.valueOf(id)); - Loop loop = loops.get(it); - if (loop != null) { - int pc = getPC(); - if (loop.hasPC(pc)) { - bugReporter.reportBug(new BugInstance(this, "DWI_MODIFYING_WHILE_ITERATING", NORMAL_PRIORITY) - .addClass(this) - .addMethod(this) - .addSourceLine(this)); + if (it != null) { + Loop loop = loops.get(it); + if (loop != null) { + int pc = getPC(); + if (loop.hasPC(pc)) { + bugReporter.reportBug(new BugInstance(this, "DWI_MODIFYING_WHILE_ITERATING", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-11 15:11:04
|
Revision: 880 http://svn.sourceforge.net/fb-contrib/?rev=880&view=rev Author: dbrosius Date: 2007-03-11 08:11:02 -0700 (Sun, 11 Mar 2007) Log Message: ----------- LII simplifications Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2007-03-11 15:08:46 UTC (rev 879) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2007-03-11 15:11:02 UTC (rev 880) @@ -337,9 +337,7 @@ private void removeFromCollectionGroup(OpcodeStack.Item itm) { Comparable groupElement = getGroupElement(itm); if (groupElement != null) { - int numGroups = collectionGroups.size(); - for (int i = 0; i < numGroups; i++) { - Set<? extends Comparable> group = collectionGroups.get(i); + for (Set<? extends Comparable> group : collectionGroups) { if (group.contains(groupElement)) { group.remove(groupElement); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-11 15:08:46
|
Revision: 879 http://svn.sourceforge.net/fb-contrib/?rev=879&view=rev Author: dbrosius Date: 2007-03-11 08:08:46 -0700 (Sun, 11 Mar 2007) Log Message: ----------- UCPM fixes Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2007-03-11 15:06:35 UTC (rev 878) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2007-03-11 15:08:46 UTC (rev 879) @@ -108,7 +108,7 @@ && !"<clinit>".equals(methodName)) { String methodSig = obj.getSignature(); String parms = methodSig.split("\\(|\\)")[1]; - if (parms.indexOf(";") >= 0) { + if (parms.indexOf(';') >= 0) { outer:for (JavaClass cls : constrainingClasses) { Method[] methods = cls.getMethods(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-11 15:06:36
|
Revision: 878 http://svn.sourceforge.net/fb-contrib/?rev=878&view=rev Author: dbrosius Date: 2007-03-11 08:06:35 -0700 (Sun, 11 Mar 2007) Log Message: ----------- no need to check new against null Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java 2007-03-11 14:31:03 UTC (rev 877) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java 2007-03-11 15:06:35 UTC (rev 878) @@ -187,24 +187,18 @@ ZipEntry ze = jdkZip.getEntry(clsName + ".class"); if (ze != null) { is = new BufferedInputStream(jdkZip.getInputStream(ze)); - if (is != null) { - ClassParser parser = new ClassParser(is, clsName); - JavaClass calledClass = parser.parse(); - - superNames.put(clsName, calledClass.getSuperclassName().replace('.', '/')); - Method[] methods = calledClass.getMethods(); - - methodInfos = new HashSet<String>(); - validMethods.put(clsName, methodInfos); - - for (Method m : methods) { - methodInfos.add(m.getName() + m.getSignature()); - } - + ClassParser parser = new ClassParser(is, clsName); + JavaClass calledClass = parser.parse(); + + superNames.put(clsName, calledClass.getSuperclassName().replace('.', '/')); + Method[] methods = calledClass.getMethods(); + + methodInfos = new HashSet<String>(); + validMethods.put(clsName, methodInfos); + + for (Method m : methods) { + methodInfos.add(m.getName() + m.getSignature()); } - else { - return true; - } } else if (clsName.startsWith("java/")) { bugReporter.reportBug(new BugInstance(this, "SJVU_SUSPICIOUS_JDK_VERSION_USE", HIGH_PRIORITY) .addClass(this) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-11 14:31:10
|
Revision: 877 http://svn.sourceforge.net/fb-contrib/?rev=877&view=rev Author: dbrosius Date: 2007-03-11 07:31:03 -0700 (Sun, 11 Mar 2007) Log Message: ----------- oops, use the right project Modified Paths: -------------- trunk/fb-contrib/samples/samples-bugs.xml Modified: trunk/fb-contrib/samples/samples-bugs.xml =================================================================== --- trunk/fb-contrib/samples/samples-bugs.xml 2007-03-11 14:26:56 UTC (rev 876) +++ trunk/fb-contrib/samples/samples-bugs.xml 2007-03-11 14:31:03 UTC (rev 877) @@ -1,1390 +1,4646 @@ <?xml version="1.0" encoding="UTF-8"?> -<BugCollection version="1.2.0-rc1" sequence="0" timestamp="-1" analysisTimestamp="1173623029015" release=""> - <Project filename="O:\fb-contrib\fb-contrib.fb"> - <Jar>O:\fb-contrib\classes</Jar> - <AuxClasspathEntry>O:\fb-contrib\lib\bcel.jar</AuxClasspathEntry> - <AuxClasspathEntry>O:\fb-contrib\lib\findbugs.jar</AuxClasspathEntry> - <SrcDir>O:\fb-contrib\src</SrcDir> +<BugCollection version="1.2.0-rc1" sequence="0" timestamp="-1" analysisTimestamp="1173623337203" release=""> + <Project filename="O:\fb-contrib\samples\samples.fb"> + <Jar>O:\fb-contrib\samples</Jar> + <AuxClasspathEntry>O:\fb-contrib\samples\lib\jsp-api.jar</AuxClasspathEntry> + <SrcDir>O:\fb-contrib\samples</SrcDir> </Project> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn" sourcefile="AbnormalFinallyBlockReturn.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java"/> + <BugInstance type="ABC_ARRAY_BASED_COLLECTIONS" priority="2" abbrev="ABC" category="CORRECTNESS"> + <Class classname="ABC_Sample"> + <SourceLine classname="ABC_Sample" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn" name="fbInfo" signature="Ljava/util/List;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn" sourcefile="AbnormalFinallyBlockReturn.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java"/> - </Field> + <Method classname="ABC_Sample" name="testLists" signature="(Ljava/util/List;[Ljava/lang/String;)Z" isStatic="false"> + <SourceLine classname="ABC_Sample" start="29" end="29" startBytecode="0" endBytecode="7" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> + </Method> + <SourceLine classname="ABC_Sample" start="29" end="29" startBytecode="2" endBytecode="2" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod" sourcefile="AbstractOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java"/> + <BugInstance type="ABC_ARRAY_BASED_COLLECTIONS" priority="2" abbrev="ABC" category="CORRECTNESS"> + <Class classname="ABC_Sample"> + <SourceLine classname="ABC_Sample" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod" name="superClasses" signature="[Lorg/apache/bcel/classfile/JavaClass;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod" sourcefile="AbstractOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java"/> - </Field> + <Method classname="ABC_Sample" name="testMaps" signature="([Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;" isStatic="false"> + <SourceLine classname="ABC_Sample" start="15" end="17" startBytecode="0" endBytecode="18" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> + </Method> + <SourceLine classname="ABC_Sample" start="16" end="16" startBytecode="11" endBytecode="11" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections" sourcefile="ArrayBasedCollections.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java"/> + <BugInstance type="ABC_ARRAY_BASED_COLLECTIONS" priority="2" abbrev="ABC" category="CORRECTNESS"> + <Class classname="ABC_Sample"> + <SourceLine classname="ABC_Sample" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections" sourcefile="ArrayBasedCollections.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java"/> - </Field> + <Method classname="ABC_Sample" name="testSets" signature="([Ljava/lang/String;)Ljava/util/Set;" isStatic="false"> + <SourceLine classname="ABC_Sample" start="22" end="24" startBytecode="0" endBytecode="17" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> + </Method> + <SourceLine classname="ABC_Sample" start="23" end="23" startBytecode="10" endBytecode="10" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> </BugInstance> - <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <BugInstance type="SIC_INNER_SHOULD_BE_STATIC_ANON" priority="3" abbrev="SIC" category="PERFORMANCE"> + <Class classname="ABC_Sample$UseComparator$1"> + <SourceLine classname="ABC_Sample$UseComparator$1" sourcefile="ABC_Sample.java" sourcepath="ABC_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="228" startBytecode="0" endBytecode="917" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </BugInstance> + <BugInstance type="ACEM_ABSTRACT_CLASS_EMPTY_METHODS" priority="2" abbrev="ACEM" category="STYLE"> + <Class classname="ACEM_Sample"> + <SourceLine classname="ACEM_Sample" sourcefile="ACEM_Sample.java" sourcepath="ACEM_Sample.java"/> + </Class> + <Method classname="ACEM_Sample" name="test" signature="()V" isStatic="false"> + <SourceLine classname="ACEM_Sample" start="7" end="7" startBytecode="0" endBytecode="0" sourcefile="ACEM_Sample.java" sourcepath="ACEM_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="118" startBytecode="0" endBytecode="0" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <SourceLine classname="ACEM_Sample" start="7" end="7" startBytecode="0" endBytecode="0" sourcefile="ACEM_Sample.java" sourcepath="ACEM_Sample.java"/> </BugInstance> - <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <BugInstance type="ACEM_ABSTRACT_CLASS_EMPTY_METHODS" priority="2" abbrev="ACEM" category="STYLE"> + <Class classname="ACEM_Sample"> + <SourceLine classname="ACEM_Sample" sourcefile="ACEM_Sample.java" sourcepath="ACEM_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="228" startBytecode="0" endBytecode="917" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <Method classname="ACEM_Sample" name="test1" signature="()I" isStatic="false"> + <SourceLine classname="ACEM_Sample" start="11" end="11" startBytecode="0" endBytecode="9" sourcefile="ACEM_Sample.java" sourcepath="ACEM_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="143" end="143" startBytecode="186" endBytecode="186" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> - <String value="getRegisterNumber()I"/> + <SourceLine classname="ACEM_Sample" start="11" end="11" startBytecode="9" endBytecode="9" sourcefile="ACEM_Sample.java" sourcepath="ACEM_Sample.java"/> </BugInstance> - <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <BugInstance type="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" priority="2" abbrev="AFBR" category="CORRECTNESS"> + <Class classname="AFBR_Sample"> + <SourceLine classname="AFBR_Sample" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="228" startBytecode="0" endBytecode="917" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <Method classname="AFBR_Sample" name="test1" signature="(Z)I" isStatic="false"> + <SourceLine classname="AFBR_Sample" start="12" end="20" startBytecode="0" endBytecode="26" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="150" end="150" startBytecode="249" endBytecode="249" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> - <String value="getSignature()Ljava/lang/String;"/> + <SourceLine classname="AFBR_Sample" start="17" end="17" startBytecode="19" endBytecode="19" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <BugInstance type="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" priority="2" abbrev="AFBR" category="CORRECTNESS"> + <Class classname="AFBR_Sample"> + <SourceLine classname="AFBR_Sample" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> - </Field> + <Method classname="AFBR_Sample" name="test2" signature="()I" isStatic="false"> + <SourceLine classname="AFBR_Sample" start="27" end="31" startBytecode="0" endBytecode="18" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> + </Method> + <SourceLine classname="AFBR_Sample" start="31" end="31" startBytecode="18" endBytecode="18" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <BugInstance type="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" priority="2" abbrev="AFBR" category="CORRECTNESS"> + <Class classname="AFBR_Sample"> + <SourceLine classname="AFBR_Sample" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="wrappers" signature="Ljava/util/Map;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> - </Field> + <Method classname="AFBR_Sample" name="test3" signature="()I" isStatic="false"> + <SourceLine classname="AFBR_Sample" start="39" end="43" startBytecode="0" endBytecode="18" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> + </Method> + <SourceLine classname="AFBR_Sample" start="43" end="43" startBytecode="18" endBytecode="18" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </BugInstance> - <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <BugInstance type="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" priority="2" abbrev="AFBR" category="CORRECTNESS"> + <Class classname="AFBR_Sample"> + <SourceLine classname="AFBR_Sample" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="135" end="251" startBytecode="0" endBytecode="971" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <Method classname="AFBR_Sample" name="test4" signature="()I" isStatic="false"> + <SourceLine classname="AFBR_Sample" start="51" end="59" startBytecode="0" endBytecode="15" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="135" end="135" startBytecode="0" endBytecode="0" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <SourceLine classname="AFBR_Sample" start="59" end="59" startBytecode="15" endBytecode="15" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </BugInstance> - <BugInstance type="FCBL_FIELD_COULD_BE_LOCAL" priority="2" abbrev="FCBL" category="CORRECTNESS"> - <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <BugInstance type="AFBR_ABNORMAL_FINALLY_BLOCK_RETURN" priority="3" abbrev="AFBR" category="CORRECTNESS"> + <Class classname="AFBR_Sample"> + <SourceLine classname="AFBR_Sample" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="dontReport" signature="Z" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> - </Field> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="114" end="114" startBytecode="184" endBytecode="184" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <Method classname="AFBR_Sample" name="test5" signature="()I" isStatic="false"> + <SourceLine classname="AFBR_Sample" start="65" end="80" startBytecode="0" endBytecode="56" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> + </Method> + <SourceLine classname="AFBR_Sample" start="78" end="78" startBytecode="50" endBytecode="50" sourcefile="AFBR_Sample.java" sourcepath="AFBR_Sample.java"/> </BugInstance> - <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <BugInstance type="AOM_ABSTRACT_OVERRIDDEN_METHOD" priority="2" abbrev="AOM" category="CORRECTNESS"> + <Class classname="AOM_Sample"> + <SourceLine classname="AOM_Sample" sourcefile="AOM_Sample.java" sourcepath="AOM_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="135" end="251" startBytecode="0" endBytecode="971" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <Method classname="AOM_Sample" name="test1" signature="()V" isStatic="false"> + <SourceLine classname="AOM_Sample" startBytecode="0" sourcefile="AOM_Sample.java" sourcepath="AOM_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="177" end="177" startBytecode="358" endBytecode="358" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> - <String value="getPC()I"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <BugInstance type="AWCBR_ARRAY_WRAPPED_CALL_BY_REFERENCE" priority="2" abbrev="AWCBR" category="STYLE"> + <Class classname="AWCBR_Sample"> + <SourceLine classname="AWCBR_Sample" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="catchHandlers" signature="Ljava/util/Set;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> - </Field> + <Method classname="AWCBR_Sample" name="testinitedalloc" signature="(I)I" isStatic="false"> + <SourceLine classname="AWCBR_Sample" start="20" end="23" startBytecode="0" endBytecode="18" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> + </Method> + <SourceLine classname="AWCBR_Sample" start="22" end="22" startBytecode="16" endBytecode="16" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <BugInstance type="AWCBR_ARRAY_WRAPPED_CALL_BY_REFERENCE" priority="2" abbrev="AWCBR" category="STYLE"> + <Class classname="AWCBR_Sample"> + <SourceLine classname="AWCBR_Sample" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="ignoreRegs" signature="Ljava/util/Set;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> - </Field> + <Method classname="AWCBR_Sample" name="testuninitedalloc" signature="(I)I" isStatic="false"> + <SourceLine classname="AWCBR_Sample" start="11" end="15" startBytecode="0" endBytecode="18" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> + </Method> + <SourceLine classname="AWCBR_Sample" start="14" end="14" startBytecode="16" endBytecode="16" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <BugInstance type="USBR_UNNECESSARY_STORE_BEFORE_RETURN" priority="2" abbrev="USBR" category="STYLE"> + <Class classname="AWCBR_Sample"> + <SourceLine classname="AWCBR_Sample" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="rootScopeBlock" signature="Lcom/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope$ScopeBlock;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> - </Field> + <Method classname="AWCBR_Sample" name="testNoCall" signature="(I)I" isStatic="false"> + <SourceLine classname="AWCBR_Sample" start="29" end="31" startBytecode="0" endBytecode="13" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> + </Method> + <SourceLine classname="AWCBR_Sample" start="31" end="31" startBytecode="13" endBytecode="13" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <BugInstance type="USBR_UNNECESSARY_STORE_BEFORE_RETURN" priority="2" abbrev="USBR" category="STYLE"> + <Class classname="AWCBR_Sample"> + <SourceLine classname="AWCBR_Sample" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="switchTargets" signature="Ljava/util/Set;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> - </Field> + <Method classname="AWCBR_Sample" name="testinitedalloc" signature="(I)I" isStatic="false"> + <SourceLine classname="AWCBR_Sample" start="20" end="23" startBytecode="0" endBytecode="18" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> + </Method> + <SourceLine classname="AWCBR_Sample" start="23" end="23" startBytecode="18" endBytecode="18" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </BugInstance> - <BugInstance type="SIC_INNER_SHOULD_BE_STATIC_ANON" priority="3" abbrev="SIC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ClassEnvy$1"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ClassEnvy$1" sourcefile="ClassEnvy.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ClassEnvy.java"/> + <BugInstance type="USBR_UNNECESSARY_STORE_BEFORE_RETURN" priority="2" abbrev="USBR" category="STYLE"> + <Class classname="AWCBR_Sample"> + <SourceLine classname="AWCBR_Sample" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </Class> + <Method classname="AWCBR_Sample" name="testuninitedalloc" signature="(I)I" isStatic="false"> + <SourceLine classname="AWCBR_Sample" start="11" end="15" startBytecode="0" endBytecode="18" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> + </Method> + <SourceLine classname="AWCBR_Sample" start="15" end="15" startBytecode="18" endBytecode="18" sourcefile="AWCBR_Sample.java" sourcepath="AWCBR_Sample.java"/> </BugInstance> - <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + <BugInstance type="BAS_BLOATED_ASSIGNMENT_SCOPE" priority="2" abbrev="BAS" category="PERFORMANCE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" name="confusingSignatures" signature="(Ljava/lang/String;Ljava/lang/String;)Z" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="111" end="138" startBytecode="0" endBytecode="148" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + <Method classname="BAS_Sample" name="testIfScope" signature="(Ljava/lang/String;)V" isStatic="false"> + <SourceLine classname="BAS_Sample" start="7" end="12" startBytecode="0" endBytecode="22" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="126" end="126" startBytecode="77" endBytecode="77" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> - <String value="getSignature()Ljava/lang/String;"/> + <SourceLine classname="BAS_Sample" start="7" end="7" startBytecode="7" endBytecode="7" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="2" abbrev="DLS" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" name="confusingSignatures" signature="(Ljava/lang/String;Ljava/lang/String;)Z" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="111" end="138" startBytecode="0" endBytecode="148" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + <Method classname="BAS_Sample" name="testFPForScope" signature="(Ljava/lang/String;)Ljava/lang/String;" isStatic="false"> + <SourceLine classname="BAS_Sample" start="16" end="22" startBytecode="0" endBytecode="18" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="127" end="127" startBytecode="91" endBytecode="91" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> - <String value="getSignature()Ljava/lang/String;"/> + <LocalVariable name="o" register="2" pc="8" role="LOCAL_VARIABLE_NAMED"/> + <SourceLine classname="BAS_Sample" start="16" end="16" startBytecode="7" endBytecode="7" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod" sourcefile="CopiedOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java"/> + <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="2" abbrev="DLS" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod" name="superclassCode" signature="Ljava/util/Map;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod" sourcefile="CopiedOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java"/> - </Field> + <Method classname="BAS_Sample" name="testIfScope" signature="(Ljava/lang/String;)V" isStatic="false"> + <SourceLine classname="BAS_Sample" start="7" end="12" startBytecode="0" endBytecode="11" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> + </Method> + <LocalVariable name="s" register="1" pc="22" role="LOCAL_VARIABLE_NAMED"/> + <SourceLine classname="BAS_Sample" start="10" end="10" startBytecode="21" endBytecode="21" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity" sourcefile="CyclomaticComplexity.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java"/> + <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="3" abbrev="DLS" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity" name="classContext" signature="Ledu/umd/cs/findbugs/ba/ClassContext;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity" sourcefile="CyclomaticComplexity.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java"/> - </Field> + <Method classname="BAS_Sample" name="testFPForScope" signature="(Ljava/lang/String;)Ljava/lang/String;" isStatic="false"> + <SourceLine classname="BAS_Sample" start="16" end="22" startBytecode="0" endBytecode="18" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> + </Method> + <LocalVariable name="o" register="2" pc="22" role="LOCAL_VARIABLE_NAMED"/> + <SourceLine classname="BAS_Sample" start="19" end="19" startBytecode="21" endBytecode="21" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DateComparison"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DateComparison" sourcefile="DateComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DateComparison.java"/> + <BugInstance type="LSC_LITERAL_STRING_COMPARISON" priority="3" abbrev="LSC" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.DateComparison" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DateComparison" start="91" end="179" startBytecode="0" endBytecode="503" sourcefile="DateComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DateComparison.java"/> + <Method classname="BAS_Sample" name="test2InnerScopes" signature="(Ljava/lang/String;)Ljava/lang/String;" isStatic="false"> + <SourceLine classname="BAS_Sample" start="38" end="47" startBytecode="0" endBytecode="44" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DateComparison" start="91" end="91" startBytecode="0" endBytecode="0" sourcefile="DateComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DateComparison.java"/> + <SourceLine classname="BAS_Sample" start="41" end="41" startBytecode="15" endBytecode="15" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="NM_CLASS_NOT_EXCEPTION" priority="2" abbrev="Nm" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + <BugInstance type="LSC_LITERAL_STRING_COMPARISON" priority="3" abbrev="LSC" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> + <Method classname="BAS_Sample" name="test2InnerScopes" signature="(Ljava/lang/String;)Ljava/lang/String;" isStatic="false"> + <SourceLine classname="BAS_Sample" start="38" end="47" startBytecode="0" endBytecode="44" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> + </Method> + <SourceLine classname="BAS_Sample" start="43" end="43" startBytecode="32" endBytecode="32" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="PMB_POSSIBLE_MEMORY_BLOAT" priority="2" abbrev="PMB" category="CORRECTNESS"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + <BugInstance type="LSC_LITERAL_STRING_COMPARISON" priority="3" abbrev="LSC" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" start="96" end="96" startBytecode="99" endBytecode="99" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> - <Field classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" name="runtimeExceptions" signature="Ljava/util/Set;" isStatic="true"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> - </Field> + <Method classname="BAS_Sample" name="testFP2Scopes" signature="(Ljava/lang/String;)Ljava/lang/String;" isStatic="false"> + <SourceLine classname="BAS_Sample" start="27" end="33" startBytecode="0" endBytecode="40" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> + </Method> + <SourceLine classname="BAS_Sample" start="28" end="28" startBytecode="11" endBytecode="11" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="PMB_POSSIBLE_MEMORY_BLOAT" priority="2" abbrev="PMB" category="CORRECTNESS"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + <BugInstance type="LSC_LITERAL_STRING_COMPARISON" priority="3" abbrev="LSC" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" start="104" end="104" startBytecode="155" endBytecode="155" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> - <Field classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" name="notFoundExceptions" signature="Ljava/util/Set;" isStatic="true"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> - </Field> + <Method classname="BAS_Sample" name="testFP2Scopes" signature="(Ljava/lang/String;)Ljava/lang/String;" isStatic="false"> + <SourceLine classname="BAS_Sample" start="27" end="33" startBytecode="0" endBytecode="40" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> + </Method> + <SourceLine classname="BAS_Sample" start="30" end="30" startBytecode="28" endBytecode="28" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <BugInstance type="LSC_LITERAL_STRING_COMPARISON" priority="3" abbrev="LSC" category="STYLE"> + <Class classname="BAS_Sample"> + <SourceLine classname="BAS_Sample" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="142" end="280" startBytecode="0" endBytecode="1077" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <Method classname="BAS_Sample" name="testIfScope" signature="(Ljava/lang/String;)V" isStatic="false"> + <SourceLine classname="BAS_Sample" start="7" end="12" startBytecode="0" endBytecode="22" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="142" end="142" startBytecode="0" endBytecode="0" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <SourceLine classname="BAS_Sample" start="8" end="8" startBytecode="11" endBytecode="11" sourcefile="BAS_Sample.java" sourcepath="BAS_Sample.java"/> </BugInstance> - <BugInstance type="LII_LIST_INDEXED_ITERATING" priority="2" abbrev="LII" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <BugInstance type="DLS_DEAD_LOCAL_STORE" priority="3" abbrev="DLS" category="STYLE"> + <Class classname="BSB_Sample"> + <SourceLine classname="BSB_Sample" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="removeFromCollectionGroup" signature="(Ledu/umd/cs/findbugs/OpcodeStack$Item;)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="338" end="349" startBytecode="0" endBytecode="74" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <Method classname="BSB_Sample" name="accessSyncMap" signature="()V" isStatic="false"> + <SourceLine classname="BSB_Sample" start="70" end="77" startBytecode="0" endBytecode="33" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="341" end="341" startBytecode="23" endBytecode="71" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <LocalVariable name="?" register="5" pc="55" role="LOCAL_VARIABLE_UNKNOWN"/> + <SourceLine classname="BSB_Sample" start="74" end="74" startBytecode="55" endBytecode="55" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </BugInstance> - <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <BugInstance type="LSYC_LOCAL_SYNCHRONIZED_COLLECTION" priority="1" abbrev="LSYC" category="CORRECTNESS"> + <Class classname="BSB_Sample"> + <SourceLine classname="BSB_Sample" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="142" end="280" startBytecode="0" endBytecode="1077" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <Method classname="BSB_Sample" name="testAliasedLocalBeginBloated" signature="(I)V" isStatic="false"> + <SourceLine classname="BSB_Sample" start="39" end="47" startBytecode="0" endBytecode="60" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="186" end="186" startBytecode="318" endBytecode="318" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> - <String value="intValue()I"/> + <SourceLine classname="BSB_Sample" start="42" end="42" startBytecode="19" endBytecode="19" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <BugInstance type="LSYC_LOCAL_SYNCHRONIZED_COLLECTION" priority="1" abbrev="LSYC" category="CORRECTNESS"> + <Class classname="BSB_Sample"> + <SourceLine classname="BSB_Sample" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="collectionGroups" signature="Ljava/util/List;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> - </Field> + <Method classname="BSB_Sample" name="testBranchCutDown" signature="(I)V" isStatic="false"> + <SourceLine classname="BSB_Sample" start="51" end="62" startBytecode="0" endBytecode="65" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> + </Method> + <SourceLine classname="BSB_Sample" start="54" end="54" startBytecode="16" endBytecode="16" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <BugInstance type="LSYC_LOCAL_SYNCHRONIZED_COLLECTION" priority="1" abbrev="LSYC" category="CORRECTNESS"> + <Class classname="BSB_Sample"> + <SourceLine classname="BSB_Sample" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="groupToIterator" signature="Ljava/util/Map;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> - </Field> + <Method classname="BSB_Sample" name="testFieldBeginBloated" signature="(II)V" isStatic="false"> + <SourceLine classname="BSB_Sample" start="16" end="23" startBytecode="0" endBytecode="58" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> + </Method> + <SourceLine classname="BSB_Sample" start="18" end="18" startBytecode="14" endBytecode="14" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <BugInstance type="LSYC_LOCAL_SYNCHRONIZED_COLLECTION" priority="1" abbrev="LSYC" category="CORRECTNESS"> + <Class classname="BSB_Sample"> + <SourceLine classname="BSB_Sample" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="loops" signature="Ljava/util/Map;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> - </Field> + <Method classname="BSB_Sample" name="testLocalBeginBloated" signature="(I)V" isStatic="false"> + <SourceLine classname="BSB_Sample" start="27" end="35" startBytecode="0" endBytecode="57" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> + </Method> + <SourceLine classname="BSB_Sample" start="30" end="30" startBytecode="16" endBytecode="16" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <BugInstance type="NMCS_NEEDLESS_MEMBER_COLLECTION_SYNCHRONIZATION" priority="2" abbrev="NMCS" category="PERFORMANCE"> + <Class classname="BSB_Sample"> + <SourceLine classname="BSB_Sample" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <Field classname="BSB_Sample" name="synchMap" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="BSB_Sample" start="12" end="12" startBytecode="37" endBytecode="37" sourcefile="BSB_Sample.java" sourcepath="BSB_Sample.java"/> </Field> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="cfg" signature="Ledu/umd/cs/findbugs/ba/CFG;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> - </Field> + <String value="testcd(D)V"/> + <String value="testcd(Ljava/lang/Character;)V"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="clsContext" signature="Ledu/umd/cs/findbugs/ba/ClassContext;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> - </Field> + <String value="testcd(Ljava/lang/Character;)V"/> + <String value="testcd(D)V"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="localizableFields" signature="Ljava/util/Map;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> - </Field> + <String value="testcf(F)V"/> + <String value="testcf(Ljava/lang/Character;)V"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="visitedBlocks" signature="Ljava/util/BitSet;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> - </Field> + <String value="testcf(Ljava/lang/Character;)V"/> + <String value="testcf(F)V"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.FinalParameters"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FinalParameters" sourcefile="FinalParameters.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FinalParameters.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.FinalParameters" name="changedParms" signature="Ljava/util/Set;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FinalParameters" sourcefile="FinalParameters.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FinalParameters.java"/> - </Field> + <String value="testci(I)V"/> + <String value="testci(Ljava/lang/Character;)V"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering" sourcefile="InefficientStringBuffering.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering" sourcefile="InefficientStringBuffering.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java"/> - </Field> + <String value="testci(Ljava/lang/Character;)V"/> + <String value="testci(I)V"/> </BugInstance> - <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking" sourcefile="InheritanceTypeChecking.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Field classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking" name="ifStatements" signature="Ljava/util/Set;" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking" sourcefile="InheritanceTypeChecking.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java"/> - </Field> + <String value="testcj(J)V"/> + <String value="testcj(Ljava/lang/Character;)V"/> </BugInstance> - <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="4" abbrev="PRMC" category="PERFORMANCE"> - <Class classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java"/> + <BugInstance type="CAO_CONFUSING_AUTOBOXED_OVERLOADING" priority="2" abbrev="CAO" category="CORRECTNESS"> + <Class classname="CAO_Sample"> + <SourceLine classname="CAO_Sample" sourcefile="CAO_Sample.java" sourcepath="CAO_Sample.java"/> </Class> - <Method classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" name="sawOpcode" signature="(I)V" isStatic="false"> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" start="92" end="155" startBytecode="0" endBytecode="504" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java"/> + <String value="testcj(Ljava/lang/Character;)V"/> + <String value="testcj(J)V"/> + </BugInstance> + <BugInstance type="CBX_CUSTOM_BUILT_XML" priority="3" abbrev="CBX" category="STYLE"> + <Class classname="CBX_Sample"> + <SourceLine classname="CBX_Sample" sourcefile="CBX_Sample.java" sourcepath="CBX_Sample.java"/> + </Class> + <Method classname="CBX_Sample" name="testBuildXML" signature="(ILjava/lang/String;)Ljava/lang/String;" isStatic="false"> + <SourceLine classname="CBX_Sample" start="6" end="10" startBytecode="0" endBytecode="64" sourcefile="CBX_Sample.java" sourcepath="CBX_Sample.java"/> </Method> - <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" start="149" end="149" startBytecode="201" endBytecode="201" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorRe... [truncated message content] |
From: <dbr...@us...> - 2007-03-11 14:27:11
|
Revision: 876 http://svn.sourceforge.net/fb-contrib/?rev=876&view=rev Author: dbrosius Date: 2007-03-11 07:26:56 -0700 (Sun, 11 Mar 2007) Log Message: ----------- bug report so that i know when detectors break Added Paths: ----------- trunk/fb-contrib/samples/samples-bugs.xml Added: trunk/fb-contrib/samples/samples-bugs.xml =================================================================== --- trunk/fb-contrib/samples/samples-bugs.xml (rev 0) +++ trunk/fb-contrib/samples/samples-bugs.xml 2007-03-11 14:26:56 UTC (rev 876) @@ -0,0 +1,1391 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<BugCollection version="1.2.0-rc1" sequence="0" timestamp="-1" analysisTimestamp="1173623029015" release=""> + <Project filename="O:\fb-contrib\fb-contrib.fb"> + <Jar>O:\fb-contrib\classes</Jar> + <AuxClasspathEntry>O:\fb-contrib\lib\bcel.jar</AuxClasspathEntry> + <AuxClasspathEntry>O:\fb-contrib\lib\findbugs.jar</AuxClasspathEntry> + <SrcDir>O:\fb-contrib\src</SrcDir> + </Project> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn" sourcefile="AbnormalFinallyBlockReturn.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn" name="fbInfo" signature="Ljava/util/List;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbnormalFinallyBlockReturn" sourcefile="AbnormalFinallyBlockReturn.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod" sourcefile="AbstractOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod" name="superClasses" signature="[Lorg/apache/bcel/classfile/JavaClass;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod" sourcefile="AbstractOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections" sourcefile="ArrayBasedCollections.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayBasedCollections" sourcefile="ArrayBasedCollections.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java"/> + </Field> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="228" startBytecode="0" endBytecode="917" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="118" startBytecode="0" endBytecode="0" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="228" startBytecode="0" endBytecode="917" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="143" end="143" startBytecode="186" endBytecode="186" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <String value="getRegisterNumber()I"/> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="118" end="228" startBytecode="0" endBytecode="917" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" start="150" end="150" startBytecode="249" endBytecode="249" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + <String value="getSignature()Ljava/lang/String;"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" name="wrappers" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ArrayWrappedCallByReference" sourcefile="ArrayWrappedCallByReference.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java"/> + </Field> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="135" end="251" startBytecode="0" endBytecode="971" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="135" end="135" startBytecode="0" endBytecode="0" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </BugInstance> + <BugInstance type="FCBL_FIELD_COULD_BE_LOCAL" priority="2" abbrev="FCBL" category="CORRECTNESS"> + <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="dontReport" signature="Z" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Field> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="114" end="114" startBytecode="184" endBytecode="184" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="135" end="251" startBytecode="0" endBytecode="971" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" start="177" end="177" startBytecode="358" endBytecode="358" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + <String value="getPC()I"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="catchHandlers" signature="Ljava/util/Set;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="ignoreRegs" signature="Ljava/util/Set;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="rootScopeBlock" signature="Lcom/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope$ScopeBlock;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" name="switchTargets" signature="Ljava/util/Set;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" sourcefile="BloatedAssignmentScope.java" sourcepath="com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java"/> + </Field> + </BugInstance> + <BugInstance type="SIC_INNER_SHOULD_BE_STATIC_ANON" priority="3" abbrev="SIC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ClassEnvy$1"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ClassEnvy$1" sourcefile="ClassEnvy.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ClassEnvy.java"/> + </Class> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" name="confusingSignatures" signature="(Ljava/lang/String;Ljava/lang/String;)Z" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="111" end="138" startBytecode="0" endBytecode="148" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="126" end="126" startBytecode="77" endBytecode="77" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + <String value="getSignature()Ljava/lang/String;"/> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" name="confusingSignatures" signature="(Ljava/lang/String;Ljava/lang/String;)Z" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="111" end="138" startBytecode="0" endBytecode="148" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ConfusingAutoboxedOverloading" start="127" end="127" startBytecode="91" endBytecode="91" sourcefile="ConfusingAutoboxedOverloading.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java"/> + <String value="getSignature()Ljava/lang/String;"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod" sourcefile="CopiedOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod" name="superclassCode" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CopiedOverriddenMethod" sourcefile="CopiedOverriddenMethod.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity" sourcefile="CyclomaticComplexity.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity" name="classContext" signature="Ledu/umd/cs/findbugs/ba/ClassContext;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.CyclomaticComplexity" sourcefile="CyclomaticComplexity.java" sourcepath="com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java"/> + </Field> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DateComparison"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DateComparison" sourcefile="DateComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DateComparison.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.DateComparison" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DateComparison" start="91" end="179" startBytecode="0" endBytecode="503" sourcefile="DateComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DateComparison.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DateComparison" start="91" end="91" startBytecode="0" endBytecode="0" sourcefile="DateComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DateComparison.java"/> + </BugInstance> + <BugInstance type="NM_CLASS_NOT_EXCEPTION" priority="2" abbrev="Nm" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + </Class> + </BugInstance> + <BugInstance type="PMB_POSSIBLE_MEMORY_BLOAT" priority="2" abbrev="PMB" category="CORRECTNESS"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + </Class> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" start="96" end="96" startBytecode="99" endBytecode="99" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + <Field classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" name="runtimeExceptions" signature="Ljava/util/Set;" isStatic="true"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + </Field> + </BugInstance> + <BugInstance type="PMB_POSSIBLE_MEMORY_BLOAT" priority="2" abbrev="PMB" category="CORRECTNESS"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + </Class> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" start="104" end="104" startBytecode="155" endBytecode="155" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + <Field classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" name="notFoundExceptions" signature="Ljava/util/Set;" isStatic="true"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" sourcefile="DeclaredRuntimeException.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java"/> + </Field> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="142" end="280" startBytecode="0" endBytecode="1077" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="142" end="142" startBytecode="0" endBytecode="0" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </BugInstance> + <BugInstance type="LII_LIST_INDEXED_ITERATING" priority="2" abbrev="LII" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="removeFromCollectionGroup" signature="(Ledu/umd/cs/findbugs/OpcodeStack$Item;)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="338" end="349" startBytecode="0" endBytecode="74" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="341" end="341" startBytecode="23" endBytecode="71" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="142" end="280" startBytecode="0" endBytecode="1077" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" start="186" end="186" startBytecode="318" endBytecode="318" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + <String value="intValue()I"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="collectionGroups" signature="Ljava/util/List;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="groupToIterator" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="loops" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" sourcefile="DeletingWhileIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="cfg" signature="Ledu/umd/cs/findbugs/ba/CFG;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="clsContext" signature="Ledu/umd/cs/findbugs/ba/ClassContext;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="localizableFields" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" name="visitedBlocks" signature="Ljava/util/BitSet;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal" sourcefile="FieldCouldBeLocal.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.FinalParameters"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FinalParameters" sourcefile="FinalParameters.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FinalParameters.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.FinalParameters" name="changedParms" signature="Ljava/util/Set;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.FinalParameters" sourcefile="FinalParameters.java" sourcepath="com/mebigfatguy/fbcontrib/detect/FinalParameters.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering" sourcefile="InefficientStringBuffering.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InefficientStringBuffering" sourcefile="InefficientStringBuffering.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking" sourcefile="InheritanceTypeChecking.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking" name="ifStatements" signature="Ljava/util/Set;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.InheritanceTypeChecking" sourcefile="InheritanceTypeChecking.java" sourcepath="com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java"/> + </Field> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="4" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" start="92" end="155" startBytecode="0" endBytecode="504" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" start="149" end="149" startBytecode="201" endBytecode="201" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java"/> + <String value="getStackDepth()I"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.JDBCVendorReliance" sourcefile="JDBCVendorReliance.java" sourcepath="com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java"/> + </Field> + </BugInstance> + <BugInstance type="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" priority="3" abbrev="PRMC" category="PERFORMANCE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" sourcefile="ListIndexedIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" name="sawOpcodeBug" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" start="184" end="269" startBytecode="0" endBytecode="543" sourcefile="ListIndexedIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" start="216" end="216" startBytecode="219" endBytecode="219" sourcefile="ListIndexedIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java"/> + <String value="getLoopEnd()I"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" sourcefile="ListIndexedIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" name="possibleForLoops" signature="Ljava/util/Set;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" sourcefile="ListIndexedIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" sourcefile="ListIndexedIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ListIndexedIterating" sourcefile="ListIndexedIterating.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LiteralStringComparison"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LiteralStringComparison" sourcefile="LiteralStringComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LiteralStringComparison.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.LiteralStringComparison" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LiteralStringComparison" sourcefile="LiteralStringComparison.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LiteralStringComparison.java"/> + </Field> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" sourcefile="LocalSynchronizedCollection.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" start="139" end="241" startBytecode="0" endBytecode="811" sourcefile="LocalSynchronizedCollection.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" start="139" end="139" startBytecode="0" endBytecode="0" sourcefile="LocalSynchronizedCollection.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" sourcefile="LocalSynchronizedCollection.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" sourcefile="LocalSynchronizedCollection.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" sourcefile="LocalSynchronizedCollection.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" name="syncRegs" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LocalSynchronizedCollection" sourcefile="LocalSynchronizedCollection.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java"/> + </Field> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" start="158" end="264" startBytecode="0" endBytecode="825" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" start="158" end="158" startBytecode="0" endBytecode="0" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" name="catchInfos" signature="Ljava/util/Set;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" name="exReg" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" name="exceptions" signature="[Lorg/apache/bcel/classfile/CodeException;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.LostExceptionStackTrace" sourcefile="LostExceptionStackTrace.java" sourcepath="com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java"/> + </Field> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.ManualArrayCopy"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ManualArrayCopy" sourcefile="ManualArrayCopy.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.ManualArrayCopy" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ManualArrayCopy" start="65" end="139" startBytecode="0" endBytecode="408" sourcefile="ManualArrayCopy.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.ManualArrayCopy" start="65" end="65" startBytecode="0" endBytecode="0" sourcefile="ManualArrayCopy.java" sourcepath="com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java"/> + </BugInstance> + <BugInstance type="CC_CYCLOMATIC_COMPLEXITY" priority="2" abbrev="CC" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="87" end="218" startBytecode="0" endBytecode="966" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="87" end="87" startBytecode="0" endBytecode="0" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </BugInstance> + <BugInstance type="CLI_CONSTANT_LIST_INDEX" priority="2" abbrev="CLI" category="CORRECTNESS"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="87" end="218" startBytecode="0" endBytecode="966" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="124" end="124" startBytecode="347" endBytecode="347" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </BugInstance> + <BugInstance type="CLI_CONSTANT_LIST_INDEX" priority="2" abbrev="CLI" category="CORRECTNESS"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="87" end="218" startBytecode="0" endBytecode="966" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="135" end="135" startBytecode="408" endBytecode="408" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </BugInstance> + <BugInstance type="CLI_CONSTANT_LIST_INDEX" priority="2" abbrev="CLI" category="CORRECTNESS"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Class> + <Method classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" name="sawOpcode" signature="(I)V" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="87" end="218" startBytecode="0" endBytecode="966" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </Method> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" start="149" end="149" startBytecode="511" endBytecode="511" sourcefile="NeedlessAutoboxing.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java"/> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessInstanceRetrieval"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessInstanceRetrieval" sourcefile="NeedlessInstanceRetrieval.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NeedlessInstanceRetrieval" name="lnTable" signature="Lorg/apache/bcel/classfile/LineNumberTable;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessInstanceRetrieval" sourcefile="NeedlessInstanceRetrieval.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" sourcefile="NeedlessMemberCollectionSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" name="aliases" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" sourcefile="NeedlessMemberCollectionSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" sourcefile="NeedlessMemberCollectionSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" name="collectionFields" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" sourcefile="NeedlessMemberCollectionSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" sourcefile="NeedlessMemberCollectionSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NeedlessMemberCollectionSynchronization" sourcefile="NeedlessMemberCollectionSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization" sourcefile="NonOwnedSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization" name="regPriorities" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization" sourcefile="NonOwnedSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization" sourcefile="NonOwnedSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization" name="stack" signature="Ledu/umd/cs/findbugs/OpcodeStack;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonOwnedSynchronization" sourcefile="NonOwnedSynchronization.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" sourcefile="NonRecycleableTaglibs.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" name="attributes" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" sourcefile="NonRecycleableTaglibs.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" sourcefile="NonRecycleableTaglibs.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" name="fieldAnnotations" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" sourcefile="NonRecycleableTaglibs.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" sourcefile="NonRecycleableTaglibs.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" name="methodWrites" signature="Ljava/util/Map;" isStatic="false"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.NonRecycleableTaglibs" sourcefile="NonRecycleableTaglibs.java" sourcepath="com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java"/> + </Field> + </BugInstance> + <BugInstance type="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" priority="3" abbrev="UwF" category="STYLE"> + <Class classname="com.mebigfatguy.fbcontrib.detect.OrphanedDOMNode"> + <SourceLine classname="com.mebigfatguy.fbcontrib.detect.OrphanedDOMNode" sourcefile="OrphanedDOMNode.java" sourcepath="com/mebigfatguy/fbcontrib/detect/OrphanedDOMNode.java"/> + </Class> + <Field classname="com.mebigfatguy.fbcontrib.detect.OrphanedDOMNode" name="nodeCreations" signat... [truncated message content] |
From: <dbr...@us...> - 2007-03-11 08:26:05
|
Revision: 875 http://svn.sourceforge.net/fb-contrib/?rev=875&view=rev Author: dbrosius Date: 2007-03-11 00:26:02 -0800 (Sun, 11 Mar 2007) Log Message: ----------- remove duplication Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2007-03-11 05:04:49 UTC (rev 874) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2007-03-11 08:26:02 UTC (rev 875) @@ -166,9 +166,6 @@ clsName = clsName.substring(1, clsName.length() - 1); clsName = clsName.replace('.', '/'); - if ("java/sql/SQLException".equals(clsName)) - return false; - if (!clsName.startsWith("java/sql/") && !clsName.startsWith("javax/sql/")) return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-11 05:04:50
|
Revision: 874 http://svn.sourceforge.net/fb-contrib/?rev=874&view=rev Author: dbrosius Date: 2007-03-10 21:04:49 -0800 (Sat, 10 Mar 2007) Log Message: ----------- Fix for 1676812 OCP flags overriding methods - while at it, short-circuit methods that have no object parameters Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2007-03-11 04:43:41 UTC (rev 873) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2007-03-11 05:04:49 UTC (rev 874) @@ -54,13 +54,13 @@ public class OverlyConcreteParameter extends BytecodeScanningDetector { private BugReporter bugReporter; - private JavaClass[] interfaces; + private JavaClass[] constrainingClasses; private Map<Integer, Map<JavaClass, List<MethodInfo>>> parameterDefiners; private Set<Integer> usedParameters; private JavaClass objectClass; private OpcodeStack stack; private int parmCount; - private boolean methodImplementsInterface; + private boolean methodSignatureIsConstrained; private boolean methodIsStatic; /** @@ -80,7 +80,11 @@ @Override public void visitClassContext(ClassContext classContext) { try { - interfaces = classContext.getJavaClass().getAllInterfaces(); + JavaClass[] infs = classContext.getJavaClass().getAllInterfaces(); + JavaClass[] sups = classContext.getJavaClass().getSuperClasses(); + constrainingClasses = new JavaClass[infs.length + sups.length]; + System.arraycopy(infs, 0, constrainingClasses, 0, infs.length); + System.arraycopy(sups, 0, constrainingClasses, infs.length, sups.length); parameterDefiners = new HashMap<Integer, Map<JavaClass, List<MethodInfo>>>(); usedParameters = new HashSet<Integer>(); stack = new OpcodeStack(); @@ -88,7 +92,7 @@ } catch (ClassNotFoundException cnfe) { bugReporter.reportMissingClass(cnfe); } finally { - interfaces = null; + constrainingClasses = null; parameterDefiners = null; usedParameters = null; stack = null; @@ -97,33 +101,34 @@ @Override public void visitMethod(Method obj) { - methodImplementsInterface = false; + methodSignatureIsConstrained = false; String methodName = obj.getName(); if (!"<init>".equals(methodName) && !"<clinit>".equals(methodName)) { String methodSig = obj.getSignature(); + String parms = methodSig.split("\\(|\\)")[1]; + if (parms.indexOf(";") >= 0) { - outer:for (JavaClass inf : interfaces) { - Method[] methods = inf.getMethods(); - for (Method m : methods) { - if (methodName.equals(m.getName())) { - if (methodSig.equals(m.getSignature())) { - methodImplementsInterface = true; - break outer; + outer:for (JavaClass cls : constrainingClasses) { + Method[] methods = cls.getMethods(); + for (Method m : methods) { + if (methodName.equals(m.getName())) { + if (methodSig.equals(m.getSignature())) { + methodSignatureIsConstrained = true; + break outer; + } } } } } } - - super.visitMethod(obj); } @Override public void visitCode(final Code obj) { try { - if (methodImplementsInterface) + if (methodSignatureIsConstrained) return; parameterDefiners.clear(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-03-11 04:43:41
|
Revision: 873 http://svn.sourceforge.net/fb-contrib/?rev=873&view=rev Author: dbrosius Date: 2007-03-10 20:43:41 -0800 (Sat, 10 Mar 2007) Log Message: ----------- add test case as described in bug 1676812 Modified Paths: -------------- trunk/fb-contrib/samples/OCP_Sample.java Modified: trunk/fb-contrib/samples/OCP_Sample.java =================================================================== --- trunk/fb-contrib/samples/OCP_Sample.java 2007-02-26 13:53:06 UTC (rev 872) +++ trunk/fb-contrib/samples/OCP_Sample.java 2007-03-11 04:43:41 UTC (rev 873) @@ -5,6 +5,7 @@ import java.io.IOException; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; @@ -15,7 +16,7 @@ import org.xml.sax.XMLReader; import org.xml.sax.helpers.DefaultHandler; -public class OCP_Sample implements ActionListener +public class OCP_Sample extends Z implements ActionListener { public String getDisplay(HashSet<String> s, String a, String b) { @@ -79,4 +80,18 @@ { b.fp(); } + + @Override + public void usesOCP(LinkedList<String> ll) + { + ll.add("foo"); + } } + +class Z +{ + public void usesOCP(LinkedList<String> ll) + { + } +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-02-26 13:53:54
|
Revision: 872 http://svn.sourceforge.net/fb-contrib/?rev=872&view=rev Author: dbrosius Date: 2007-02-26 05:53:06 -0800 (Mon, 26 Feb 2007) Log Message: ----------- oops, dev versions are odd Modified Paths: -------------- trunk/fb-contrib/build.xml Modified: trunk/fb-contrib/build.xml =================================================================== --- trunk/fb-contrib/build.xml 2007-02-26 09:02:31 UTC (rev 871) +++ trunk/fb-contrib/build.xml 2007-02-26 13:53:06 UTC (rev 872) @@ -20,7 +20,7 @@ <property name="javac.deprecation" value="on"/> <property name="javac.debug" value="on"/> - <property name="fb-contrib.version" value="3.4.0"/> + <property name="fb-contrib.version" value="3.3.0"/> <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-02-26 09:02:31
|
Revision: 871 http://svn.sourceforge.net/fb-contrib/?rev=871&view=rev Author: dbrosius Date: 2007-02-26 01:02:31 -0800 (Mon, 26 Feb 2007) Log Message: ----------- add check for new Float(f).intValue() and others. Also filter out valueOf(String, radix) calls Modified Paths: -------------- trunk/fb-contrib/etc/findbugs.xml trunk/fb-contrib/etc/messages.xml trunk/fb-contrib/samples/NAB_Sample.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2007-02-26 08:11:18 UTC (rev 870) +++ trunk/fb-contrib/etc/findbugs.xml 2007-02-26 09:02:31 UTC (rev 871) @@ -115,7 +115,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" speed="fast" - reports="NAB_NEEDLESS_AUTOBOXING_CTOR,NAB_NEEDLESS_BOXING_STRING_CTOR,NAB_NEEDLESS_AUTOBOXING_VALUEOF,NAB_NEEDLESS_BOXING_PARSE,NAB_NEEDLESS_BOXING_VALUEOF,NAB_NEEDLESS_BOX_TO_UNBOX" /> + reports="NAB_NEEDLESS_AUTOBOXING_CTOR,NAB_NEEDLESS_BOXING_STRING_CTOR,NAB_NEEDLESS_AUTOBOXING_VALUEOF,NAB_NEEDLESS_BOXING_PARSE,NAB_NEEDLESS_BOXING_VALUEOF,NAB_NEEDLESS_BOX_TO_UNBOX,NAB_NEEDLESS_BOX_TO_CAST" /> <Detector class="com.mebigfatguy.fbcontrib.detect.UnnecessaryStoreBeforeReturn" speed="fast" @@ -312,6 +312,7 @@ <BugPattern abbrev="NAB" type="NAB_NEEDLESS_BOXING_PARSE" category="PERFORMANCE" /> <BugPattern abbrev="NAB" type="NAB_NEEDLESS_BOXING_VALUEOF" category="PERFORMANCE" /> <BugPattern abbrev="NAB" type="NAB_NEEDLESS_BOX_TO_UNBOX" category="PERFORMANCE" experimental="true" /> + <BugPattern abbrev="NAB" type="NAB_NEEDLESS_BOX_TO_CAST" category="PERFORMANCE" experimental="true" /> <BugPattern abbrev="USBR" type="USBR_UNNECESSARY_STORE_BEFORE_RETURN" category="STYLE" /> <BugPattern abbrev="COM" type="COM_COPIED_OVERRIDDEN_METHOD" category="STYLE" /> <BugPattern abbrev="ABC" type="ABC_ARRAY_BASED_COLLECTIONS" category="CORRECTNESS" /> Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2007-02-26 08:11:18 UTC (rev 870) +++ trunk/fb-contrib/etc/messages.xml 2007-02-26 09:02:31 UTC (rev 871) @@ -1113,6 +1113,25 @@ ]]> </Details> </BugPattern> + + <BugPattern type="NAB_NEEDLESS_BOX_TO_CAST"> + <ShortDescription>method creates Boxed primitive from primitive only to cast to another primitive type</ShortDescription> + <LongDescription>method {1} creates Boxed primitive from primitive only to cast to another primitive type</LongDescription> + <Details> + <![CDATA[ + <p>This method constructs a Boxed Primitive from a primitive only to call the primitiveValue() method to + cast the value to another primitive typee. It is simpler to just use casting</p> + <pre> + primitive i = new BoxedPrimitive(1.0).primitiveValue(); + or + primitive i = BoxedPrimitive.valueOf(1.0).primitiveValue(); + + should just use + primitive i = (primitive)1.0; + </pre> + ]]> + </Details> + </BugPattern> <BugPattern type="USBR_UNNECESSARY_STORE_BEFORE_RETURN"> <ShortDescription>method stores return result in local before immediately returning it</ShortDescription> Modified: trunk/fb-contrib/samples/NAB_Sample.java =================================================================== --- trunk/fb-contrib/samples/NAB_Sample.java 2007-02-26 08:11:18 UTC (rev 870) +++ trunk/fb-contrib/samples/NAB_Sample.java 2007-02-26 09:02:31 UTC (rev 871) @@ -88,4 +88,38 @@ double d = new Double(6.0).doubleValue(); d = Double.valueOf(6.0).doubleValue(); } + + public void testBoxedCast() + { + short s = new Short((short)2).byteValue(); + s = Short.valueOf((short) 2).byteValue(); + int i = new Integer(3).byteValue(); + i = Integer.valueOf(3).byteValue(); + i = new Integer(3).shortValue(); + i = Integer.valueOf(3).shortValue(); + long l = new Long(4).byteValue(); + l = Long.valueOf(4).byteValue(); + l = new Long(4).shortValue(); + l = Long.valueOf(4).shortValue(); + l = new Long(4).intValue(); + l = Long.valueOf(4).intValue(); + float f = new Float(5.0f).byteValue(); + f = Float.valueOf(5.0f).byteValue(); + f = new Float(5.0f).shortValue(); + f = Float.valueOf(5.0f).shortValue(); + f = new Float(5.0f).intValue(); + f = Float.valueOf(5.0f).intValue(); + f = new Float(5.0f).longValue(); + f = Float.valueOf(5.0f).longValue(); + double d = new Double(6.0).byteValue(); + d = Double.valueOf(6.0).byteValue(); + d = new Double(6.0).shortValue(); + d = Double.valueOf(6.0).shortValue(); + d = new Double(6.0).intValue(); + d = Double.valueOf(6.0).intValue(); + d = new Double(6.0).longValue(); + d = Double.valueOf(6.0).longValue(); + d = new Double(6.0).floatValue(); + d = Double.valueOf(6.0).floatValue(); + } } Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2007-02-26 08:11:18 UTC (rev 870) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2007-02-26 09:02:31 UTC (rev 871) @@ -104,7 +104,7 @@ if (sig.startsWith("(Ljava/lang/String;)")) { if (!"java/lang/Boolean".equals(boxClass) || (getClassContext().getJavaClass().getMajor() >= Constants.MAJOR_1_5)) state = SEEN_VALUEOFSTRING; - } else { + } else if (!sig.startsWith("(Ljava/lang/String;")) { state = SEEN_VALUEOFPRIMITIVE; } } else { @@ -170,6 +170,11 @@ .addClass(this) .addMethod(this) .addSourceLine(this)); + } else if (getSigConstantOperand().startsWith("()") && getNameConstantOperand().endsWith("Value")) { + bugReporter.reportBug(new BugInstance(this, "NAB_NEEDLESS_BOX_TO_CAST", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); } } state = SEEN_NOTHING; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-02-26 08:11:17
|
Revision: 870 http://svn.sourceforge.net/fb-contrib/?rev=870&view=rev Author: dbrosius Date: 2007-02-26 00:11:18 -0800 (Mon, 26 Feb 2007) Log Message: ----------- switch to 3.4 dev Modified Paths: -------------- trunk/fb-contrib/build.xml Modified: trunk/fb-contrib/build.xml =================================================================== --- trunk/fb-contrib/build.xml 2007-02-26 08:01:55 UTC (rev 869) +++ trunk/fb-contrib/build.xml 2007-02-26 08:11:18 UTC (rev 870) @@ -20,7 +20,7 @@ <property name="javac.deprecation" value="on"/> <property name="javac.debug" value="on"/> - <property name="fb-contrib.version" value="3.2.4"/> + <property name="fb-contrib.version" value="3.4.0"/> <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-02-26 08:01:54
|
Revision: 869 http://svn.sourceforge.net/fb-contrib/?rev=869&view=rev Author: dbrosius Date: 2007-02-26 00:01:55 -0800 (Mon, 26 Feb 2007) Log Message: ----------- add detector for BoxedPrimitive.valueOf(1).primitiveValue() Modified Paths: -------------- trunk/fb-contrib/etc/messages.xml trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2007-02-26 07:53:26 UTC (rev 868) +++ trunk/fb-contrib/etc/messages.xml 2007-02-26 08:01:55 UTC (rev 869) @@ -1104,6 +1104,9 @@ convert it back to a primitive. Just use the primitive value instead.</p> <pre> primitive i = new BoxedPrimitive(1).primitiveValue(); + or + primitive i = BoxedPrimitive.valueOf(1).primitiveValue(); + should just use primitive i = 1; </pre> Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2007-02-26 07:53:26 UTC (rev 868) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2007-02-26 08:01:55 UTC (rev 869) @@ -36,9 +36,10 @@ { private static final int SEEN_NOTHING = 0; private static final int SEEN_VALUE = 1; - private static final int SEEN_VALUEOF = 2; + private static final int SEEN_VALUEOFSTRING = 2; private static final int SEEN_PARSE = 3; private static final int SEEN_CTOR = 4; + private static final int SEEN_VALUEOFPRIMITIVE = 5; private static final Map<String, String[]> boxClasses = new HashMap<String, String[]>(); static { @@ -98,9 +99,14 @@ boxClass = getClassConstantOperand(); String[] boxSigs = boxClasses.get(boxClass); if (boxSigs != null) { - if ("valueOf".equals(getNameConstantOperand()) && getSigConstantOperand().startsWith("(Ljava/lang/String;)")) { - if (!"java/lang/Boolean".equals(boxClass) || (getClassContext().getJavaClass().getMajor() >= Constants.MAJOR_1_5)) - state = SEEN_VALUEOF; + if ("valueOf".equals(getNameConstantOperand())) { + String sig = getSigConstantOperand(); + if (sig.startsWith("(Ljava/lang/String;)")) { + if (!"java/lang/Boolean".equals(boxClass) || (getClassContext().getJavaClass().getMajor() >= Constants.MAJOR_1_5)) + state = SEEN_VALUEOFSTRING; + } else { + state = SEEN_VALUEOFPRIMITIVE; + } } else { String parseSig = parseClasses.get(boxClass); if (parseSig != null) { @@ -156,6 +162,7 @@ break; case SEEN_CTOR: + case SEEN_VALUEOFPRIMITIVE: if (seen == INVOKEVIRTUAL) { String[] boxSigs = boxClasses.get(boxClass); if (boxSigs[0].equals(getNameConstantOperand() + getSigConstantOperand())) { @@ -168,7 +175,7 @@ state = SEEN_NOTHING; break; - case SEEN_VALUEOF: + case SEEN_VALUEOFSTRING: if (seen == INVOKEVIRTUAL) { String[] boxSigs = boxClasses.get(boxClass); if (boxSigs[0].equals(getNameConstantOperand() + getSigConstantOperand())) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-02-26 07:53:27
|
Revision: 868 http://svn.sourceforge.net/fb-contrib/?rev=868&view=rev Author: dbrosius Date: 2007-02-25 23:53:26 -0800 (Sun, 25 Feb 2007) Log Message: ----------- add NAB check for new Integer(1).intValue() Modified Paths: -------------- trunk/fb-contrib/etc/findbugs.xml trunk/fb-contrib/etc/messages.xml trunk/fb-contrib/samples/NAB_Sample.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2007-02-25 12:47:44 UTC (rev 867) +++ trunk/fb-contrib/etc/findbugs.xml 2007-02-26 07:53:26 UTC (rev 868) @@ -115,7 +115,7 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.NeedlessAutoboxing" speed="fast" - reports="NAB_NEEDLESS_AUTOBOXING_CTOR,NAB_NEEDLESS_BOXING_STRING_CTOR,NAB_NEEDLESS_AUTOBOXING_VALUEOF,NAB_NEEDLESS_BOXING_PARSE,NAB_NEEDLESS_BOXING_VALUEOF" /> + reports="NAB_NEEDLESS_AUTOBOXING_CTOR,NAB_NEEDLESS_BOXING_STRING_CTOR,NAB_NEEDLESS_AUTOBOXING_VALUEOF,NAB_NEEDLESS_BOXING_PARSE,NAB_NEEDLESS_BOXING_VALUEOF,NAB_NEEDLESS_BOX_TO_UNBOX" /> <Detector class="com.mebigfatguy.fbcontrib.detect.UnnecessaryStoreBeforeReturn" speed="fast" @@ -311,6 +311,7 @@ <BugPattern abbrev="NAB" type="NAB_NEEDLESS_AUTOBOXING_VALUEOF" category="PERFORMANCE" /> <BugPattern abbrev="NAB" type="NAB_NEEDLESS_BOXING_PARSE" category="PERFORMANCE" /> <BugPattern abbrev="NAB" type="NAB_NEEDLESS_BOXING_VALUEOF" category="PERFORMANCE" /> + <BugPattern abbrev="NAB" type="NAB_NEEDLESS_BOX_TO_UNBOX" category="PERFORMANCE" experimental="true" /> <BugPattern abbrev="USBR" type="USBR_UNNECESSARY_STORE_BEFORE_RETURN" category="STYLE" /> <BugPattern abbrev="COM" type="COM_COPIED_OVERRIDDEN_METHOD" category="STYLE" /> <BugPattern abbrev="ABC" type="ABC_ARRAY_BASED_COLLECTIONS" category="CORRECTNESS" /> Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2007-02-25 12:47:44 UTC (rev 867) +++ trunk/fb-contrib/etc/messages.xml 2007-02-26 07:53:26 UTC (rev 868) @@ -1095,6 +1095,22 @@ </Details> </BugPattern> + <BugPattern type="NAB_NEEDLESS_BOX_TO_UNBOX"> + <ShortDescription>method creates Boxed primitive from primitive only to get primitive value</ShortDescription> + <LongDescription>method {1} creates Boxed primitive from primitive only to get primitive value</LongDescription> + <Details> + <![CDATA[ + <p>This method constructs a Boxed Primitive from a primitive only to call the primitiveValue() method to + convert it back to a primitive. Just use the primitive value instead.</p> + <pre> + primitive i = new BoxedPrimitive(1).primitiveValue(); + should just use + primitive i = 1; + </pre> + ]]> + </Details> + </BugPattern> + <BugPattern type="USBR_UNNECESSARY_STORE_BEFORE_RETURN"> <ShortDescription>method stores return result in local before immediately returning it</ShortDescription> <LongDescription>method {1} stores return result in local before immediately returning it</LongDescription> Modified: trunk/fb-contrib/samples/NAB_Sample.java =================================================================== --- trunk/fb-contrib/samples/NAB_Sample.java 2007-02-25 12:47:44 UTC (rev 867) +++ trunk/fb-contrib/samples/NAB_Sample.java 2007-02-26 07:53:26 UTC (rev 868) @@ -55,8 +55,8 @@ public void testExtraneousParse() { - Boolean bo = Boolean.valueOf(Boolean.parseBoolean("test")); - bo = new Boolean(Boolean.parseBoolean("test")); + Boolean bo = Boolean.valueOf(Boolean.parseBoolean("true")); + bo = new Boolean(Boolean.parseBoolean("true")); Byte b = Byte.valueOf(Byte.parseByte("1")); b = new Byte(Byte.parseByte("1")); Short s = Short.valueOf(Short.parseShort("1")); @@ -70,4 +70,22 @@ Double d = Double.valueOf(Double.parseDouble("1")); d = new Double(Double.parseDouble("1")); } + + public void testBoxToUnbox() + { + boolean bo = new Boolean(true).booleanValue(); + bo = Boolean.valueOf(true).booleanValue(); + byte b = new Byte((byte)1).byteValue(); + b = Byte.valueOf((byte)1).byteValue(); + short s = new Short((short)2).shortValue(); + s = Short.valueOf((short) 2).shortValue(); + int i = new Integer(3).intValue(); + i = Integer.valueOf(3).intValue(); + long l = new Long(4).longValue(); + l = Long.valueOf(4).longValue(); + float f = new Float(5.0f).floatValue(); + f = Float.valueOf(5.0f).floatValue(); + double d = new Double(6.0).doubleValue(); + d = Double.valueOf(6.0).doubleValue(); + } } Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2007-02-25 12:47:44 UTC (rev 867) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2007-02-26 07:53:26 UTC (rev 868) @@ -38,6 +38,7 @@ private static final int SEEN_VALUE = 1; private static final int SEEN_VALUEOF = 2; private static final int SEEN_PARSE = 3; + private static final int SEEN_CTOR = 4; private static final Map<String, String[]> boxClasses = new HashMap<String, String[]>(); static { @@ -95,12 +96,12 @@ } } else if (seen == INVOKESTATIC) { boxClass = getClassConstantOperand(); - if (boxClasses.containsKey(boxClass)) { + String[] boxSigs = boxClasses.get(boxClass); + if (boxSigs != null) { if ("valueOf".equals(getNameConstantOperand()) && getSigConstantOperand().startsWith("(Ljava/lang/String;)")) { if (!"java/lang/Boolean".equals(boxClass) || (getClassContext().getJavaClass().getMajor() >= Constants.MAJOR_1_5)) state = SEEN_VALUEOF; - } - else { + } else { String parseSig = parseClasses.get(boxClass); if (parseSig != null) { String methodInfo = getNameConstantOperand() + getSigConstantOperand(); @@ -110,6 +111,14 @@ } } } + } else if (seen == INVOKESPECIAL) { + boxClass = getClassConstantOperand(); + String[] boxSigs = boxClasses.get(boxClass); + if (boxSigs != null) { + if ("<init>".equals(getNameConstantOperand()) && boxSigs[1].equals(getSigConstantOperand())) { + state = SEEN_CTOR; + } + } } break; @@ -146,6 +155,19 @@ state = SEEN_NOTHING; break; + case SEEN_CTOR: + if (seen == INVOKEVIRTUAL) { + String[] boxSigs = boxClasses.get(boxClass); + if (boxSigs[0].equals(getNameConstantOperand() + getSigConstantOperand())) { + bugReporter.reportBug(new BugInstance(this, "NAB_NEEDLESS_BOX_TO_UNBOX", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this)); + } + } + state = SEEN_NOTHING; + break; + case SEEN_VALUEOF: if (seen == INVOKEVIRTUAL) { String[] boxSigs = boxClasses.get(boxClass); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-02-25 12:47:48
|
Revision: 867 http://svn.sourceforge.net/fb-contrib/?rev=867&view=rev Author: dbrosius Date: 2007-02-25 04:47:44 -0800 (Sun, 25 Feb 2007) Log Message: ----------- don't complain about java/sql/SQLException methods Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2007-02-20 01:38:25 UTC (rev 866) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2007-02-25 12:47:44 UTC (rev 867) @@ -165,7 +165,10 @@ if (clsName.endsWith(";")) clsName = clsName.substring(1, clsName.length() - 1); clsName = clsName.replace('.', '/'); - + + if ("java/sql/SQLException".equals(clsName)) + return false; + if (!clsName.startsWith("java/sql/") && !clsName.startsWith("javax/sql/")) return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |