fb-contrib-commit Mailing List for fb-contrib (Page 17)
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...> - 2010-01-05 07:05:10
|
Revision: 1441 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1441&view=rev Author: dbrosius Date: 2010-01-05 07:05:04 +0000 (Tue, 05 Jan 2010) Log Message: ----------- using 1.5 now --> use enums Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java 2010-01-05 07:02:46 UTC (rev 1440) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java 2010-01-05 07:05:04 UTC (rev 1441) @@ -37,10 +37,7 @@ */ public class FloatingPointLoops extends BytecodeScanningDetector { - private static final int SEEN_LOAD = 1; - private static final int SEEN_CMPX = 2; - private static final int SEEN_IFX = 3; - private static final int SEEN_STORE = 4; + enum State {SAW_LOAD, SAW_CMPX, SAW_IFX, SAW_STORE}; BugReporter bugReporter; private Set<FloatForLoop> forLoops = new HashSet<FloatForLoop>(); @@ -93,7 +90,7 @@ */ public class FloatForLoop { - private int state; + private State state; private int loopPC; private int loopReg; private int gotoPC; @@ -101,18 +98,18 @@ public FloatForLoop(int reg, int pc) { loopReg = reg; loopPC = pc; - state = SEEN_LOAD; + state = State.SAW_LOAD; gotoPC = -1; } public boolean sawOpcode(final int seen) { switch (state) { - case SEEN_LOAD: + case SAW_LOAD: if ((seen == FCMPG) || (seen == FCMPL) || (seen == DCMPG) || (seen == DCMPL)) { - state = SEEN_CMPX; + state = State.SAW_CMPX; return true; } else if ((seen == INVOKEVIRTUAL) || (seen == INVOKESTATIC) || @@ -126,15 +123,15 @@ } break; - case SEEN_CMPX: + case SAW_CMPX: if ((seen >= IFEQ) && (seen <= IFLE)) { - state = SEEN_IFX; + state = State.SAW_IFX; gotoPC = getBranchTarget() - 3; return (gotoPC > getPC()); } break; - case SEEN_IFX: + case SAW_IFX: if (getPC() < (gotoPC - 1)) return true; else if (getPC() == (gotoPC - 1)) { @@ -147,12 +144,12 @@ storeReg = seen - DSTORE_0; else return false; - state = SEEN_STORE; + state = State.SAW_STORE; return storeReg == loopReg; } return false; - case SEEN_STORE: + case SAW_STORE: if (((seen == GOTO) || (seen == GOTO_W)) && (getBranchTarget() == loopPC)) { bugReporter.reportBug(new BugInstance(FloatingPointLoops.this, "FPL_FLOATING_POINT_LOOPS", NORMAL_PRIORITY) .addClass(FloatingPointLoops.this) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 07:02:52
|
Revision: 1440 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1440&view=rev Author: dbrosius Date: 2010-01-05 07:02:46 +0000 (Tue, 05 Jan 2010) Log Message: ----------- use better enum names Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java 2010-01-05 07:00:58 UTC (rev 1439) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java 2010-01-05 07:02:46 UTC (rev 1440) @@ -35,7 +35,7 @@ */ public class DateComparison extends BytecodeScanningDetector { - enum State {SEEN_NOTHING, SEENLOAD1_1, SEENLOAD1_2, SEENCMP1, SEENIFNE, SEENLOAD2_1, SEENLOAD2_2, SEENCMP2}; + enum State {SAW_NOTHING, SAW_LOAD1_1, SAW_LOAD1_2, SAW_CMP1, SAW_IFNE, SAW_LOAD2_1, SAW_LOAD2_2, SAW_CMP2}; private static final Set<String> dateClasses = new HashSet<String>(); static { @@ -66,7 +66,7 @@ */ @Override public void visit(Method obj) { - state = State.SEEN_NOTHING; + state = State.SAW_NOTHING; register1_1 = -1; register1_2 = -1; register2_1 = -1; @@ -82,24 +82,24 @@ @Override public void sawOpcode(int seen) { switch (state) { - case SEEN_NOTHING: + case SAW_NOTHING: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) { register1_1 = RegisterUtils.getALoadReg(this, seen); - state = State.SEENLOAD1_1; + state = State.SAW_LOAD1_1; } break; - case SEENLOAD1_1: + case SAW_LOAD1_1: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) register1_2 = RegisterUtils.getALoadReg(this, seen); if (register1_2 > -1) - state = State.SEENLOAD1_2; + state = State.SAW_LOAD1_2; else - state = State.SEEN_NOTHING; + state = State.SAW_NOTHING; break; - case SEENLOAD1_2: + case SAW_LOAD1_2: if (seen == INVOKEVIRTUAL) { String cls = getDottedClassConstantOperand(); if (dateClasses.contains(cls)) { @@ -107,44 +107,44 @@ if ("equals".equals(methodName) || "after".equals(methodName) || "before".equals(methodName)) { - state = State.SEENCMP1; + state = State.SAW_CMP1; } } } - if (state != State.SEENCMP1) - state = State.SEEN_NOTHING; + if (state != State.SAW_CMP1) + state = State.SAW_NOTHING; break; - case SEENCMP1: + case SAW_CMP1: if (seen == IFNE) - state = State.SEENIFNE; + state = State.SAW_IFNE; else - state = State.SEEN_NOTHING; + state = State.SAW_NOTHING; break; - case SEENIFNE: + case SAW_IFNE: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) register2_1 = RegisterUtils.getALoadReg(this, seen); if (register2_1 > -1) - state = State.SEENLOAD2_1; + state = State.SAW_LOAD2_1; else - state = State.SEEN_NOTHING; + state = State.SAW_NOTHING; break; - case SEENLOAD2_1: + case SAW_LOAD2_1: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) register2_2 = RegisterUtils.getALoadReg(this, seen); if ((register2_2 > -1) && ( ((register1_1 == register2_1) && (register1_2 == register2_2)) ||((register1_1 == register2_2) && (register1_2 == register2_1)))) - state = State.SEENLOAD2_2; + state = State.SAW_LOAD2_2; else - state = State.SEEN_NOTHING; + state = State.SAW_NOTHING; break; - case SEENLOAD2_2: + case SAW_LOAD2_2: if (seen == INVOKEVIRTUAL) { String cls = getDottedClassConstantOperand(); if (dateClasses.contains(cls)) { @@ -152,21 +152,21 @@ if ("equals".equals(methodName) || "after".equals(methodName) || "before".equals(methodName)) { - state = State.SEENCMP2; + state = State.SAW_CMP2; } } } - if (state != State.SEENCMP2) - state = State.SEEN_NOTHING; + if (state != State.SAW_CMP2) + state = State.SAW_NOTHING; break; - case SEENCMP2: + case SAW_CMP2: if (seen == IFEQ) { bugReporter.reportBug(new BugInstance("DDC_DOUBLE_DATE_COMPARISON", NORMAL_PRIORITY) .addClassAndMethod(this) .addSourceLine(this)); } - state = State.SEEN_NOTHING; + state = State.SAW_NOTHING; break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 07:01:05
|
Revision: 1439 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1439&view=rev Author: dbrosius Date: 2010-01-05 07:00:58 +0000 (Tue, 05 Jan 2010) Log Message: ----------- use better enum names Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java 2010-01-05 07:00:10 UTC (rev 1438) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java 2010-01-05 07:00:58 UTC (rev 1439) @@ -41,7 +41,7 @@ */ public class ConstantListIndex extends BytecodeScanningDetector { - enum State {SeenNothing, SeenConstant_0, SeenConstant}; + enum State {SAW_NOTHING, SAW_CONSTANT_0, SAW_CONSTANT}; private static final String MAX_ICONST0_LOOP_DISTANCE_PROPERTY = "fb-contrib.cli.maxloopdistance"; private static final Set<String> ubiquitousMethods = new HashSet<String>(); @@ -89,7 +89,7 @@ */ @Override public void visitMethod(Method obj) { - state = State.SeenNothing; + state = State.SAW_NOTHING; iConst0Looped.clear(); stack.resetForMethodEntry(this); } @@ -103,20 +103,20 @@ public void sawOpcode(int seen) { try { switch (state) { - case SeenNothing: + case SAW_NOTHING: if (seen == ICONST_0) - state = State.SeenConstant_0; + state = State.SAW_CONSTANT_0; else if ((seen >= ICONST_1) && (seen <= ICONST_5)) - state = State.SeenConstant; + state = State.SAW_CONSTANT; else if ((seen == LDC) || (seen == LDC_W)) { Constant c = getConstantRefOperand(); if (c instanceof ConstantInteger) - state = State.SeenConstant; + state = State.SAW_CONSTANT; } break; - case SeenConstant_0: - case SeenConstant: + case SAW_CONSTANT_0: + case SAW_CONSTANT: switch (seen) { case AALOAD: if ("main".equals(this.getMethodName())) @@ -129,7 +129,7 @@ //case BALOAD: byte and char indexing seems prevalent, and //case CALOAD: usually harmless so ignore case SALOAD: - if (state == State.SeenConstant_0) + if (state == State.SAW_CONSTANT_0) iConst0Looped.add(Integer.valueOf(getPC())); else { if (stack.getStackDepth() > 1) { @@ -149,7 +149,7 @@ if ("java/util/List".equals(getClassConstantOperand())) { String methodName = getNameConstantOperand(); if ("get".equals(methodName)) { - if (state == State.SeenConstant_0) + if (state == State.SAW_CONSTANT_0) iConst0Looped.add(Integer.valueOf(getPC())); else { bugReporter.reportBug(new BugInstance(this, "CLI_CONSTANT_LIST_INDEX", NORMAL_PRIORITY) @@ -161,7 +161,7 @@ } break; } - state = State.SeenNothing; + state = State.SAW_NOTHING; break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 07:00:17
|
Revision: 1438 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1438&view=rev Author: dbrosius Date: 2010-01-05 07:00:10 +0000 (Tue, 05 Jan 2010) Log Message: ----------- use better enum constants Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2010-01-05 06:58:46 UTC (rev 1437) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2010-01-05 07:00:10 UTC (rev 1438) @@ -35,7 +35,7 @@ */ public class AbstractClassEmptyMethods extends BytecodeScanningDetector { - enum State {SeenNothing, SeenNew, SeenDup, SeenLDC, SeenInvokeSpecial, SeenDone}; + enum State {SAW_NOTHING, SAW_NEW, SAW_DUP, SAW_LDC, SAW_INVOKESPECIAL, SAW_DONE}; private static JavaClass EXCEPTION_CLASS; static { @@ -77,7 +77,7 @@ @Override public void visitMethod(Method obj) { methodName = obj.getName(); - state = State.SeenNothing; + state = State.SAW_NOTHING; } /** @@ -102,61 +102,61 @@ public void sawOpcode(int seen) { try { switch (state) { - case SeenNothing: + case SAW_NOTHING: if (seen == RETURN) { bugReporter.reportBug(new BugInstance(this, "ACEM_ABSTRACT_CLASS_EMPTY_METHODS", NORMAL_PRIORITY) .addClass(this) .addMethod(this) .addSourceLine(this)); - state = State.SeenDone; + state = State.SAW_DONE; } else if (seen == NEW) { String newClass = getClassConstantOperand(); JavaClass exCls = Repository.lookupClass(newClass); if ((EXCEPTION_CLASS != null) && exCls.instanceOf(EXCEPTION_CLASS)) - state = State.SeenNew; + state = State.SAW_NEW; else - state = State.SeenDone; + state = State.SAW_DONE; } else - state = State.SeenDone; + state = State.SAW_DONE; break; - case SeenNew: + case SAW_NEW: if (seen == DUP) - state = State.SeenDup; + state = State.SAW_DUP; else - state = State.SeenDone; + state = State.SAW_DONE; break; - case SeenDup: + case SAW_DUP: if (((seen == LDC) || (seen == LDC_W)) && (getConstantRefOperand() instanceof ConstantString)) - state = State.SeenLDC; + state = State.SAW_LDC; else - state = State.SeenDone; + state = State.SAW_DONE; break; - case SeenLDC: + case SAW_LDC: if ((seen == INVOKESPECIAL) && "<init>".equals(getNameConstantOperand())) - state = State.SeenInvokeSpecial; + state = State.SAW_INVOKESPECIAL; else - state = State.SeenDone; + state = State.SAW_DONE; break; - case SeenInvokeSpecial: + case SAW_INVOKESPECIAL: if (seen == ATHROW) { bugReporter.reportBug(new BugInstance("ACEM_ABSTRACT_CLASS_EMPTY_METHODS", NORMAL_PRIORITY) .addClass(this) .addMethod(this) .addSourceLine(this)); } - state = State.SeenDone; + state = State.SAW_DONE; break; - case SeenDone: + case SAW_DONE: break; } } catch (ClassNotFoundException cnfe) { bugReporter.reportMissingClass(cnfe); - state = State.SeenDone; + state = State.SAW_DONE; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 06:58:55
|
Revision: 1437 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1437&view=rev Author: dbrosius Date: 2010-01-05 06:58:46 +0000 (Tue, 05 Jan 2010) Log Message: ----------- using 1.5 now --> use enums Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java 2010-01-05 06:56:51 UTC (rev 1436) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java 2010-01-05 06:58:46 UTC (rev 1437) @@ -39,15 +39,13 @@ */ public class DeprecatedTypesafeEnumPattern extends BytecodeScanningDetector { - private static final int SAW_NOTHING = 0; - private static final int SAW_INVOKESPECIAL = 1; - private static final int SAW_BUG = 2; + enum State {SAW_NOTHING, SAW_INVOKESPECIAL, SAW_BUG}; private final BugReporter bugReporter; private int firstEnumPC; private int enumCount; private Set<String> enumConstNames; - int state; + State state; /** * constructs a DTEP detector given the reporter to report bugs on. @@ -123,7 +121,7 @@ @Override public void visitCode(Code obj) { if ("<clinit>".equals(getMethod().getName())) { - state = SAW_NOTHING; + state = State.SAW_NOTHING; super.visitCode(obj); } } @@ -135,11 +133,11 @@ */ @Override public void sawOpcode(int seen) { - if (state == SAW_NOTHING) { + if (state == State.SAW_NOTHING) { if (seen == INVOKESPECIAL) { - state = SAW_INVOKESPECIAL; + state = State.SAW_INVOKESPECIAL; } - } else if (state == SAW_INVOKESPECIAL) { + } else if (state == State.SAW_INVOKESPECIAL) { if (seen == PUTSTATIC) { String fieldName = getNameConstantOperand(); if (enumConstNames.contains(fieldName)) { @@ -151,12 +149,12 @@ .addClass(this) .addMethod(this) .addSourceLine(this, firstEnumPC)); - state = SAW_BUG; + state = State.SAW_BUG; } } } - if (state != SAW_BUG) - state = SAW_NOTHING; + if (state != State.SAW_BUG) + state = State.SAW_NOTHING; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 06:56:57
|
Revision: 1436 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1436&view=rev Author: dbrosius Date: 2010-01-05 06:56:51 +0000 (Tue, 05 Jan 2010) Log Message: ----------- using 1.5 now -> use enums Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java 2010-01-05 06:49:08 UTC (rev 1435) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java 2010-01-05 06:56:51 UTC (rev 1436) @@ -35,14 +35,7 @@ */ public class DateComparison extends BytecodeScanningDetector { - private static final int SEEN_NOTHING = 0; - private static final int SEEN_LOAD1_1 = 1; - private static final int SEEN_LOAD1_2 = 2; - private static final int SEEN_CMP_1 = 3; - private static final int SEEN_IFNE = 4; - private static final int SEEN_LOAD2_1 = 5; - private static final int SEEN_LOAD2_2 = 6; - private static final int SEEN_CMP_2 = 7; + enum State {SEEN_NOTHING, SEENLOAD1_1, SEENLOAD1_2, SEENCMP1, SEENIFNE, SEENLOAD2_1, SEENLOAD2_2, SEENCMP2}; private static final Set<String> dateClasses = new HashSet<String>(); static { @@ -52,7 +45,7 @@ } private BugReporter bugReporter; - private int state; + private State state; private int register1_1; private int register1_2; private int register2_1; @@ -73,7 +66,7 @@ */ @Override public void visit(Method obj) { - state = SEEN_NOTHING; + state = State.SEEN_NOTHING; register1_1 = -1; register1_2 = -1; register2_1 = -1; @@ -92,21 +85,21 @@ case SEEN_NOTHING: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) { register1_1 = RegisterUtils.getALoadReg(this, seen); - state = SEEN_LOAD1_1; + state = State.SEENLOAD1_1; } break; - case SEEN_LOAD1_1: + case SEENLOAD1_1: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) register1_2 = RegisterUtils.getALoadReg(this, seen); if (register1_2 > -1) - state = SEEN_LOAD1_2; + state = State.SEENLOAD1_2; else - state = SEEN_NOTHING; + state = State.SEEN_NOTHING; break; - case SEEN_LOAD1_2: + case SEENLOAD1_2: if (seen == INVOKEVIRTUAL) { String cls = getDottedClassConstantOperand(); if (dateClasses.contains(cls)) { @@ -114,44 +107,44 @@ if ("equals".equals(methodName) || "after".equals(methodName) || "before".equals(methodName)) { - state = SEEN_CMP_1; + state = State.SEENCMP1; } } } - if (state != SEEN_CMP_1) - state = SEEN_NOTHING; + if (state != State.SEENCMP1) + state = State.SEEN_NOTHING; break; - case SEEN_CMP_1: + case SEENCMP1: if (seen == IFNE) - state = SEEN_IFNE; + state = State.SEENIFNE; else - state = SEEN_NOTHING; + state = State.SEEN_NOTHING; break; - case SEEN_IFNE: + case SEENIFNE: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) register2_1 = RegisterUtils.getALoadReg(this, seen); if (register2_1 > -1) - state = SEEN_LOAD2_1; + state = State.SEENLOAD2_1; else - state = SEEN_NOTHING; + state = State.SEEN_NOTHING; break; - case SEEN_LOAD2_1: + case SEENLOAD2_1: if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) register2_2 = RegisterUtils.getALoadReg(this, seen); if ((register2_2 > -1) && ( ((register1_1 == register2_1) && (register1_2 == register2_2)) ||((register1_1 == register2_2) && (register1_2 == register2_1)))) - state = SEEN_LOAD2_2; + state = State.SEENLOAD2_2; else - state = SEEN_NOTHING; + state = State.SEEN_NOTHING; break; - case SEEN_LOAD2_2: + case SEENLOAD2_2: if (seen == INVOKEVIRTUAL) { String cls = getDottedClassConstantOperand(); if (dateClasses.contains(cls)) { @@ -159,21 +152,21 @@ if ("equals".equals(methodName) || "after".equals(methodName) || "before".equals(methodName)) { - state = SEEN_CMP_2; + state = State.SEENCMP2; } } } - if (state != SEEN_CMP_2) - state = SEEN_NOTHING; + if (state != State.SEENCMP2) + state = State.SEEN_NOTHING; break; - case SEEN_CMP_2: + case SEENCMP2: if (seen == IFEQ) { bugReporter.reportBug(new BugInstance("DDC_DOUBLE_DATE_COMPARISON", NORMAL_PRIORITY) .addClassAndMethod(this) .addSourceLine(this)); } - state = SEEN_NOTHING; + state = State.SEEN_NOTHING; break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 06:49:15
|
Revision: 1435 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1435&view=rev Author: dbrosius Date: 2010-01-05 06:49:08 +0000 (Tue, 05 Jan 2010) Log Message: ----------- using 1.5 -> use enums Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java 2010-01-05 06:45:42 UTC (rev 1434) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java 2010-01-05 06:49:08 UTC (rev 1435) @@ -41,10 +41,9 @@ */ public class ConstantListIndex extends BytecodeScanningDetector { + enum State {SeenNothing, SeenConstant_0, SeenConstant}; + private static final String MAX_ICONST0_LOOP_DISTANCE_PROPERTY = "fb-contrib.cli.maxloopdistance"; - private static final int SEEN_NOTHING = 0; - private static final int SEEN_CONSTANT_0 = 1; - private static final int SEEN_CONSTANT = 2; private static final Set<String> ubiquitousMethods = new HashSet<String>(); static { ubiquitousMethods.add("java.lang.String.split(Ljava/lang/String;)[Ljava/lang/String;"); @@ -52,7 +51,7 @@ private final BugReporter bugReporter; - private int state; + private State state; private Set<Integer> iConst0Looped; private final int max_iConst0LoopDistance; private OpcodeStack stack; @@ -90,7 +89,7 @@ */ @Override public void visitMethod(Method obj) { - state = SEEN_NOTHING; + state = State.SeenNothing; iConst0Looped.clear(); stack.resetForMethodEntry(this); } @@ -104,20 +103,20 @@ public void sawOpcode(int seen) { try { switch (state) { - case SEEN_NOTHING: + case SeenNothing: if (seen == ICONST_0) - state = SEEN_CONSTANT_0; + state = State.SeenConstant_0; else if ((seen >= ICONST_1) && (seen <= ICONST_5)) - state = SEEN_CONSTANT; + state = State.SeenConstant; else if ((seen == LDC) || (seen == LDC_W)) { Constant c = getConstantRefOperand(); if (c instanceof ConstantInteger) - state = SEEN_CONSTANT; + state = State.SeenConstant; } break; - case SEEN_CONSTANT_0: - case SEEN_CONSTANT: + case SeenConstant_0: + case SeenConstant: switch (seen) { case AALOAD: if ("main".equals(this.getMethodName())) @@ -130,7 +129,7 @@ //case BALOAD: byte and char indexing seems prevalent, and //case CALOAD: usually harmless so ignore case SALOAD: - if (state == SEEN_CONSTANT_0) + if (state == State.SeenConstant_0) iConst0Looped.add(Integer.valueOf(getPC())); else { if (stack.getStackDepth() > 1) { @@ -150,7 +149,7 @@ if ("java/util/List".equals(getClassConstantOperand())) { String methodName = getNameConstantOperand(); if ("get".equals(methodName)) { - if (state == SEEN_CONSTANT_0) + if (state == State.SeenConstant_0) iConst0Looped.add(Integer.valueOf(getPC())); else { bugReporter.reportBug(new BugInstance(this, "CLI_CONSTANT_LIST_INDEX", NORMAL_PRIORITY) @@ -162,7 +161,7 @@ } break; } - state = SEEN_NOTHING; + state = State.SeenNothing; break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 06:45:48
|
Revision: 1434 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1434&view=rev Author: dbrosius Date: 2010-01-05 06:45:42 +0000 (Tue, 05 Jan 2010) Log Message: ----------- now using 1.5 -> use enums Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2010-01-05 05:37:13 UTC (rev 1433) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2010-01-05 06:45:42 UTC (rev 1434) @@ -35,12 +35,7 @@ */ public class AbstractClassEmptyMethods extends BytecodeScanningDetector { - public static final int SEEN_NOTHING = 0; - public static final int SEEN_NEW = 1; - public static final int SEEN_DUP = 2; - public static final int SEEN_LDC = 3; - public static final int SEEN_INVOKESPECIAL = 4; - public static final int SEEN_DONE = 5; + enum State {SeenNothing, SeenNew, SeenDup, SeenLDC, SeenInvokeSpecial, SeenDone}; private static JavaClass EXCEPTION_CLASS; static { @@ -52,7 +47,7 @@ } private BugReporter bugReporter; private String methodName; - private int state; + private State state; /** * constructs a ACEM detector given the reporter to report bugs on @@ -82,7 +77,7 @@ @Override public void visitMethod(Method obj) { methodName = obj.getName(); - state = SEEN_NOTHING; + state = State.SeenNothing; } /** @@ -107,61 +102,61 @@ public void sawOpcode(int seen) { try { switch (state) { - case SEEN_NOTHING: + case SeenNothing: if (seen == RETURN) { bugReporter.reportBug(new BugInstance(this, "ACEM_ABSTRACT_CLASS_EMPTY_METHODS", NORMAL_PRIORITY) .addClass(this) .addMethod(this) .addSourceLine(this)); - state = SEEN_DONE; + state = State.SeenDone; } else if (seen == NEW) { String newClass = getClassConstantOperand(); JavaClass exCls = Repository.lookupClass(newClass); if ((EXCEPTION_CLASS != null) && exCls.instanceOf(EXCEPTION_CLASS)) - state = SEEN_NEW; + state = State.SeenNew; else - state = SEEN_DONE; + state = State.SeenDone; } else - state = SEEN_DONE; + state = State.SeenDone; break; - case SEEN_NEW: + case SeenNew: if (seen == DUP) - state = SEEN_DUP; + state = State.SeenDup; else - state = SEEN_DONE; + state = State.SeenDone; break; - case SEEN_DUP: + case SeenDup: if (((seen == LDC) || (seen == LDC_W)) && (getConstantRefOperand() instanceof ConstantString)) - state = SEEN_LDC; + state = State.SeenLDC; else - state = SEEN_DONE; + state = State.SeenDone; break; - case SEEN_LDC: + case SeenLDC: if ((seen == INVOKESPECIAL) && "<init>".equals(getNameConstantOperand())) - state = SEEN_INVOKESPECIAL; + state = State.SeenInvokeSpecial; else - state = SEEN_DONE; + state = State.SeenDone; break; - case SEEN_INVOKESPECIAL: + case SeenInvokeSpecial: if (seen == ATHROW) { bugReporter.reportBug(new BugInstance("ACEM_ABSTRACT_CLASS_EMPTY_METHODS", NORMAL_PRIORITY) .addClass(this) .addMethod(this) .addSourceLine(this)); } - state = SEEN_DONE; + state = State.SeenDone; break; - case SEEN_DONE: + case SeenDone: break; } } catch (ClassNotFoundException cnfe) { bugReporter.reportMissingClass(cnfe); - state = SEEN_DONE; + state = State.SeenDone; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 05:37:20
|
Revision: 1433 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1433&view=rev Author: dbrosius Date: 2010-01-05 05:37:13 +0000 (Tue, 05 Jan 2010) Log Message: ----------- use enums Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java 2010-01-05 05:33:45 UTC (rev 1432) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java 2010-01-05 05:37:13 UTC (rev 1433) @@ -37,9 +37,7 @@ */ public class MisleadingOverloadModel extends PreorderVisitor implements Detector { - private static final Integer INSTANCE = Integer.valueOf(0); - private static final Integer STATIC = Integer.valueOf(1); - private static final Integer BOTH = Integer.valueOf(2); + enum MethodFoundType {Instance, Static, Both}; private final BugReporter bugReporter; @@ -52,26 +50,26 @@ } public void visitClassContext(ClassContext classContext) { - Map<String, Integer> declMethods = new HashMap<String, Integer>(); + Map<String, MethodFoundType> declMethods = new HashMap<String, MethodFoundType>(); JavaClass cls = classContext.getJavaClass(); String clsName = cls.getClassName(); Method[] methods = cls.getMethods(); for (Method m : methods) { String methodName = m.getName(); boolean report; - Integer newType; + MethodFoundType newType; if (m.isStatic()) { - report = declMethods.get(methodName) == INSTANCE; + report = declMethods.get(methodName) == MethodFoundType.Instance; if (report) - newType = BOTH; + newType = MethodFoundType.Both; else - newType = STATIC; + newType = MethodFoundType.Static; } else { - report = declMethods.get(m.getName()) == STATIC; + report = declMethods.get(m.getName()) == MethodFoundType.Static; if (report) - newType = BOTH; + newType = MethodFoundType.Both; else - newType = INSTANCE; + newType = MethodFoundType.Instance; } declMethods.put(methodName, newType); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 05:33:55
|
Revision: 1432 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1432&view=rev Author: dbrosius Date: 2010-01-05 05:33:45 +0000 (Tue, 05 Jan 2010) Log Message: ----------- can use 1.5 methods now Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java 2010-01-05 05:11:45 UTC (rev 1431) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java 2010-01-05 05:33:45 UTC (rev 1432) @@ -61,14 +61,14 @@ hashCode |= methodName.hashCode(); hashCode <<= 16; hashCode |= signature.hashCode(); - return new Long(hashCode); + return Long.valueOf(hashCode); } private Long getValue(MethodInfo methodInfo) { long value = methodInfo.numBytes; value <<= 32; value |= methodInfo.numMethodCalls; - return new Long(value); + return Long.valueOf(value); } private MethodInfo buildMethodInfo(Long value) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-05 05:11:56
|
Revision: 1431 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1431&view=rev Author: dbrosius Date: 2010-01-05 05:11:45 +0000 (Tue, 05 Jan 2010) Log Message: ----------- customize priority of bug based on pattern Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java 2010-01-04 04:26:03 UTC (rev 1430) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java 2010-01-05 05:11:45 UTC (rev 1431) @@ -30,66 +30,84 @@ */ public class MoreDumbMethods extends BytecodeScanningDetector { - private final static Map<String,String> dumbMethods = new HashMap<String,String>(); + private static class ReportInfo { + private String bugPattern; + private int bugPriority; + + ReportInfo(String pattern, int priority) { + bugPattern = pattern; + bugPriority = priority; + } + + String getPattern() { + return bugPattern; + } + + int getPriority() { + return bugPriority; + } + } + + private final static Map<String,ReportInfo> dumbMethods = new HashMap<String,ReportInfo>(); static { - dumbMethods.put("java/lang/Runtime.exit(I)V", "MDM_RUNTIME_EXIT_OR_HALT"); - dumbMethods.put("java/lang/Runtime.halt(I)V", "MDM_RUNTIME_EXIT_OR_HALT"); + dumbMethods.put("java/lang/Runtime.exit(I)V", new ReportInfo("MDM_RUNTIME_EXIT_OR_HALT", LOW_PRIORITY)); + dumbMethods.put("java/lang/Runtime.halt(I)V", new ReportInfo("MDM_RUNTIME_EXIT_OR_HALT", HIGH_PRIORITY)); - dumbMethods.put("java/lang/Runtime.runFinalization()V", "MDM_RUNFINALIZATION"); - dumbMethods.put("java/lang/System.runFinalization()V", "MDM_RUNFINALIZATION"); + dumbMethods.put("java/lang/Runtime.runFinalization()V", new ReportInfo("MDM_RUNFINALIZATION", NORMAL_PRIORITY)); + dumbMethods.put("java/lang/System.runFinalization()V", new ReportInfo("MDM_RUNFINALIZATION", NORMAL_PRIORITY)); - dumbMethods.put("java/math/BigDecimal.equals(Ljava/lang/Object;)Z", "MDM_BIGDECIMAL_EQUALS"); + dumbMethods.put("java/math/BigDecimal.equals(Ljava/lang/Object;)Z", new ReportInfo("MDM_BIGDECIMAL_EQUALS", NORMAL_PRIORITY)); // // Network checks // - dumbMethods.put("java/net/InetAddress.getLocalHost()Ljava/net/InetAddress;", "MDM_INETADDRESS_GETLOCALHOST"); + dumbMethods.put("java/net/InetAddress.getLocalHost()Ljava/net/InetAddress;", new ReportInfo("MDM_INETADDRESS_GETLOCALHOST", NORMAL_PRIORITY)); - dumbMethods.put("java/net/ServerSocket.<init>(I)V", "MDM_PROMISCUOUS_SERVERSOCKET"); - dumbMethods.put("java/net/ServerSocket.<init>(II)V", "MDM_PROMISCUOUS_SERVERSOCKET"); - dumbMethods.put("javax/net/ServerSocketFactory.createServerSocket(I)Ljava/net/ServerSocket;", "MDM_PROMISCUOUS_SERVERSOCKET"); - dumbMethods.put("javax/net/ServerSocketFactory.createServerSocket(II)Ljava/net/ServerSocket;", "MDM_PROMISCUOUS_SERVERSOCKET"); + dumbMethods.put("java/net/ServerSocket.<init>(I)V", new ReportInfo("MDM_PROMISCUOUS_SERVERSOCKET", NORMAL_PRIORITY)); + dumbMethods.put("java/net/ServerSocket.<init>(II)V", new ReportInfo("MDM_PROMISCUOUS_SERVERSOCKET", NORMAL_PRIORITY)); + dumbMethods.put("javax/net/ServerSocketFactory.createServerSocket(I)Ljava/net/ServerSocket;", new ReportInfo("MDM_PROMISCUOUS_SERVERSOCKET", LOW_PRIORITY)); + dumbMethods.put("javax/net/ServerSocketFactory.createServerSocket(II)Ljava/net/ServerSocket;", new ReportInfo("MDM_PROMISCUOUS_SERVERSOCKET", LOW_PRIORITY)); // // Random Number Generator checks // - dumbMethods.put("java/util/Random.<init>()V", "MDM_RANDOM_SEED"); - dumbMethods.put("java/security/SecureRandom.<init>()V", "MDM_SECURERANDOM"); - dumbMethods.put("java/security/SecureRandom.<init>([B)V", "MDM_SECURERANDOM"); - dumbMethods.put("java/security/SecureRandom.getSeed(I)[B", "MDM_SECURERANDOM"); + dumbMethods.put("java/util/Random.<init>()V", new ReportInfo("MDM_RANDOM_SEED", LOW_PRIORITY)); + dumbMethods.put("java/security/SecureRandom.<init>()V", new ReportInfo("MDM_SECURERANDOM", LOW_PRIORITY)); + dumbMethods.put("java/security/SecureRandom.<init>([B)V", new ReportInfo("MDM_SECURERANDOM", LOW_PRIORITY)); + dumbMethods.put("java/security/SecureRandom.getSeed(I)[B", new ReportInfo("MDM_SECURERANDOM", LOW_PRIORITY)); // // Thread checks // - dumbMethods.put("java/lang/Thread.getPriority()I", "MDM_THREAD_PRIORITIES"); - dumbMethods.put("java/lang/Thread.setPriority(I)V", "MDM_THREAD_PRIORITIES"); + dumbMethods.put("java/lang/Thread.getPriority()I", new ReportInfo("MDM_THREAD_PRIORITIES", LOW_PRIORITY)); + dumbMethods.put("java/lang/Thread.setPriority(I)V", new ReportInfo("MDM_THREAD_PRIORITIES", LOW_PRIORITY)); - dumbMethods.put("java/lang/Thread.sleep(J)V", "MDM_THREAD_YIELD"); - dumbMethods.put("java/lang/Thread.sleep(JI)V", "MDM_THREAD_YIELD"); - dumbMethods.put("java/lang/Thread.yield()V", "MDM_THREAD_YIELD"); + dumbMethods.put("java/lang/Thread.sleep(J)V", new ReportInfo("MDM_THREAD_YIELD", LOW_PRIORITY)); + dumbMethods.put("java/lang/Thread.sleep(JI)V", new ReportInfo("MDM_THREAD_YIELD", LOW_PRIORITY)); + dumbMethods.put("java/lang/Thread.yield()V", new ReportInfo("MDM_THREAD_YIELD", NORMAL_PRIORITY)); - dumbMethods.put("java/lang/Thread.join()V", "MDM_WAIT_WITHOUT_TIMEOUT"); - dumbMethods.put("java/lang/Object.wait()V", "MDM_WAIT_WITHOUT_TIMEOUT"); - dumbMethods.put("java/util/concurrent/locks/Condition.await()V", "MDM_WAIT_WITHOUT_TIMEOUT"); - dumbMethods.put("java/util/concurrent/locks/Lock.lock()V", "MDM_WAIT_WITHOUT_TIMEOUT"); - dumbMethods.put("java/util/concurrent/locks/Lock.lockInterruptibly()V", "MDM_WAIT_WITHOUT_TIMEOUT"); - dumbMethods.put("java/util/concurrent/locks/ReentrantLock.lock()V", "MDM_WAIT_WITHOUT_TIMEOUT"); - dumbMethods.put("java/util/concurrent/locks/ReentrantLock.lockInterruptibly()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + dumbMethods.put("java/lang/Thread.join()V", new ReportInfo("MDM_WAIT_WITHOUT_TIMEOUT", LOW_PRIORITY)); + dumbMethods.put("java/lang/Object.wait()V", new ReportInfo("MDM_WAIT_WITHOUT_TIMEOUT", LOW_PRIORITY)); + dumbMethods.put("java/util/concurrent/locks/Condition.await()V", new ReportInfo("MDM_WAIT_WITHOUT_TIMEOUT", LOW_PRIORITY)); + dumbMethods.put("java/util/concurrent/locks/Lock.lock()V", new ReportInfo("MDM_WAIT_WITHOUT_TIMEOUT", LOW_PRIORITY)); + dumbMethods.put("java/util/concurrent/locks/Lock.lockInterruptibly()V", new ReportInfo("MDM_WAIT_WITHOUT_TIMEOUT", LOW_PRIORITY)); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.lock()V", new ReportInfo("MDM_WAIT_WITHOUT_TIMEOUT", LOW_PRIORITY)); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.lockInterruptibly()V", new ReportInfo("MDM_WAIT_WITHOUT_TIMEOUT", LOW_PRIORITY)); - dumbMethods.put("java/util/concurrent/locks/Condition.signal()V", "MDM_SIGNAL_NOT_SIGNALALL"); + dumbMethods.put("java/util/concurrent/locks/Condition.signal()V", new ReportInfo("MDM_SIGNAL_NOT_SIGNALALL", NORMAL_PRIORITY)); - dumbMethods.put("java/util/concurrent/locks/Lock.tryLock()Z", "MDM_THREAD_FAIRNESS"); - dumbMethods.put("java/util/concurrent/locks/ReentrantLock.tryLock()Z", "MDM_THREAD_FAIRNESS"); + dumbMethods.put("java/util/concurrent/locks/Lock.tryLock()Z", new ReportInfo("MDM_THREAD_FAIRNESS", LOW_PRIORITY)); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.tryLock()Z", new ReportInfo("MDM_THREAD_FAIRNESS", LOW_PRIORITY)); - dumbMethods.put("java/util/concurrent/locks/ReentrantLock.isHeldByCurrentThread()Z", "MDM_LOCK_ISLOCKED"); - dumbMethods.put("java/util/concurrent/locks/ReentrantLock.isLocked()Z", "MDM_LOCK_ISLOCKED"); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.isHeldByCurrentThread()Z", new ReportInfo("MDM_LOCK_ISLOCKED", LOW_PRIORITY)); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.isLocked()Z", new ReportInfo("MDM_LOCK_ISLOCKED", LOW_PRIORITY)); // // String checks // - dumbMethods.put("java/lang/String.<init>([B)V", "MDM_STRING_BYTES_ENCODING"); - dumbMethods.put("java/lang/String.getBytes()[B", "MDM_STRING_BYTES_ENCODING"); - dumbMethods.put("java/util/Locale.setDefault(Ljava/util/Locale;)V", "MDM_SETDEFAULTLOCALE"); + dumbMethods.put("java/lang/String.<init>([B)V", new ReportInfo("MDM_STRING_BYTES_ENCODING", NORMAL_PRIORITY)); + dumbMethods.put("java/lang/String.getBytes()[B", new ReportInfo("MDM_STRING_BYTES_ENCODING", NORMAL_PRIORITY)); + dumbMethods.put("java/util/Locale.setDefault(Ljava/util/Locale;)V", new ReportInfo("MDM_SETDEFAULTLOCALE", NORMAL_PRIORITY)); } private final BugReporter bugReporter; @@ -107,9 +125,9 @@ || seen == INVOKEINTERFACE || seen == INVOKESPECIAL || seen == INVOKESTATIC) { - final String bugType = dumbMethods.get(getMethodSignature()); - if (bugType != null) { - reportBug(bugType); + final ReportInfo info = dumbMethods.get(getMethodSignature()); + if (info != null) { + reportBug(info); } } } @@ -121,8 +139,8 @@ return String.format("%s.%s%s", className, methodName, methodSig); } - private void reportBug(String bugType) { - bugReporter.reportBug(new BugInstance(this, bugType, LOW_PRIORITY) + private void reportBug(ReportInfo info) { + bugReporter.reportBug(new BugInstance(this, info.getPattern(), info.getPriority()) .addClass(this) .addMethod(this) .addCalledMethod(this) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-04 04:26:09
|
Revision: 1430 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1430&view=rev Author: dbrosius Date: 2010-01-04 04:26:03 +0000 (Mon, 04 Jan 2010) Log Message: ----------- oops, fat fingers Modified Paths: -------------- trunk/fb-contrib/htdocs/index.shtml Modified: trunk/fb-contrib/htdocs/index.shtml =================================================================== --- trunk/fb-contrib/htdocs/index.shtml 2010-01-04 04:24:37 UTC (rev 1429) +++ trunk/fb-contrib/htdocs/index.shtml 2010-01-04 04:26:03 UTC (rev 1430) @@ -80,7 +80,7 @@ Looks for fields in serializable classes that are defined as both final and transient. As a transient field is not initialized when streamed, and is not initialized in a constructor, it will remain null because it is defined final.</li> - <li><br>[MDM] More Dumb Methods</b><br/> + <li><b>[MDM] More Dumb Methods</b><br/> Looks for a variety of questionable method calls that will cause problems, are unsafe or use practices that might lead to bugs. <span style="color: #0000FF;">--contributed by Chris Peterson - THANKS!</span></li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-04 04:24:44
|
Revision: 1429 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1429&view=rev Author: dbrosius Date: 2010-01-04 04:24:37 +0000 (Mon, 04 Jan 2010) Log Message: ----------- document the MDM detector submitted by Chris Peterson Modified Paths: -------------- trunk/fb-contrib/htdocs/index.shtml Modified: trunk/fb-contrib/htdocs/index.shtml =================================================================== --- trunk/fb-contrib/htdocs/index.shtml 2010-01-04 04:21:58 UTC (rev 1428) +++ trunk/fb-contrib/htdocs/index.shtml 2010-01-04 04:24:37 UTC (rev 1429) @@ -80,6 +80,10 @@ Looks for fields in serializable classes that are defined as both final and transient. As a transient field is not initialized when streamed, and is not initialized in a constructor, it will remain null because it is defined final.</li> + <li><br>[MDM] More Dumb Methods</b><br/> + Looks for a variety of questionable method calls that will cause problems, are unsafe + or use practices that might lead to bugs. + <span style="color: #0000FF;">--contributed by Chris Peterson - THANKS!</span></li> </ul> </div> <hr/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-04 04:22:04
|
Revision: 1428 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1428&view=rev Author: dbrosius Date: 2010-01-04 04:21:58 +0000 (Mon, 04 Jan 2010) Log Message: ----------- detector configuration for MDM Detector submitted by Chris Peterson Modified Paths: -------------- trunk/fb-contrib/etc/findbugs.xml trunk/fb-contrib/etc/messages.xml Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2010-01-04 04:21:20 UTC (rev 1427) +++ trunk/fb-contrib/etc/findbugs.xml 2010-01-04 04:21:58 UTC (rev 1428) @@ -316,6 +316,10 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.WrongNullGuard" speed="fast" hidden="true" reports="WNG_WRONG_NULL_FIELD_GUARD,WNG_WRONG_NULL_LOCAL_GUARD" /> + <Detector class="com.mebigfatguy.fbcontrib.detect.MoreDumbMethods" + speed="fast" + reports="MDM_RUNTIME_EXIT_OR_HALT,MDM_RUNFINALIZATION,EQ_BIGDECIMAL_EQUALS,MDM_INETADDRESS_GETLOCALHOST,MDM_PROMISCUOUS_SERVERSOCKET,MDM_RANDOM_SEED,MDM_SECURERANDOM_CTOR,MDM_SECURERANDOM_GETSEED,MDM_THREAD_PRIORITIES,MDM_THREAD_YIELD,MDM_WAIT_WITHOUT_TIMEOUT,MDM_THREAD_FAIRNESS,MDM_REENTRANTLOCK_HELDBY,MDM_STRING_BYTES_ENCODING,MDM_SETDEFAULTLOCALE" /> + <!-- BugPattern --> <BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" @@ -568,4 +572,34 @@ category="CORRECTNESS" experimental="true" /> <BugPattern abbrev="WNG" type="WNG_WRONG_NULL_LOCAL_GUARD" category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_RUNTIME_EXIT_OR_HALT" + category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_RUNFINALIZATION" + category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_INETADDRESS_GETLOCALHOST" + category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_PROMISCUOUS_SERVERSOCKET" + category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_THREAD_PRIORITIES" + category="MT_CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_THREAD_YIELD" + category="MT_CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_WAIT_WITHOUT_TIMEOUT" + category="MT_CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_SIGNAL_NOT_SIGNALALL" + category="MT_CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_THREAD_FAIRNESS" + category="MT_CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_LOCK_ISLOCKED" + category="MT_CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_STRING_BYTES_ENCODING" + category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_SETDEFAULTLOCALE" + category="MT_CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_BIGDECIMAL_EQUALS" + category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_RANDOM_SEED" + category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="MDM" type="MDM_SECURERANDOM" + category="CORRECTNESS" experimental="true" /> </FindbugsPlugin> \ No newline at end of file Modified: trunk/fb-contrib/etc/messages.xml =================================================================== --- trunk/fb-contrib/etc/messages.xml 2010-01-04 04:21:20 UTC (rev 1427) +++ trunk/fb-contrib/etc/messages.xml 2010-01-04 04:21:58 UTC (rev 1428) @@ -1091,6 +1091,14 @@ </Details> </Detector> + <Detector class="com.mebigfatguy.fbcontrib.detect.MoreDumbMethods"> + <Details> + <![CDATA[ + <p>This detector looks for calls to more pointless or deprecated methods.</p> + <p>It is a fast detector</p> + ]]> + </Details> + </Detector> <!-- BugPattern --> @@ -2818,7 +2826,157 @@ ]]> </Details> </BugPattern> - + + <BugPattern type="MDM_RUNTIME_EXIT_OR_HALT"> + <ShortDescription>Method calls {2}</ShortDescription> + <LongDescription>Method {1} calls {2}</LongDescription> + <Details> + <![CDATA[ + <p>Calling <code>Runtime.exit()</code> or <code>Runtime.halt()</code> shuts down the entire Java virtual machine. This should only been done when it is appropriate. Such calls make it hard or impossible for your code to be invoked by other code. Consider throwing a RuntimeException instead.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_RUNFINALIZATION"> + <ShortDescription>Method calls {2}</ShortDescription> + <LongDescription>Method {1} calls {2}</LongDescription> + <Details> + <![CDATA[ + <p>Triggering finalization can result in serious performance problems and may indicate incorrect resource cleanup.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_BIGDECIMAL_EQUALS"> + <ShortDescription>Method calls BigDecimal.equals()</ShortDescription> + <LongDescription>Method {1} calls BigDecimal.equals(), which is normally a mistake</LongDescription> + <Details> + <![CDATA[ + <p><code>equals()</code> being called to compare two <code>java.math.BigDecimal</code> numbers. This is normally a mistake, as two <code>BigDecimal</code> objects are only equal if they are equal in both value and scale, so that <i>2.0</i> is not equal to <i>2.00</i>. To compare <code>BigDecimal</code> objects for mathematical equality, use <code>compareTo()</code> instead.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_INETADDRESS_GETLOCALHOST"> + <ShortDescription>Method calls InetAddress.getLocalHost()</ShortDescription> + <LongDescription>Method {1} calls InetAddress.getLocalHost(), which may be a security risk</LongDescription> + <Details> + <![CDATA[ + <p>Do not call <code>InetAddress.getLocalHost()</code> on multihomed servers. On a multihomed server, <code>InetAddress.getLocalHost()</code> simply returns the IP address associated with the server's internal hostname. This could any of the network interfaces, which could expose the machine to security risks. Server applications that need to listen on sockets should add configurable properties to define which network interfaces the server should bind.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_PROMISCUOUS_SERVERSOCKET"> + <ShortDescription>Method creates promiscuous ServerSocket object</ShortDescription> + <LongDescription>Method {1} creates a promiscuous ServerSocket, which may be a security risk</LongDescription> + <Details> + <![CDATA[ + <p>Do not use the <code>ServerSocket</code> constructor or <code>ServerSocketFactory.createServerSocket()</code> factory methods that accepts connections on any network interface. By default, an application that listens on a socket will listen for connection attempts on any network interface, which can be a security risk. Only the long form the <code>ServerSocket</code> constructor or <code>ServerSocketFactory.createServerSocket()</code> factory methods take a specific local address to define which network interface the socket should bind.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_RANDOM_SEED"> + <ShortDescription>Method creates insecure Random object</ShortDescription> + <LongDescription>Method {1} creates an insecure Random object, which may be a security risk</LongDescription> + <Details> + <![CDATA[ + <p><code>Random()</code> constructor without a seed is insecure because it defaults to easily guessable seed: <code>System.currentTimeMillis()</code>. Initialize seed with <code>Random(SecureRandom.getInstance().generateSeed())</code> or use <code>SecureRandom</code> instead.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_SECURERANDOM"> + <ShortDescription>Method calls deprecated SecureRandom method</ShortDescription> + <LongDescription>Method {1} calls deprecated SecureRandom method {2}</LongDescription> + <Details> + <![CDATA[ + <p>The <code>SecureRandom()</code> constructors and <code>SecureRandom.getSeed()</code> method are deprecated. Call <code>SecureRandom.getInstance()</code> and <code>SecureRandom.getInstance().generateSeed()</code> instead.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_THREAD_PRIORITIES"> + <ShortDescription>Method calls non-portable method {2}</ShortDescription> + <LongDescription>Method {1} calls non-portable method {2}</LongDescription> + <Details> + <![CDATA[ + <p>Getting or setting thread priorities is not portable and could indicate race conditions.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_THREAD_YIELD"> + <ShortDescription>Method calls non-portable method {2}</ShortDescription> + <LongDescription>Method {1} calls non-portable method {2}</LongDescription> + <Details> + <![CDATA[ + <p>Manual thread scheduling with <code>Thread.sleep()</code> or <code>Thread.yield()</code> has no guaranteed semantics and is often used to mask race conditions.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_WAIT_WITHOUT_TIMEOUT"> + <ShortDescription>Method sleeps without timeout</ShortDescription> + <LongDescription>Method {1} calls {2} without timeout</LongDescription> + <Details> + <![CDATA[ + <p>Calling <code>{2}</code> without timeout could block forever. Consider using a timeout to detect deadlocks or performance problems. Thread.join() Object.wait() Condition.await() Lock.lock() Lock.lockInterruptibly()</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_THREAD_FAIRNESS"> + <ShortDescription>Method ignores Lock's fairness settings by calling {2}</ShortDescription> + <LongDescription>Method {1} ignores Lock's fairness settings by calling {2}</LongDescription> + <Details> + <![CDATA[ + <p>Calling <code>Lock.tryLock()</code> or <code>ReentrantLock.tryLock()</code> without a timeout does not honor the lock's fairness setting. If you want to honor the fairness setting for this lock, then use <code>tryLock(0, TimeUnit.SECONDS)</code> which is almost equivalent (it also detects interruption).</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_SIGNAL_NOT_SIGNALALL"> + <ShortDescription>Method calls Condition.signal() rather than Condition.signalAll()</ShortDescription> + <LongDescription>Method {1} calls Condition.signal() rather than Condition.signalAll()</LongDescription> + <Details> + <![CDATA[ + <p><code>Condition.signalAll()</code> is prefered over <code>Condition.signal()</code>. Calling <code>signal()</code> only wakes up one thread, meaning that the thread woken up might not be the one waiting for the condition that the caller just satisfied.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_LOCK_ISLOCKED"> + <ShortDescription>Method tests if a lock is locked</ShortDescription> + <LongDescription>Method {1} calls {2} to test if the lock is locked</LongDescription> + <Details> + <![CDATA[ + <p>Calling <code>ReentrantLock.isLocked()</code> or <code>ReentrantLock.isHeldByCurrentThread()</code> might indicate race conditions or incorrect locking. These methods are designed for use in debug code or monitoring of the system state, not for synchronization control.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_STRING_BYTES_ENCODING"> + <ShortDescription>Encoding String bytes without specifying the character encoding</ShortDescription> + <LongDescription>Method {1} encodes String bytes without specifying the character encoding</LongDescription> + <Details> + <![CDATA[ + <p>The behavior of the <code>String(byte[] bytes)</code> and <code>String.getBytes()</code> is undefined if the string cannot be encoded in the platform's default charset. Instead, use the <code>String(byte[] bytes, String encoding)</code> or <code>String.getBytes(String encoding)></code> constructor which accepts the string's encoding as an argument. Be sure to specify the encoding used for the user's locale.</p> + ]]> + </Details> + </BugPattern> + + <BugPattern type="MDM_SETDEFAULTLOCALE"> + <ShortDescription>Method calls Locale.setDefault()</ShortDescription> + <LongDescription>Method {1} calls Locale.setDefault(), changing locale for all threads</LongDescription> + <Details> + <![CDATA[ + <p>Do not use the <code>Locale.setDefault()</code> method to change the default locale. It changes the JVM's default locale for all threads and makes your applications unsafe to threads. It does not affect the host locale. Since changing the JVM's default locale may affect many different areas of functionality, this method should only be used if the caller is prepared to reinitialize locale-sensitive code running within the same Java Virtual Machine, such as the user interface.</p> + ]]> + </Details> + </BugPattern> + <!-- BugCode --> <BugCode abbrev="ISB">Inefficient String Buffering</BugCode> @@ -2910,4 +3068,5 @@ <BugCode abbrev="CVAA">Contravariant Array Assignment</BugCode> <BugCode abbrev="NFF">Non Functional Field</BugCode> <BugCode abbrev="WNG">Wrong Null Guard</BugCode> + <BugCode abbrev="MDM">More Dumb Methods</BugCode> </MessageCollection> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-04 04:21:30
|
Revision: 1427 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1427&view=rev Author: dbrosius Date: 2010-01-04 04:21:20 +0000 (Mon, 04 Jan 2010) Log Message: ----------- New Detector to find a variety of questionable method calls by Chris Peterson Added Paths: ----------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java Added: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java (rev 0) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java 2010-01-04 04:21:20 UTC (rev 1427) @@ -0,0 +1,131 @@ +/* + * fb-contrib - Auxiliary detectors for Java programs + * Copyright (C) 2005-2010 Chris Peterson + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +package com.mebigfatguy.fbcontrib.detect; + +import java.util.HashMap; +import java.util.Map; + +import edu.umd.cs.findbugs.BugInstance; +import edu.umd.cs.findbugs.BugReporter; +import edu.umd.cs.findbugs.BytecodeScanningDetector; + +/** + * looks for method calls that are unsafe or might indicate bugs. + */ +public class MoreDumbMethods extends BytecodeScanningDetector +{ + private final static Map<String,String> dumbMethods = new HashMap<String,String>(); + static { + dumbMethods.put("java/lang/Runtime.exit(I)V", "MDM_RUNTIME_EXIT_OR_HALT"); + dumbMethods.put("java/lang/Runtime.halt(I)V", "MDM_RUNTIME_EXIT_OR_HALT"); + + dumbMethods.put("java/lang/Runtime.runFinalization()V", "MDM_RUNFINALIZATION"); + dumbMethods.put("java/lang/System.runFinalization()V", "MDM_RUNFINALIZATION"); + + dumbMethods.put("java/math/BigDecimal.equals(Ljava/lang/Object;)Z", "MDM_BIGDECIMAL_EQUALS"); + + // + // Network checks + // + dumbMethods.put("java/net/InetAddress.getLocalHost()Ljava/net/InetAddress;", "MDM_INETADDRESS_GETLOCALHOST"); + + dumbMethods.put("java/net/ServerSocket.<init>(I)V", "MDM_PROMISCUOUS_SERVERSOCKET"); + dumbMethods.put("java/net/ServerSocket.<init>(II)V", "MDM_PROMISCUOUS_SERVERSOCKET"); + dumbMethods.put("javax/net/ServerSocketFactory.createServerSocket(I)Ljava/net/ServerSocket;", "MDM_PROMISCUOUS_SERVERSOCKET"); + dumbMethods.put("javax/net/ServerSocketFactory.createServerSocket(II)Ljava/net/ServerSocket;", "MDM_PROMISCUOUS_SERVERSOCKET"); + + // + // Random Number Generator checks + // + dumbMethods.put("java/util/Random.<init>()V", "MDM_RANDOM_SEED"); + dumbMethods.put("java/security/SecureRandom.<init>()V", "MDM_SECURERANDOM"); + dumbMethods.put("java/security/SecureRandom.<init>([B)V", "MDM_SECURERANDOM"); + dumbMethods.put("java/security/SecureRandom.getSeed(I)[B", "MDM_SECURERANDOM"); + + // + // Thread checks + // + dumbMethods.put("java/lang/Thread.getPriority()I", "MDM_THREAD_PRIORITIES"); + dumbMethods.put("java/lang/Thread.setPriority(I)V", "MDM_THREAD_PRIORITIES"); + + dumbMethods.put("java/lang/Thread.sleep(J)V", "MDM_THREAD_YIELD"); + dumbMethods.put("java/lang/Thread.sleep(JI)V", "MDM_THREAD_YIELD"); + dumbMethods.put("java/lang/Thread.yield()V", "MDM_THREAD_YIELD"); + + dumbMethods.put("java/lang/Thread.join()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + dumbMethods.put("java/lang/Object.wait()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + dumbMethods.put("java/util/concurrent/locks/Condition.await()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + dumbMethods.put("java/util/concurrent/locks/Lock.lock()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + dumbMethods.put("java/util/concurrent/locks/Lock.lockInterruptibly()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.lock()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.lockInterruptibly()V", "MDM_WAIT_WITHOUT_TIMEOUT"); + + dumbMethods.put("java/util/concurrent/locks/Condition.signal()V", "MDM_SIGNAL_NOT_SIGNALALL"); + + dumbMethods.put("java/util/concurrent/locks/Lock.tryLock()Z", "MDM_THREAD_FAIRNESS"); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.tryLock()Z", "MDM_THREAD_FAIRNESS"); + + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.isHeldByCurrentThread()Z", "MDM_LOCK_ISLOCKED"); + dumbMethods.put("java/util/concurrent/locks/ReentrantLock.isLocked()Z", "MDM_LOCK_ISLOCKED"); + + // + // String checks + // + dumbMethods.put("java/lang/String.<init>([B)V", "MDM_STRING_BYTES_ENCODING"); + dumbMethods.put("java/lang/String.getBytes()[B", "MDM_STRING_BYTES_ENCODING"); + dumbMethods.put("java/util/Locale.setDefault(Ljava/util/Locale;)V", "MDM_SETDEFAULTLOCALE"); + } + private final BugReporter bugReporter; + + /** + * constructs an MDM detector given the reporter to report bugs on + * @param bugReporter the sync of bug reports + */ + public MoreDumbMethods(BugReporter bugReporter) { + this.bugReporter = bugReporter; + } + + @Override + public void sawOpcode(int seen) { + if (seen == INVOKEVIRTUAL + || seen == INVOKEINTERFACE + || seen == INVOKESPECIAL + || seen == INVOKESTATIC) { + final String bugType = dumbMethods.get(getMethodSignature()); + if (bugType != null) { + reportBug(bugType); + } + } + } + + private String getMethodSignature() { + final String className = getClassConstantOperand(); + final String methodName = getNameConstantOperand(); + final String methodSig = getSigConstantOperand(); + return String.format("%s.%s%s", className, methodName, methodSig); + } + + private void reportBug(String bugType) { + bugReporter.reportBug(new BugInstance(this, bugType, LOW_PRIORITY) + .addClass(this) + .addMethod(this) + .addCalledMethod(this) + .addSourceLine(this)); + } +} \ No newline at end of file Property changes on: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MoreDumbMethods.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-04 04:20:12
|
Revision: 1426 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1426&view=rev Author: dbrosius Date: 2010-01-04 04:20:06 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Sample bug file for MDM detector by Chris Peterson Added Paths: ----------- trunk/fb-contrib/samples/MDM_Sample.java Added: trunk/fb-contrib/samples/MDM_Sample.java =================================================================== --- trunk/fb-contrib/samples/MDM_Sample.java (rev 0) +++ trunk/fb-contrib/samples/MDM_Sample.java 2010-01-04 04:20:06 UTC (rev 1426) @@ -0,0 +1,97 @@ +import java.math.BigDecimal; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.security.SecureRandom; +import java.util.Locale; +import java.util.Random; +import java.util.concurrent.locks.Condition; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +import javax.net.ServerSocketFactory; +import javax.net.ssl.SSLServerSocketFactory; + + +public class MDM_Sample implements Runnable +{ + public MDM_Sample() throws Exception + { + boolean b; + + { // Halt tests + Runtime r = Runtime.getRuntime(); + r.exit(0); // WARNING + r.halt(0); // WARNING + r.runFinalization(); // WARNING + System.runFinalization(); // WARNING + } + + { // equals() tests + BigDecimal bd1 = new BigDecimal(0); + BigDecimal bd2 = new BigDecimal(0); + b = bd1.equals(bd2); // WARNING + } + + { // Socket tests + InetAddress localhost = InetAddress.getLocalHost(); // WARNING + ServerSocket ss = new ServerSocket(0); touch(ss); // WARNING + ss = new ServerSocket(0,0); touch(ss); // WARNING + ServerSocketFactory ssf = SSLServerSocketFactory.getDefault(); + ss = ssf.createServerSocket(0); touch(ss); // WARNING + ss = ssf.createServerSocket(0,0); touch(ss); // WARNING + } + + { // RNG tests + Random r = new Random(); touch(r); // WARNING + byte[] seed = SecureRandom.getSeed(1); // WARNING + r = new SecureRandom(seed); touch(r); // WARNING + } + + { // Thread tests + Thread t = new Thread(this); + int priority = t.getPriority(); // WARNING + t.setPriority(priority); // WARNING + t.join(); // WARNING + + Thread.sleep(0); // WARNING + Thread.sleep(0,0); // WARNING + Thread.yield(); // WARNING + } + + { // Timeout tests + ReentrantLock rl = new ReentrantLock(); + rl.lock(); // WARNING + rl.lockInterruptibly(); // WARNING + b = rl.isHeldByCurrentThread(); // WARNING + b = rl.isLocked(); // WARNING + + Object o = new Object(); + do { + b = rl.tryLock(); // WARNING + o.wait(); // WARNING + } while (b); + + Lock l = rl; + l.lock(); // WARNING + b = l.tryLock(); touch(b); // WARNING + l.lockInterruptibly(); // WARNING + + Condition c = l.newCondition(); + c.signal(); // WARNING + c.await(); // WARNING + } + + { // String tests + byte[] bytes = "".getBytes(); // WARNING + String s = new String(bytes); // WARNING + + Locale.setDefault(Locale.ENGLISH); // WARNING + } + } + + public void run() {} + private static void touch(Object o) {} +} + + + \ No newline at end of file Property changes on: trunk/fb-contrib/samples/MDM_Sample.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-01 00:43:14
|
Revision: 1425 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1425&view=rev Author: dbrosius Date: 2010-01-01 00:42:50 +0000 (Fri, 01 Jan 2010) Log Message: ----------- (c) 2010 Modified Paths: -------------- trunk/fb-contrib/build.xml trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/FBContrib.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CustomBuiltXML.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousSetOfCollections.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ExceptionSoftening.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FinalParameters.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InappropriateToStringUse.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InconsistentKeyNameCasing.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/IncorrectInternalClassUse.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JUnitAssertionOddities.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LiteralStringComparison.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessCustomSerialization.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonCollectionMethodUse.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonFunctionalField.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonSymmetricEquals.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OrphanedDOMNode.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverzealousCasting.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ParallelLists.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleIncompleteSerialization.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleMemoryBloat.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SQLInLoop.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpuriousThreadStates.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticArrayCreatedInMethod.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticMethodInstanceInvocation.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StutteredMethodArguments.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousCloneAlgorithm.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousClusteredSessionSupport.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousUninitializedArray.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousWaitOnConcurrentObject.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SyncCollectionIterators.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/TailRecursion.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/TristateBooleanPattern.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnnecessaryNewNullCheck.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnnecessaryStoreBeforeReturn.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseCharacterParameterizedMethod.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseEnumCollections.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseSplit.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WrongNullGuard.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/AttributesUtils.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/CodeByteUtils.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/MapEntry.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/RegisterUtils.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/SignatureUtils.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java Modified: trunk/fb-contrib/build.xml =================================================================== --- trunk/fb-contrib/build.xml 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/build.xml 2010-01-01 00:42:50 UTC (rev 1425) @@ -152,7 +152,7 @@ destdir="${javadoc.dir}" windowtitle="fb-contrib api"> <doctitle><![CDATA[<h1>fb-contrib javadoc</h1>]]></doctitle> - <bottom><![CDATA[<i>Copyright © 2005-2009 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> + <bottom><![CDATA[<i>Copyright © 2005-2010 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> </javadoc> </target> Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/FBContrib.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/FBContrib.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/FBContrib.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractClassEmptyMethods.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbstractOverriddenMethod.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayBasedCollections.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingAutoboxedOverloading.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConstantListIndex.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2009 Bhaskar Maddala + * Copyright (C) 2010 Bhaskar Maddala * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CustomBuiltXML.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CustomBuiltXML.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CustomBuiltXML.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DateComparison.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeclaredRuntimeException.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeprecatedTypesafeEnumPattern.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousSetOfCollections.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousSetOfCollections.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousSetOfCollections.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ExceptionSoftening.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ExceptionSoftening.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ExceptionSoftening.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FinalParameters.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FinalParameters.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FinalParameters.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InappropriateToStringUse.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InappropriateToStringUse.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InappropriateToStringUse.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InconsistentKeyNameCasing.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InconsistentKeyNameCasing.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InconsistentKeyNameCasing.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/IncorrectInternalClassUse.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/IncorrectInternalClassUse.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/IncorrectInternalClassUse.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InheritanceTypeChecking.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JUnitAssertionOddities.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JUnitAssertionOddities.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JUnitAssertionOddities.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LiteralStringComparison.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LiteralStringComparison.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LiteralStringComparison.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LocalSynchronizedCollection.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessAutoboxing.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessCustomSerialization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessCustomSerialization.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessCustomSerialization.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessInstanceRetrieval.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonCollectionMethodUse.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonCollectionMethodUse.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonCollectionMethodUse.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonFunctionalField.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonFunctionalField.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonFunctionalField.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonRecycleableTaglibs.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonSymmetricEquals.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonSymmetricEquals.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonSymmetricEquals.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OrphanedDOMNode.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OrphanedDOMNode.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OrphanedDOMNode.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverzealousCasting.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverzealousCasting.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverzealousCasting.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ParallelLists.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ParallelLists.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ParallelLists.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleIncompleteSerialization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleIncompleteSerialization.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleIncompleteSerialization.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleMemoryBloat.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleMemoryBloat.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleMemoryBloat.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SQLInLoop.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SQLInLoop.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SQLInLoop.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpuriousThreadStates.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpuriousThreadStates.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpuriousThreadStates.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticArrayCreatedInMethod.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticArrayCreatedInMethod.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticArrayCreatedInMethod.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticMethodInstanceInvocation.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticMethodInstanceInvocation.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StaticMethodInstanceInvocation.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StutteredMethodArguments.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StutteredMethodArguments.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/StutteredMethodArguments.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousCloneAlgorithm.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousCloneAlgorithm.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousCloneAlgorithm.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousClusteredSessionSupport.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousClusteredSessionSupport.java 2009-12-31 23:18:26 UTC (rev 1424) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousClusteredSessionSupport.java 2010-01-01 00:42:50 UTC (rev 1425) @@ -1,6 +1,6 @@ /* * fb-contrib - Auxiliary detectors for Java programs - * Copyright (C) 2005-2009 Dave Brosius + * Copyright (C) 2005-2010 Dave Brosius * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontr... [truncated message content] |
From: <dbr...@us...> - 2009-12-31 23:18:34
|
Revision: 1424 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1424&view=rev Author: dbrosius Date: 2009-12-31 23:18:26 +0000 (Thu, 31 Dec 2009) Log Message: ----------- warnings Modified Paths: -------------- trunk/fb-contrib/samples/NFF_Sample.java Modified: trunk/fb-contrib/samples/NFF_Sample.java =================================================================== --- trunk/fb-contrib/samples/NFF_Sample.java 2009-12-31 23:17:19 UTC (rev 1423) +++ trunk/fb-contrib/samples/NFF_Sample.java 2009-12-31 23:18:26 UTC (rev 1424) @@ -4,5 +4,8 @@ public class NFF_Sample implements Serializable { + private static final long serialVersionUID = 1L; + + @SuppressWarnings("unused") private final transient List<String> s = new ArrayList<String>(); } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-12-31 23:17:25
|
Revision: 1423 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1423&view=rev Author: dbrosius Date: 2009-12-31 23:17:19 +0000 (Thu, 31 Dec 2009) Log Message: ----------- Modified Paths: -------------- trunk/fb-contrib/samples/CVAA_Sample.java Modified: trunk/fb-contrib/samples/CVAA_Sample.java =================================================================== --- trunk/fb-contrib/samples/CVAA_Sample.java 2009-12-31 23:15:22 UTC (rev 1422) +++ trunk/fb-contrib/samples/CVAA_Sample.java 2009-12-31 23:17:19 UTC (rev 1423) @@ -20,7 +20,7 @@ Integer[] a = new Integer[1]; System.arraycopy(a[0], 0, a, 1, 1); } - + private Derived doDerived(){ return new Derived(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-12-31 23:15:32
|
Revision: 1422 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1422&view=rev Author: dbrosius Date: 2009-12-31 23:15:22 +0000 (Thu, 31 Dec 2009) Log Message: ----------- warnings Modified Paths: -------------- trunk/fb-contrib/samples/CFS_Sample.java Modified: trunk/fb-contrib/samples/CFS_Sample.java =================================================================== --- trunk/fb-contrib/samples/CFS_Sample.java 2009-12-31 23:13:12 UTC (rev 1421) +++ trunk/fb-contrib/samples/CFS_Sample.java 2009-12-31 23:15:22 UTC (rev 1422) @@ -2,12 +2,14 @@ public class CFS_Sample { + @SuppressWarnings("deprecation") public Date getNextDate(Date d) { d.setHours(0); return d; } + @SuppressWarnings("deprecation") public Date getNextDateFP(Date d) { d = (Date)d.clone(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-12-31 23:13:20
|
Revision: 1421 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1421&view=rev Author: dbrosius Date: 2009-12-31 23:13:12 +0000 (Thu, 31 Dec 2009) Log Message: ----------- suppress warnings Modified Paths: -------------- trunk/fb-contrib/samples/UNNC_Sample.java Modified: trunk/fb-contrib/samples/UNNC_Sample.java =================================================================== --- trunk/fb-contrib/samples/UNNC_Sample.java 2009-12-31 22:58:30 UTC (rev 1420) +++ trunk/fb-contrib/samples/UNNC_Sample.java 2009-12-31 23:13:12 UTC (rev 1421) @@ -5,6 +5,8 @@ public class UNNC_Sample { + + @SuppressWarnings("null") public void testPosNEW() { UNNC_Sample sample = new UNNC_Sample(); @@ -14,6 +16,7 @@ } } + @SuppressWarnings("null") public void testNegNEW() { UNNC_Sample sample = new UNNC_Sample(); @@ -25,6 +28,7 @@ System.out.println("OK"); } + @SuppressWarnings("null") public void testPosANEWARAY() { String[] s = new String[10]; @@ -33,6 +37,7 @@ } } + @SuppressWarnings("null") public void testNegANEWARRAY() { String[] s = new String[10]; @@ -43,6 +48,7 @@ System.out.println("OK"); } + @SuppressWarnings("null") public void testPosMULTIANEWARRAY() { String[][] s = new String[10][5]; @@ -51,6 +57,7 @@ } } + @SuppressWarnings("null") public void testNegMULTIANEWARRAY() { String[][] s = new String[10][5]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-12-31 22:58:41
|
Revision: 1420 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1420&view=rev Author: dbrosius Date: 2009-12-31 22:58:30 +0000 (Thu, 31 Dec 2009) Log Message: ----------- CVAA shouldn't fire if the array basic types are the same in checkSignatures Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java 2009-12-28 06:24:35 UTC (rev 1419) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ContraVariantArrayAssignment.java 2009-12-31 22:58:30 UTC (rev 1420) @@ -119,7 +119,7 @@ if(Type.getType(sourceSignature) instanceof ObjectType ) { ObjectType sourceType = (ObjectType) Type.getType(sourceSignature); ObjectType targetType = (ObjectType) ((ArrayType) Type.getType(targetSignature)).getBasicType(); - if(!sourceType.subclassOf(targetType)){ + if(!sourceType.equals(targetType) && !sourceType.subclassOf(targetType)){ bugReporter.reportBug(new BugInstance(this, "CVAA_CONTRAVARIANT_ARRAY_ASSIGNMENT", HIGH_PRIORITY) .addClass(this) .addMethod(this) @@ -159,7 +159,7 @@ if(isObjectType(sourceSignature) && isObjectType(targetSignature)){ ObjectType sourceType = (ObjectType) ((ArrayType) Type.getType(sourceSignature)).getBasicType(); ObjectType targetType = (ObjectType) ((ArrayType) Type.getType(targetSignature)).getBasicType(); - if(!targetType.subclassOf(sourceType)) { + if(!targetType.equals(sourceType) && !targetType.subclassOf(sourceType)) { bugReporter.reportBug(new BugInstance(this, "CVAA_CONTRAVARIANT_ARRAY_ASSIGNMENT", NORMAL_PRIORITY) .addClass(this) .addMethod(this) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-12-28 06:24:44
|
Revision: 1419 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1419&view=rev Author: dbrosius Date: 2009-12-28 06:24:35 +0000 (Mon, 28 Dec 2009) Log Message: ----------- add css, js and ssi Modified Paths: -------------- trunk/fb-contrib/htdocs/index.shtml Modified: trunk/fb-contrib/htdocs/index.shtml =================================================================== --- trunk/fb-contrib/htdocs/index.shtml 2009-12-28 06:22:20 UTC (rev 1418) +++ trunk/fb-contrib/htdocs/index.shtml 2009-12-28 06:24:35 UTC (rev 1419) @@ -2,6 +2,9 @@ <head> <meta name="keywords" content="findbugs,plugin,detector,bug,static,jar"/> <title>fb-contrib™: A FindBugs™ auxiliary detector plugin</title> +<script src="mbfg.js"> +</script> +<link rel="stylesheet" type="text/css" href="mbfg.css" /> <script language="javascript"> var flip1 = new Image; @@ -46,7 +49,7 @@ <a href="javadoc/index.html">JavaDoc</a> <img src="vbar.gif" height="12"/> <a href="bugdescriptions.html">Bug Descriptions</a> - + <!--#include virtual="mbfg_menu.shtml" --> <hr/> <img id="svn_image" src="flip2.gif" onClick="toggleBlock('svn', 'svn_image');" align="top"/> Detectors added in svn<br/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-12-28 06:22:29
|
Revision: 1418 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1418&view=rev Author: dbrosius Date: 2009-12-28 06:22:20 +0000 (Mon, 28 Dec 2009) Log Message: ----------- rename index.html to shtml for ssi Added Paths: ----------- trunk/fb-contrib/htdocs/index.shtml Removed Paths: ------------- trunk/fb-contrib/htdocs/index.html Deleted: trunk/fb-contrib/htdocs/index.html =================================================================== --- trunk/fb-contrib/htdocs/index.html 2009-12-28 06:19:50 UTC (rev 1417) +++ trunk/fb-contrib/htdocs/index.html 2009-12-28 06:22:20 UTC (rev 1418) @@ -1,533 +0,0 @@ -<html> -<head> -<meta name="keywords" content="findbugs,plugin,detector,bug,static,jar"/> -<title>fb-contrib™: A FindBugs™ auxiliary detector plugin</title> -<script language="javascript"> - -var flip1 = new Image; -flip1.src = "flip1.gif"; -var flip2 = new Image; -flip2.src = "flip2.gif"; - -function toggleBlock(divId, imgId) -{ - var el = document.getElementById(divId); - if (el.style.display=="block") - { - el.style.display="none"; - el = document.getElementById(imgId); - el.src=flip1.src; - } - else - { - el.style.display="block"; - el = document.getElementById(imgId); - el.src=flip2.src; - } -} - -</script> -</head> -<body background> - <div style="position:absolute;top:0;left:0;width:256;height:65535;z-index:1;background-image:url(blend.jpg);"> - </div> - - <div style="position:absolute;top:20;left:20;z-index:2;"> - <h1>fb-contrib™: A FindBugs™ auxiliary detector plugin</h1> - - <p>fb-contrib™ is an extra detector plugin to be used with the static bug - finder FindBugs™ (findbugs.sourceforge.net). Just download the fb-contrib.jar - file, and place it in your FindBugs™' plugin directory. FindBugs™ will - automatically pick up the jar file, and incorporate these detectors with its - own. - </p> - <a href="http://www.sourceforge.net/projects/fb-contrib">Project Page</a> - <img src="vbar.gif" height="12"/> - <a href="javadoc/index.html">JavaDoc</a> - <img src="vbar.gif" height="12"/> - <a href="bugdescriptions.html">Bug Descriptions</a> - - <hr/> - <img id="svn_image" src="flip2.gif" onClick="toggleBlock('svn', 'svn_image');" align="top"/> - Detectors added in svn<br/> - <div id="svn" style="display:block;"> - <ul> - <li><b>[PDP] Poorly Defined Parameter</b><br/> - Looks for non derivable methods that declare parameters and then cast those - parameters to more specific types in the method. This is misleading and dangerous - as you are not documenting through parameter types what is necessary for these - parameters to function correctly.</li> - <li><b>[OC] Overzealous Casting</b><br/> - Looks for manual casts of objects that are more specific then needed as the value is assigned - to a class or interface higher up in the inheritance chain. You only need to cast to that class - or interface.</li> - <li><b>[IKNC] Inconsistent Key Name Casing</b><br/> - Looks for calls to HttpRequest.getParameter with parameters of the same - name with different cases like 'id' and 'Id'.</li> - <li><b>[NSE] Non Symmetric Equals</b><br/> - Looks for classes that break the fundamental rule of equivalence, which is - symmetry. If a equals b, then b equals a. While it is usually wrong to allow - equals to compare different types, at the very least you should make sure that - each class knows about each other and is able to compare themselves with each other.</li> - <li><b>[CVAA] ContraVariant Array Assignment</b><br/> - Looks for contravariant array assignments. Since arrays are mutable data structures, their use - must be restricted to covariant or invariant usage. - <span style="color: #0000FF;">--contributed by Bhaskar Maddala - THANKS!</span></li> - <li><b>[NFF] Non Functional Field</b><br/> - Looks for fields in serializable classes that are defined as both final and - transient. As a transient field is not initialized when streamed, and is not - initialized in a constructor, it will remain null because it is defined final.</li> - </ul> - </div> - <hr/> - <img id="v4_0_0_image" src="flip1.gif" onClick="toggleBlock('v4_0_0', 'v4_0_0_image');" align="top"/> - Detectors added in v4.0.0<br/> - <div id="v4_0_0" style="display:none;"> - <ul> - <li><b>[TBP] Tristate Boolean Pattern</b><br/> - Looks for methods that are defined to return Boolean, but return null. This thus - allows three return values, Boolean.FALSE, Boolean.TRUE and null. If three values are - intended, it would be more clear to just create an enumeration with three values - and return that type.</li> - <li><b>[SUA] Suspicious Uninitialized Array</b><br/> - Looks for creation of arrays, that are not populated before being returned - for a method. While it is possible that the method that called this method - will do the work of populated the array, it seems odd that this would be the case.</li> - <li><b>[ITU] Inappropriate ToString Use</b><br/> - Looks for methods that rely on the format of the string fetched from another object's toString - method, when that method appears not to be owned by the author of the calling method. - As the implementation of toString() is often considered a private implementation detail of a class, - and not something that should be relied on, depending on it's format is dangerous.</li> - <li><b>[BED] Bogus Exception Declaration</b><br/> - Looks for constructors, private methods or static methods that declare that they - throw specific checked exceptions, but that do not. This just causes callers of - these methods to do extra work to handle an exception that will never be thrown.</li> - <li><b>[DTEP] Deprecated Typesafe Enum Pattern</b><br/> - Looks for classes that appear to implement the old style type safe enum pattern - that was used before java added Enum support to the language. Since this class is - compiled with java 1.5 or later, it would be simpler to just use java enums.</li> - <li><b>[UNNC] Unnecessary New Null Check</b><br/> - Looks for construction of new objects, and then the immediate testing - whether the object is null or not. As the new operator will always succeed, - or through an exception, this test is unnecessary and represents a misunderstanding - as to how the jvm works.</li> - </ul> - </div> - <hr/> - <img id="v3_8_0_image" src="flip1.gif" onClick="toggleBlock('v3_8_0', 'v3_8_0_image');" align="top"/> - Detectors added in v3.8.0<br/> - <div id="v3_8_0" style="display:none;"> - <ul> - <li><b>[DSOC] Dubious Set of Collections</b><br/> - Looks for sets or keySets of maps that contain other collections. As typically collections calculate - their hashCode, equals and compareTo methods by iterating the collection and evaluating the same function - on each item in the collection, this can be costly from a performance point of view. - In addition, using a set, or keySet of a map, infers that you will be looking for items based on - the value of a collection, which seems dubious at best. - Finally, as collections are often modified, This may cause problems if the collection is modified, - thus changing hashCodes, etc, while the collection is in the set. - If you wish to keep a collection of collections, the outer collection should probably be a list - to avoid these problems</li> - <li><b>[IICU] Incorrect Internal Class Use</b><br/> - Looks for classes that use objects from internal sun, xerces or xalan packages. As these are internal - to the respective products and subject to change or removal, these should not be used.</li> - <li><b>[LO] Logger Oddities</b><br/> - Looks for uses of log4j or slf4j where the class specified when creating the logger - is not the same as the class in which this logger is used.</li> - <li><b>[SCSS] Suspicious Clustered Session Support</b><br/> - Looks for methods that access objects in http sessions, that are complex objects, - modifies those objects, but does not call setAttribute to signify a change so that - cluster replication can happens correctly.</li> - </ul> - </div> - <hr/> - <img id="v3_6_0_image" src="flip1.gif" onClick="toggleBlock('v3_6_0', 'v3_6_0_image');" align="top"/> - Detectors added in v3.6.0<br/> - <div id="v3_6_0" style="display:none;"> - <ul> - <li><b>[CFS] Confusing Function Semantics</b><br/> - Looks for methods that return a parameter after making what looks like - modifications to that parameter. This leads to confusion for the user of this - method as it isn't obvious that the 'original' object is modified. If the - point of this method is to modify the parameter, it is probably better just - to have the method be a void method, to avoid confusion.</li> - <li><b>[SCA] Suspicious Clone Algorithm</b><br/> - Looks for implementation of clone where an assignment is made to a field of the - source object. It is likely that that store should have occurred on the cloned object, as - the clone operation is almost always considered read only.</li> - <li><b>[JAO] JUnit Assertion Oddities</b><br/> - Looks for junit test case methods that use assertions with odd parameters. Things such as, - passing a constant as the second (actual) parameter, not using the three parameter version of - asserts for doubles, or passing true or false as the first parameter instead of using assertTrue, - or assertFalse.</li> - <li><b>[WEM] Weak Exception Messaging</b><br/> - Looks for exceptions that are thrown with static strings as messages. Using static strings - doesn't differentiate one use of this method versus another, and so it may be difficult - to determine how this exception occurred without showing context.</li> - </ul> - </div> - <hr/> - <img id="v3_4_0_image" src="flip1.gif" onClick="toggleBlock('v3_4_0', 'v3_4_0_image');" align="top"/> - Detectors added in v3.4.0<br/> - <div id="v3_4_0" style="display:none;"> - <ul> - <li><b>[SJVU] Suspicious JDK Version Use</b><br/> - Looks for calls to classes and methods that do not exist in the JDK for which this class is - compiled. This can happen if you specify the -source and -target options of the javac compiler, and - specify a target that is less than the jdk version of the javac compiler.</li> - <li><b>[UAA] Use Add All</b><br/> - 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.</li> - <li><b>[MRC] Method returns Constant</b><br/> - Looks for private methods that can only return one constant value. - Either the class should not return a value, or perhaps a branch was missed.</li> - <li><b>[NCS] Needless Custom Serialization</b><br/> - Looks for classes that implement Serializable and implements readObject and writeObject - by just calling the readDefaultObject or writeDefaultObject of the stream parameter. - As this is the standard behavior, implementing these methods is not needed.</li> - <li><b>[EXS] Exception Softening</b><br/> - looks for methods that catch checked exceptions, and throw unchecked exceptions in their - place. There are several levels of concern. Least important are methods constrained by - interface or super class contracts not to throw checked exceptions but appear owned by - the same author. Next are methods constrained by interface or super class contracts and - throw other types of checked exceptions. Lastly are method not constrained by any interface - or superclass contract.</b><br/> - </ul> - </div> - <hr/> - <img id="v3_2_0_image" src="flip1.gif" onClick="toggleBlock('v3_2_0', 'v3_2_0_image');" align="top"/> - Detectors added in v3.2.0<br/> - <div id="v3_2_0" style="display:none;"> - <ul> - <li><b>[SCRV] Suspicious Comparator Return Values</b><br/> - Looks for classes that implement Comparator or Comparable, and whose compare or compareTo - methods return constant values only, but that don't represent the three possible choices - (a negative number, 0, and a positive number).</li> - <li><b>[SPP] Sillyness Pot Pourri</b><br/> - Looks for various small problems that don't fall into any particular category.</li> - <li><b>[SCII] Spoiled Child Interface Implementor</b><br/> - Looks for classes that implement interfaces by relying on methods being - implemented in superclasses, even though the superclass knows nothing about - the interface being implemented by the child.</li> - <li><b>[DWI] Deleting While Iterating</b><br/> - Looks for deletion of items from a collection using the remove method - of the collection at the same time that the collection is being iterated on. If - this occurs the iterator will become invalid and throw a ConcurrentModificationException. - Instead, the remove should be called on the iterator itself.</li> - <li><b>[USS] Use String Split</b><br/> - Looks for code that builds an array by using a StringTokenizer to break up - a string and place individual elements into an array. It is simpler to use - String.split instead.</li> - </ul> - </div> - <hr/> - <img id="v3_0_0_image" src="flip1.gif" onClick="toggleBlock('v3_0_0', 'v3_0_0_image');" align="top"/> - Detectors added in v3.0.0<br/> - <div id="v3_0_0" style="display:none;"> - <ul> - <li><b>[LEST] Lost Exception Stack Trace</b><br/> - Looks for methods that catch exceptions, and rethrow another exception without encapsulating - the original exception within it. Doing this loses the stack history, and where the original - problem occurred. This makes finding and fixing errors difficult.</li> - <li><b>[UCPM] Use Character Parameterized Method</b><br/> - Looks for methods that pass single character string constants as parameters to - methods that alternatively have an overridden method that accepts a character instead. - It is easier for the method to handle a single character than a String.</li> - <li><b>[TR] Tail Recursion</b><br/> - Looks for methods that make a recursive call to itself as the last statement in - the method. This tail recursion could be converted into a simple loop which would - improve the performance and stack requirements.</li> - <li><b>[URV] Unrelated Return Values</b><br/> - Looks for methods that return Object, and who's code body returns two or more - different types of objects that are unrelated (other than by Object).</li> - <li><b>[PIS] Possible Incomplete Synchronization</b><br/> - Looks for classes that don't handle serialization of parent class member fields - when the class in question is serializable but is derived from non serializable - classes.</b><br/> - </ul> - </div> - <hr/> - <img id="v2_8_0_image" src="flip1.gif" onClick="toggleBlock('v2_8_0', 'v2_8_0_image');" align="top"/> - Detectors added in v2.8.0<br/> - <div id="v2_8_0" style="display:none;"> - <ul> - <li><b>[NMCS] Needless Member Collection Synchronization</b><br/> - Looks for private collection members, either static or instance, that are only initialized in - the clinit or init, but are synchronized. This is not necessary as the constructor or static - initializer are guaranteed to be thread safe.</li> - <li><b>[ITC] Inheritance Type Checking</b><br/> - Looks for if/else blocks where a series of them use instanceof on the same - variable to determine what to do. If these classes are related by inheritance, - this often is better handled through calling a single overridden method.</li> - <li><b>[PRMC] Possibly Redundant Method Calls</b><br/> - Looks for calls of the same method on the same object when that object hasn't changed. - This often is redundant, and the second call can be removed, or combined.</li> - <li><b>[UTA] Use toArray</b><br/> - Looks for code that builds an array of values from a collection, by manually looping - over the elements of the collection, and adding them to the array. It is simpler and - cleaner to use mycollection.toArray(new type[mycollection.size()].</li> - </ul> - </div> - <hr/> - <img id="v2_6_0_image" src="flip1.gif" onClick="toggleBlock('v2_6_0', 'v2_6_0_image');" align="top"/> - Detectors added in v2.6.0<br/> - <div id="v2_6_0" style="display:none;"> - <ul> - <li><b>[FCBL] Field could be Local</b><br/> - Looks for classes that declare fields that are used in a locals-only fashion, specifically private fields - that are accessed first in each method with a store vs. a load. These fields can be declared as one or more - locals.</li> - <li><b>[NOS] Non Owned Synchronization</b><br/> - looks for methods that synchronize on variables that are not owned by the - current class. Doing this causes confusion when two classes use the same variable - for their own synchronization purposes. For cleanest separation of interests, only - synchronize on private fields of the class. Note that 'this' is not owned by - the current class and synchronization on 'this' should be avoided as well.</li> - <li><b>[S508C] Section 508 Compliance</b><br/> - looks for classes and methods that do not support coding styles that allow Accessibility - software to make full use of the gui for people with visual impediments. Commonly known as - 'Section 508 Compliance' this detector finds a varied list of issues that hamper screen readers, - and make color/size adjustments difficult.</li> - <li><b>[UEC] Use Enum Collections</b><br/> - looks for uses of sets or maps where the key is an enum. In these cases, it is - more efficient to use EnumSet or EnumMap. It is a jdk1.5 only detector.</li> - </ul> - </div> - <hr/> - <img id="v2_4_0_image" src="flip1.gif" onClick="toggleBlock('v2_4_0', 'v2_4_0_image');" align="top"/> - Detectors added in v2.4.0<br/> - <div id="v2_4_0" style="display:none;"> - <ul> - <li><b>[DDC] Double Date Compare</b><br/> - Looks for methods that compare two dates using .equals and after or before. - This combination of two comparisons can be accomplished with just one comparison.</li> - <li><b>[JVR] JDBC Vendor Reliance</b><br/> - Looks for uses of jdbc vendor specific classes and methods making the database access code - non portable.</li> - <li><b>[PMB] Possible Memory Bloat</b><br/> - Looks for classes that maintain collections or StringBuffer/StringBuilders in static member - variables, and that do not appear to provide a way to clear or remove items from these members. - Such class fields are likely causes of memory bloat.</li> - <li><b>[LSYC] Local Synchronized Collection</b><br/> - looks for allocations of synchronized collections that are stored in local variables, and - never stored in fields or returned from methods. As local variables are by definition - thread safe, using synchronized collections in this context makes no sense.</li> - </ul> - </div> - - <hr/> - <img id="v2_2_0_image" src="flip1.gif" onClick="toggleBlock('v2_2_0', 'v2_2_0_image');" align="top"/> - Detectors added in v2.2.0<br/> - <div id="v2_2_0" style="display:none;"> - <ul> - <li><b>[CLI] Constant List Index</b><br/> - Looks for methods that access an array or list using a constant integer index. Often, - this is a typo where a loop variable is intended to be used. If however, specific - list indices mean different specific things, then perhaps replacing the list with - a first-class object with meaningful accessors would make the code less brittle.</li> - <li><b>[SCR] Sloppy Class Reflection</b><br/> - Looks for methods that use Class.forName("XXX") to load a class object - for a class that is already referenced by this class. It is simpler to just use - XXX.class, and doing so protects the integrity of this code from such transformations - as obfuscation. Use of Class.forName should only be used when the class in question - isn't already statically bound to this context.</li> - <li><b>[AWCBR] Array Wrapped Call By Reference</b><br/> - Looks for methods that use an array of length one to pass a variable to achieve call - by pointer ala C++. It is better to define a proper return class type that holds all - the relevant information retrieved from the called method.</li> - <li><b>[SG] Sluggish Gui</b><br/> - Looks for methods that implement awt or swing listeners and perform time - consuming operations. Doing these operations in the gui thread will cause the - interface to appear sluggish and non-responsive to the user. It is better to - use a separate thread to do the time consuming work so that the user - has a better experience.</li> - <li><b>[NIR] Needless Instance Retrieval</b><br/> - Looks for methods that call a method to retrieve a reference to an object - only to then load a static field of that object's class. It is simpler and more - performant to just directly load the field from the class itself.</li> - </ul> - </div> - - <hr/> - <img id="v2_0_0_image" src="flip1.gif" onClick="toggleBlock('v2_0_0', 'v2_0_0_image');" align="top"/> - Detectors added in v2.0.0<br/> - <div id="v2_0_0" style="display:none;"> - <ul> - <li><b>[ABC] Array Based Collections</b><br/> - Looks for methods that use arrays for items in the keyset of a map, or as - an element of a set, or in a list when using the contains method. Since arrays - do not, and cannot define an equals method, reference equality is used for these - collections, which is probably not desired. If it is, consider using the IdentityHashMap - class when using Maps in this case, to better document your intentions.</li> - <li><b>[ODN] Orphaned DOM Nodes</b><br/> - Looks for methods that create DOM nodes but do not append them to any Document.</li> - <li><b>[A0M] Abstract Overridden Method</b><br/> - Looks for abstract methods that override a concrete method in a super class. - Doing this casts away the implementation of the super class, and breaks - the implied contract as set forth by the parent class.</li> - <li><b>[CBX] Custom Built XML</b><br/> - Looks for methods that build xml based strings by concatenation strings - and custom values together. Doing so makes brittle code, that is difficult to - modify, validate and understand. It is cleaner to create external xml files that are - transformed at runtime, using parameters set through Transformer.setParameter.</li> - </ul> - </div> - - <hr/> - <img id="v1_8_0_image" src="flip1.gif" onClick="toggleBlock('v1_8_0', 'v1_8_0_image');" align="top"/> - Detectors added in v1.8.0<br/> - <div id="v1_8_0" style="display:none;"> - <ul> - <li><b>[STS] Spurious Thread States</b><br/> - Finds methods that call wait, notify or notifyAll on an instance of a - java.lang.Thread. Since the internal workings of the thread is to synchronize on the - thread itself, introducing client calls will confuse the thread state of the object - in question, and will cause spurious thread state changes, either waking threads up - when not intended, or removing the thread from the runnable state.</li> - <li><b>[NAB] Needless Autoboxing</b><br/> - Finds methods that pass an instance of a primitive wrapper class, to a constructor - of the same class. Since wrapper classes are immutable, you can just use the original - instance, instead of creating a new one. This bug is a misuse of autoboxing.</li> - <li><b>[USBR] UnnecessaryStoreBeforeReturn</b><br/> - Finds methods that store the return result in a local variable, and - then immediately returns that local variable.</li> - <li><b>[COM] CopiedOverriddenMethod</b><br/> - Finds methods that are implemented with an exact copy of their super class method's - implementation. In most cases, this means that this method can just be removed.</li> - </ul> - </div> - - <hr/> - <img id="v1_6_0_image" src="flip1.gif" onClick="toggleBlock('v1_6_0', 'v1_6_0_image');" align="top"/> - Detectors added in v1.6.0<br/> - <div id="v1_6_0" style="display:none;"> - <ul> - <li><b>[SMII] Static Method Instance Invocation</b><br/> - Finds methods that make static method calls using an instance reference. - For documentation purposes, it is better to call the method using the class name. - This may represent a change in definition that should be noticed.</li> - <li><b>[AFBR] Abnormal Finally Block Return</b><br/> - Finds methods that return or throw an exception from a finally block. Since a finally block is - executed after any return or throw statements that are present in the try or catch block, these exit - values are swallowed by the finally block's actions.</li> - <li><b>[NCMU] Non Collections Method Use</b><br/> - Finds calls to collections objects using methods that are not defined in the Collections interfaces, - but that have equivalent methods defined in such. By using the new methods, it allows for the - replacement of concrete classes with interfaces, and simplifies changing collection types if - desired.</li> - <li><b>[CAO] Confusing Autoboxed Overloading</b><br/> - Finds classes that define overloaded methods where the only difference is a parameter being - of type java.lang.Character, and int, long, float or double. Due to autoboxing, one might conclude - that a parameter of 'a' would autobox to Character, but would instead be cast to a double.</li> - </ul> - </div> - - <hr/> - <img id="v1_4_0_image" src="flip1.gif" onClick="toggleBlock('v1_4_0', 'v1_4_0_image');" align="top"/> - Detectors added in v1.4.0<br/> - <div id="v1_4_0" style="display:none;"> - <ul> - <li><b>[FP] Final Parameters</b><br/> - Finds parameters that could be marked as final, but aren't. Doing so helps document the method, keeps - unwanted changes to creep in, and may help the jvm jit compiler to optimize better.</li> - <li><b>[ACEM] Abstract Class Empty Methods</b><br/> - Finds empty methods, or methods that just throw an exception in abstract classes. In these cases, it - probably is more correct to just define the method to be abstract as well, so that proper subclass - implementation is enforced.</li> - <li><b>[MAC] Manual Array Copy</b><br/> - Finds methods that copy elements from one array to another manually using a loop. It is better - performing to use System.arraycopy, as this method is native.</li> - <li><b>[FPL] Floating Point Loops</b><br/> - Finds methods that use floating point variables as the index to loops. Since floating point math is inprecise, - errors will accumulate each time through the loop, making the logic suspect. It is better to use an - integer index, and calculate the desired floating point value from this integer.</li> - </ul> - </div> - - <hr/> - <img id="v1_2_0_image" src="flip1.gif" onClick="toggleBlock('v1_2_0', 'v1_2_0_image');" align="top"/> - Detectors added in v1.2.0<br/> - <div id="v1_2_0" style="display:none;"> - <ul> - <li><b>[PL] Parallel Lists</b><br/> - Finds classes that maintain two or more lists or arrays that appear to share a one-to-one relationship - through a common index. It is usually better to create a separate class that holds all corresponding attributes, - and add instances of this class to just one list or array.</li> - <li><b>[DLC] Dubious List Collection</b><br/> - Finds fields that are implementations of java.util.List, but that are used in a set-like fashion. - Since lookup type operations are performed using a linear search for Lists, the performance for large - Lists will be poor. Consideration should be made as to whether these fields should be sets.</li> - <li><b>[PCOA] Partially Constructed Object Access</b><br/> - Finds constructors that call non-final methods in non-final classes. If this class is derived from, and the - method is overridden, then that method will be executing on an object that hasn't been constructed in regards - to the subclass implementation. These methods should probably be defined as final.</li> - <li><b>[LSC] Literal String Comparison</b><br/> - Finds methods that call the equals or compareTo methods on a String variable passing in a String literal. - A NullPointerException may occur if the string variable is null. If instead the method was called on - the string literal, and the variable was passed as an argument, this exception could never happen</li> - </ul> - </div> - - <hr/> - <img id="v1_0_0_image" src="flip1.gif" onClick="toggleBlock('v1_0_0', 'v1_0_0_image');" align="top"/> - Detectors added in v1.0.0<br/> - <div id="v1_0_0" style="display:none;"> - <ul> - <li><b>[OCP] Overly Concrete Parameters</b><br/> - Finds parameters to methods that are defined as concrete classes, - when they're usage pattern can be defined by an implemented interface. - By switching to the interface, you can reduce coupling, which helps making - the code more testable and changeable.</li> - <li><b>[LII] List Indexed Iterating</b><br/> - Looks for uses of using loop indexed variables to 'iterate' over a List by calling get(i) - each time thru the loop. Depending on the List implementation, using Iterators can be - significantly faster. Using Iterators also makes it easier to substitute other collection types.</li> - <li><b>[UCC] Unrelated Collection Contents</b><br/> - Looks for collections that hold objects that are unrelated by class or interface inheritance, other - than java.lang.Object. Doing so, leads to brittle code, either by 'encoding' type knowledge in the position - of an element, or using instanceof tests. It is usually better to create a separate class, add the individual - types as members to it, and add an instance of this class to the collection.</li> - <li><b>[DRE] Declared Runtime Exception</b><br/> - Finds methods that declare RuntimeExceptions in their throws clause. While not illegal, - this may indicate a misunderstanding as to how unchecked exceptions are handled. - If is felt that a RuntimeException is so prevalent that it should be declared, it - is probably a better idea to prevent the occurance in code.</li> - </ul> - </div> - - <hr/> - <img id="v0_9_3_image" src="flip1.gif" onClick="toggleBlock('v0_9_3', 'v0_9_3_image');" align="top"/> - Detectors added in v0.9.3 - <div id="v0_9_3" style="display:none;"> - <ul> - <li><b>[ISB] Inefficient String Buffering</b><br/> - Finds Concatenation inside of a StringBuffer.append call, which - creates temporary StringBuffers.</li> - <li><b>[SCI] Synchronized Collection Iterators</b><br/> - Finds use of iterators on collections built from Collection.synchronizedXXX() - calls. As iterators are by default not multithread safe, there use with a - synchronized collections seems dubious.</li> - <li><b>[CC] Cyclomatic Complexity</b><br/> - Finds methods that are overly complex based on the McCabe algorithm for - counting number of unique branches in the method</li> - </ul> - </div> - <span align="bottom"> - <p align="right"> - fb-contrib is a trademark of MeBigFatGuy.com<br/> - FindBugs is a trademark of University of Maryland<br/> - </p> - </span> - </div> - -<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> -</script> -<script type="text/javascript"> -_uacct = "UA-249537-3"; -urchinTracker(); -</script> - -</body> -</html> Copied: trunk/fb-contrib/htdocs/index.shtml (from rev 1408, trunk/fb-contrib/htdocs/index.html) =================================================================== --- trunk/fb-contrib/htdocs/index.shtml (rev 0) +++ trunk/fb-contrib/htdocs/index.shtml 2009-12-28 06:22:20 UTC (rev 1418) @@ -0,0 +1,533 @@ +<html> +<head> +<meta name="keywords" content="findbugs,plugin,detector,bug,static,jar"/> +<title>fb-contrib™: A FindBugs™ auxiliary detector plugin</title> +<script language="javascript"> + +var flip1 = new Image; +flip1.src = "flip1.gif"; +var flip2 = new Image; +flip2.src = "flip2.gif"; + +function toggleBlock(divId, imgId) +{ + var el = document.getElementById(divId); + if (el.style.display=="block") + { + el.style.display="none"; + el = document.getElementById(imgId); + el.src=flip1.src; + } + else + { + el.style.display="block"; + el = document.getElementById(imgId); + el.src=flip2.src; + } +} + +</script> +</head> +<body background> + <div style="position:absolute;top:0;left:0;width:256;height:65535;z-index:1;background-image:url(blend.jpg);"> + </div> + + <div style="position:absolute;top:20;left:20;z-index:2;"> + <h1>fb-contrib™: A FindBugs™ auxiliary detector plugin</h1> + + <p>fb-contrib™ is an extra detector plugin to be used with the static bug + finder FindBugs™ (findbugs.sourceforge.net). Just download the fb-contrib.jar + file, and place it in your FindBugs™' plugin directory. FindBugs™ will + automatically pick up the jar file, and incorporate these detectors with its + own. + </p> + <a href="http://www.sourceforge.net/projects/fb-contrib">Project Page</a> + <img src="vbar.gif" height="12"/> + <a href="javadoc/index.html">JavaDoc</a> + <img src="vbar.gif" height="12"/> + <a href="bugdescriptions.html">Bug Descriptions</a> + + <hr/> + <img id="svn_image" src="flip2.gif" onClick="toggleBlock('svn', 'svn_image');" align="top"/> + Detectors added in svn<br/> + <div id="svn" style="display:block;"> + <ul> + <li><b>[PDP] Poorly Defined Parameter</b><br/> + Looks for non derivable methods that declare parameters and then cast those + parameters to more specific types in the method. This is misleading and dangerous + as you are not documenting through parameter types what is necessary for these + parameters to function correctly.</li> + <li><b>[OC] Overzealous Casting</b><br/> + Looks for manual casts of objects that are more specific then needed as the value is assigned + to a class or interface higher up in the inheritance chain. You only need to cast to that class + or interface.</li> + <li><b>[IKNC] Inconsistent Key Name Casing</b><br/> + Looks for calls to HttpRequest.getParameter with parameters of the same + name with different cases like 'id' and 'Id'.</li> + <li><b>[NSE] Non Symmetric Equals</b><br/> + Looks for classes that break the fundamental rule of equivalence, which is + symmetry. If a equals b, then b equals a. While it is usually wrong to allow + equals to compare different types, at the very least you should make sure that + each class knows about each other and is able to compare themselves with each other.</li> + <li><b>[CVAA] ContraVariant Array Assignment</b><br/> + Looks for contravariant array assignments. Since arrays are mutable data structures, their use + must be restricted to covariant or invariant usage. + <span style="color: #0000FF;">--contributed by Bhaskar Maddala - THANKS!</span></li> + <li><b>[NFF] Non Functional Field</b><br/> + Looks for fields in serializable classes that are defined as both final and + transient. As a transient field is not initialized when streamed, and is not + initialized in a constructor, it will remain null because it is defined final.</li> + </ul> + </div> + <hr/> + <img id="v4_0_0_image" src="flip1.gif" onClick="toggleBlock('v4_0_0', 'v4_0_0_image');" align="top"/> + Detectors added in v4.0.0<br/> + <div id="v4_0_0" style="display:none;"> + <ul> + <li><b>[TBP] Tristate Boolean Pattern</b><br/> + Looks for methods that are defined to return Boolean, but return null. This thus + allows three return values, Boolean.FALSE, Boolean.TRUE and null. If three values are + intended, it would be more clear to just create an enumeration with three values + and return that type.</li> + <li><b>[SUA] Suspicious Uninitialized Array</b><br/> + Looks for creation of arrays, that are not populated before being returned + for a method. While it is possible that the method that called this method + will do the work of populated the array, it seems odd that this would be the case.</li> + <li><b>[ITU] Inappropriate ToString Use</b><br/> + Looks for methods that rely on the format of the string fetched from another object's toString + method, when that method appears not to be owned by the author of the calling method. + As the implementation of toString() is often considered a private implementation detail of a class, + and not something that should be relied on, depending on it's format is dangerous.</li> + <li><b>[BED] Bogus Exception Declaration</b><br/> + Looks for constructors, private methods or static methods that declare that they + throw specific checked exceptions, but that do not. This just causes callers of + these methods to do extra work to handle an exception that will never be thrown.</li> + <li><b>[DTEP] Deprecated Typesafe Enum Pattern</b><br/> + Looks for classes that appear to implement the old style type safe enum pattern + that was used before java added Enum support to the language. Since this class is + compiled with java 1.5 or later, it would be simpler to just use java enums.</li> + <li><b>[UNNC] Unnecessary New Null Check</b><br/> + Looks for construction of new objects, and then the immediate testing + whether the object is null or not. As the new operator will always succeed, + or through an exception, this test is unnecessary and represents a misunderstanding + as to how the jvm works.</li> + </ul> + </div> + <hr/> + <img id="v3_8_0_image" src="flip1.gif" onClick="toggleBlock('v3_8_0', 'v3_8_0_image');" align="top"/> + Detectors added in v3.8.0<br/> + <div id="v3_8_0" style="display:none;"> + <ul> + <li><b>[DSOC] Dubious Set of Collections</b><br/> + Looks for sets or keySets of maps that contain other collections. As typically collections calculate + their hashCode, equals and compareTo methods by iterating the collection and evaluating the same function + on each item in the collection, this can be costly from a performance point of view. + In addition, using a set, or keySet of a map, infers that you will be looking for items based on + the value of a collection, which seems dubious at best. + Finally, as collections are often modified, This may cause problems if the collection is modified, + thus changing hashCodes, etc, while the collection is in the set. + If you wish to keep a collection of collections, the outer collection should probably be a list + to avoid these problems</li> + <li><b>[IICU] Incorrect Internal Class Use</b><br/> + Looks for classes that use objects from internal sun, xerces or xalan packages. As these are internal + to the respective products and subject to change or removal, these should not be used.</li> + <li><b>[LO] Logger Oddities</b><br/> + Looks for uses of log4j or slf4j where the class specified when creating the logger + is not the same as the class in which this logger is used.</li> + <li><b>[SCSS] Suspicious Clustered Session Support</b><br/> + Looks for methods that access objects in http sessions, that are complex objects, + modifies those objects, but does not call setAttribute to signify a change so that + cluster replication can happens correctly.</li> + </ul> + </div> + <hr/> + <img id="v3_6_0_image" src="flip1.gif" onClick="toggleBlock('v3_6_0', 'v3_6_0_image');" align="top"/> + Detectors added in v3.6.0<br/> + <div id="v3_6_0" style="display:none;"> + <ul> + <li><b>[CFS] Confusing Function Semantics</b><br/> + Looks for methods that return a parameter after making what looks like + modifications to that parameter. This leads to confusion for the user of this + method as it isn't obvious that the 'original' object is modified. If the + point of this method is to modify the parameter, it is probably better just + to have the method be a void method, to avoid confusion.</li> + <li><b>[SCA] Suspicious Clone Algorithm</b><br/> + Looks for implementation of clone where an assignment is made to a field of the + source object. It is likely that that store should have occurred on the cloned object, as + the clone operation is almost always considered read only.</li> + <li><b>[JAO] JUnit Assertion Oddities</b><br/> + Looks for junit test case methods that use assertions with odd parameters. Things such as, + passing a constant as the second (actual) parameter, not using the three parameter version of + asserts for doubles, or passing true or false as the first parameter instead of using assertTrue, + or assertFalse.</li> + <li><b>[WEM] Weak Exception Messaging</b><br/> + Looks for exceptions that are thrown with static strings as messages. Using static strings + doesn't differentiate one use of this method versus another, and so it may be difficult + to determine how this exception occurred without showing context.</li> + </ul> + </div> + <hr/> + <img id="v3_4_0_image" src="flip1.gif" onClick="toggleBlock('v3_4_0', 'v3_4_0_image');" align="top"/> + Detectors added in v3.4.0<br/> + <div id="v3_4_0" style="display:none;"> + <ul> + <li><b>[SJVU] Suspicious JDK Version Use</b><br/> + Looks for calls to classes and methods that do not exist in the JDK for which this class is + compiled. This can happen if you specify the -source and -target options of the javac compiler, and + specify a target that is less than the jdk version of the javac compiler.</li> + <li><b>[UAA] Use Add All</b><br/> + 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.</li> + <li><b>[MRC] Method returns Constant</b><br/> + Looks for private methods that can only return one constant value. + Either the class should not return a value, or perhaps a branch was missed.</li> + <li><b>[NCS] Needless Custom Serialization</b><br/> + Looks for classes that implement Serializable and implements readObject and writeObject + by just calling the readDefaultObject or writeDefaultObject of the stream parameter. + As this is the standard behavior, implementing these methods is not needed.</li> + <li><b>[EXS] Exception Softening</b><br/> + looks for methods that catch checked exceptions, and throw unchecked exceptions in their + place. There are several levels of concern. Least important are methods constrained by + interface or super class contracts not to throw checked exceptions but appear owned by + the same author. Next are methods constrained by interface or super class contracts and + throw other types of checked exceptions. Lastly are method not constrained by any interface + or superclass contract.</b><br/> + </ul> + </div> + <hr/> + <img id="v3_2_0_image" src="flip1.gif" onClick="toggleBlock('v3_2_0', 'v3_2_0_image');" align="top"/> + Detectors added in v3.2.0<br/> + <div id="v3_2_0" style="display:none;"> + <ul> + <li><b>[SCRV] Suspicious Comparator Return Values</b><br/> + Looks for classes that implement Comparator or Comparable, and whose compare or compareTo + methods return constant values only, but that don't represent the three possible choices + (a negative number, 0, and a positive number).</li> + <li><b>[SPP] Sillyness Pot Pourri</b><br/> + Looks for various small problems that don't fall into any particular category.</li> + <li><b>[SCII] Spoiled Child Interface Implementor</b><br/> + Looks for classes that implement interfaces by relying on methods being + implemented in superclasses, even though the superclass knows nothing about + the interface being implemented by the child.</li> + <li><b>[DWI] Deleting While Iterating</b><br/> + Looks for deletion of items from a collection using the remove method + of the collection at the same time that the collection is being iterated on. If + this occurs the iterator will become invalid and throw a ConcurrentModificationException. + Instead, the remove should be called on the iterator itself.</li> + <li><b>[USS] Use String Split</b><br/> + Looks for code that builds an array by using a StringTokenizer to break up + a string and place individual elements into an array. It is simpler to use + String.split instead.</li> + </ul> + </div> + <hr/> + <img id="v3_0_0_image" src="flip1.gif" onClick="toggleBlock('v3_0_0', 'v3_0_0_image');" align="top"/> + Detectors added in v3.0.0<br/> + <div id="v3_0_0" style="display:none;"> + <ul> + <li><b>[LEST] Lost Exception Stack Trace</b><br/> + Looks for methods that catch exceptions, and rethrow another exception without encapsulating + the original exception within it. Doing this loses the stack history, and where the original + problem occurred. This makes finding and fixing errors difficult.</li> + <li><b>[UCPM] Use Character Parameterized Method</b><br/> + Looks for methods that pass single character string constants as parameters to + methods that alternatively have an overridden method that accepts a character instead. + It is easier for the method to handle a single character than a String.</li> + <li><b>[TR] Tail Recursion</b><br/> + Looks for methods that make a recursive call to itself as the last statement in + the method. This tail recursion could be converted into a simple loop which would + improve the performance and stack requirements.</li> + <li><b>[URV] Unrelated Return Values</b><br/> + Looks for methods that return Object, and who's code body returns two or more + different types of objects that are unrelated (other than by Object).</li> + <li><b>[PIS] Possible Incomplete Synchronization</b><br/> + Looks for classes that don't handle serialization of parent class member fields + when the class in question is serializable but is derived from non serializable + classes.</b><br/> + </ul> + </div> + <hr/> + <img id="v2_8_0_image" src="flip1.gif" onClick="toggleBlock('v2_8_0', 'v2_8_0_image');" align="top"/> + Detectors added in v2.8.0<br/> + <div id="v2_8_0" style="display:none;"> + <ul> + <li><b>[NMCS] Needless Member Collection Synchronization</b><br/> + Looks for private collection members, either static or instance, that are only initialized in + the clinit or init, but are synchronized. This is not necessary as the constructor or static + initializer are guaranteed to be thread safe.</li> + <li><b>[ITC] Inheritance Type Checking</b><br/> + Looks for if/else blocks where a series of them use instanceof on the same + variable to determine what to do. If these classes are related by inheritance, + this often is better handled through calling a single overridden method.</li> + <li><b>[PRMC] Possibly Redundant Method Calls</b><br/> + Looks for calls of the same method on the same object when that object hasn't changed. + This often is redundant, and the second call can be removed, or combined.</li> + <li><b>[UTA] Use toArray</b><br/> + Looks for code that builds an array of values from a collection, by manually looping + over the elements of the collection, and adding them to the array. It is simpler and + cleaner to use mycollection.toArray(new type[mycollection.size()].</li> + </ul> + </div> + <hr/> + <img id="v2_6_0_image" src="flip1.gif" onClick="toggleBlock('v2_6_0', 'v2_6_0_image');" align="top"/> + Detectors added in v2.6.0<br/> + <div id="v2_6_0" style="display:none;"> + <ul> + <li><b>[FCBL] Field could be Local</b><br/> + Looks for classes that declare fields that are used in a locals-only fashion, specifically private fields + that are accessed first in each method with a store vs. a load. These fields can be declared as one or more + locals.</li> + <li><b>[NOS] Non Owned Synchronization</b><br/> + looks for methods that synchronize on variables that are not owned by the + current class. Doing this causes confusion when two classes use the same variable + for their own synchronization purposes. For cleanest separation of interests, only + synchronize on private fields of the class. Note that 'this' is not owned by + the current class and synchronization on 'this' should be avoided as well.</li> + <li><b>[S508C] Section 508 Compliance</b><br/> + looks for classes and methods that do not support coding styles that allow Accessibility + software to make full use of the gui for people with visual impediments. Commonly known as + 'Section 508 Compliance' this detector finds a varied list of issues that hamper screen readers, + and make color/size adjustments difficult.</li> + <li><b>[UEC] Use Enum Collections</b><br/> + looks for uses of sets or maps where the key is an enum. In these cases, it is + more efficient to use EnumSet or EnumMap. It is a jdk1.5 only detector.</li> + </ul> + </div> + <hr/> + <img id="v2_4_0_image" src="flip1.gif" onClick="toggleBlock('v2_4_0', 'v2_4_0_image');" align="top"/> + Detectors added in v2.4.0<br/> + <div id="v2_4_0" style="display:none;"> + <ul> + <li><b>[DDC] Double Date Compare</b><br/> + Looks for methods that compare two dates using .equals and after or before. + This combination of two comparisons can be accomplished with just one comparison.</li> + <li><b>[JVR] JDBC Vendor Reliance</b><br/> + Looks for uses of jdbc vendor specific classes and methods making the database access code + non portable.</li> + <li><b>[PMB] Possible Memory Bloat</b><br/> + Looks for classes that maintain collections or StringBuffer/StringBuilders in static member + variables, and that do not appear to provide a way to clear or remove items from these members. + Such class fields are likely causes of memory bloat.</li> + <li><b>[LSYC] Local Synchronized Collection</b><br/> + looks for allocations of synchronized collections that are stored in local variables, and + never stored in fields or returned from methods. As local variables are by definition + thread safe, using synchronized collections in this context makes no sense.</li> + </ul> + </div> + + <hr/> + <img id="v2_2_0_image" src="flip1.gif" onClick="toggleBlock('v2_2_0', 'v2_2_0_image');" align="top"/> + Detectors added in v2.2.0<br/> + <div id="v2_2_0" style="display:none;"> + <ul> + <li><b>[CLI] Constant List Index</b><br/> + Looks for methods that access an array or list using a constant integer index. Often, + this is a typo where a loop variable is intended to be used. If however, specific + list indices mean different specific things, then perhaps replacing the list with + a first-class object with meaningful accessors would make the code less brittle.</li> + <li><b>[SCR] Sloppy Class Reflection</b><br/> + Looks for methods that use Class.forName("XXX") to load a class object + for a class that is already referenced by this class. It is simpler to just use + XXX.class, and doing so protects the integrity of this code from such transformations + as obfuscation. Use of Class.forName should only be used when the class in question + isn't already statically bound to this context.</li> + <li><b>[AWCBR] Array Wrapped Call By Reference</b><br/> + Looks for methods that use an array of length one to pass a variable to achieve call + by pointer ala C++. It is better to define a proper return class type that holds all + the relevant information retrieved from the called method.</li> + <li><b>[SG] Sluggish Gui</b><br/> + Looks for methods that implement awt or swing listeners and perform time + consuming operations. Doing these operations in the gui thread will cause the + interface to appear sluggish and non-responsive to the user. It is better to + use a separate thread to do the time consuming work so that the user + has a better experience.</li> + <li><b>[NIR] Needless Instance Retrieval</b><br/> + Looks for methods that call a method to retrieve a reference to an object + only to then load a static field of that object's class. It is simpler and more + performant to just directly load the field from the class itself.</li> + </ul> + </div> + + <hr/> + <img id="v2_0_0_image" src="flip1.gif" onClick="toggleBlock('v2_0_0', 'v2_0_0_image');" align="top"/> + Detectors added in v2.0.0<br/> + <div id="v2_0_0" style="display:none;"> + <ul> + <li><b>[ABC] Array Based Collections</b><br/> + Looks for methods that use arrays for items in the keyset of a map, or as + an element of a set, or in a list when using the contains method. Since arrays + do not, and cannot define an equals method, reference equality is used for these + collections, which is probably not desired. If it is, consider using the IdentityHashMap + class when using Maps in this case, to better document your intentions.</li> + <li><b>[ODN] Orphaned DOM Nodes</b><br/> + Looks for methods that create DOM nodes but do not append them to any Document.</li> + <li><b>[A0M] Abstract Overridden Method</b><br/> + Looks for abstract methods that override a concrete method in a super class. + Doing this casts away the implementation of the super class, and breaks + the implied contract as set forth by the parent class.</li> + <li><b>[CBX] Custom Built XML</b><br/> + Looks for methods that build xml based strings by concatenation strings + and custom values together. Doing so makes brittle code, that is difficult to + modify, validate and understand. It is cleaner to create external xml files that are + transformed at runtime, using parameters set through Transformer.setParameter.</li> + </ul> + </div> + + <hr/> + <img id="v1_8_0_image" src="flip1.gif" onClick="toggleBlock('v1_8_0', 'v1_8_0_image');" align="top"/> + Detectors added in v1.8.0<br/> + <div id="v1_8_0" style="display:none;"> + <ul> + <li><b>[STS] Spurious Thread States</b><br/> + Finds methods that call wait, notify or notifyAll on an instance of a + java.lang.Thread. Since the internal workings of the thread is to synchronize on the + thread itself, introducing client calls will confuse the thread state of the object + in question, and will cause spurious thread state changes, either waking threads up + when not intended, or removing the thread from the runnable state.</li> + <li><b>[NAB] Needless Autoboxing</b><br/> + Finds methods that pass an instance of a primitive wrapper class, to a constructor + of the same class. Since wrapper classes are immutable, you can just use the original + instance, instead of creating a new one. This bug is a misuse of autoboxing.</li> + <li><b>[USBR] UnnecessaryStoreBeforeReturn</b><br/> + Finds methods that store the return result in a local variable, and + then immediately returns that local variable.</li> + <li><b>[COM] CopiedOverriddenMethod</b><br/> + Finds methods that are implemented with an exact copy of their super class method's + implementation. In most cases, this means that this method can just be removed.</li> + </ul> + </div> + + <hr/> + <img id="v1_6_0_image" src="flip1.gif" onClick="toggleBlock('v1_6_0', 'v1_6_0_image');" align="top"/> + Detectors added in v1.6.0<br/> + <div id="v1_6_0" style="display:none;"> + <ul> + <li><b>[SMII] Static Method Instance Invocation</b><br/> + Finds methods that make static method calls using an instance reference. + For documentation purposes, it is better to call the method using the class name. + This may represent a change in definition that should be noticed.</li> + <li><b>[AFBR] Abnormal Finally Block Return</b><br/> + Finds methods that return or throw an exception from a finally block. Since a finally block is + executed after any return or throw statements that are present in the try or catch block, these exit + values are swallowed by the finally block's actions.</li> + <li><b>[NCMU] Non Collections Method Use</b><br/> + Finds calls to collections objects using methods that are not defined in the Collections interfaces, + but that have equivalent methods defined in such. By using the new methods, it allows for the + replacement of concrete classes with interfaces, and simplifies changing collection types if + desired.</li> + <li><b>[CAO] Confusing Autoboxed Overloading</b><br/> + Finds classes that define overloaded methods where the only difference is a parameter being + of type java.lang.Character, and int, long, float or double. Due to autoboxing, one might conclude + that a parameter of 'a' would autobox to Character, but would instead be cast to a double.</li> + </ul> + </div> + + <hr/> + <img id="v1_4_0_image" src="flip1.gif" onClick="toggleBlock('v1_4_0', 'v1_4_0_image');" align="top"/> + Detectors added in v1.4.0<br/> + <div id="v1_4_0" style="display:none;"> + <ul> + <li><b>[FP] Final Parameters</b><br/> + Finds parameters that could be marked as final, but aren't. Doing so helps document the method, keeps + unwanted changes to creep in, and may help the jvm jit compiler to optimize better.</li> + <li><b>[ACEM] Abstract Class Empty Methods</b><br/> + Finds empty methods, or methods that just throw an exception in abstract classes. In these cases, it + probably is more correct to just define the method to be abstract as well, so that proper subclass + implementation is enforced.</li> + <li><b>[MAC] Manual Array Copy</b><br/> + Finds methods that copy elements from one array to another manually using a loop. It is better + performing to use System.arraycopy, as this method is native.</li> + <li><b>[FPL] Floating Point Loops</b><br/> + Finds methods that use floating point variables as the index to loops. Since floating point math is inprecise, + errors will accumulate each time through the loop, making the logic suspect. It is better to use an + integer index, and calculate the desired floating point value from this integer.</li> + </ul> + </div> + + <hr/> + <img id="v1_2_0_image" src="flip1.gif" onClick="toggleBlock('v1_2_0', 'v1_2_0_image');" align="top"/> + Detectors added in v1.2.0<br/> + <div id="v1_2_0" style="display:none;"> + <ul> + <li><b>[PL] Parallel Lists</b><br/> + Finds classes that maintain two or more lists or arrays that appear to share a one-to-one relationship + through a common index. It is usually better to create a separate class that holds all corresponding attributes, + and add instances of this class to just one list or array.</li> + <li><b>[DLC] Dubious List Collection</b><br/> + Finds fields that are implementations of java.util.List, but that are used in a set-like fashion. + Since lookup type operations are performed using a linear search for Lists, the performance for large + Lists will be poor. Consideration should be made as to whether these fields should be sets.</li> + <li><b>[PCOA] Partially Constructed Object Access</b><br/> + Finds constructors that call non-final methods in non-final classes. If this class is derived from, and the + method is overridden, then that method will be executing on an object that hasn't been constructed in regards + to the subclass implementation. These methods should probably be defined as final.</li> + <li><b>[LSC] Literal String Comparison</b><br/> + Finds methods that call the equals or compareTo methods on a String variable p... [truncated message content] |
From: <dbr...@us...> - 2009-12-28 06:19:56
|
Revision: 1417 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1417&view=rev Author: dbrosius Date: 2009-12-28 06:19:50 +0000 (Mon, 28 Dec 2009) Log Message: ----------- add MBFG Projects menu files Added Paths: ----------- trunk/fb-contrib/htdocs/mbfg.css trunk/fb-contrib/htdocs/mbfg.js trunk/fb-contrib/htdocs/mbfg_menu.shtml Added: trunk/fb-contrib/htdocs/mbfg.css =================================================================== --- trunk/fb-contrib/htdocs/mbfg.css (rev 0) +++ trunk/fb-contrib/htdocs/mbfg.css 2009-12-28 06:19:50 UTC (rev 1417) @@ -0,0 +1,32 @@ +#mbfg_div { + float:right; +} + +#mbfg_menu { + margin-right: 20px; +} + +#mbfg_projects { + position: absolute; + display: none; + z-order: 2; +} + +#mbfg_projects ul li { + list-style-type: none; +} + +#mbfg_projects ul li a { + display:block; + border-color: #404040; + border-width: 1px; + border-style: solid; + padding: 6px 40px 6px 40px; + background-color: #DDDDFF; + margin-right: 20px; + text-decoration: none; +} + +#mbfg_projects ul li a:hover { + background-color: #FFDDDD; +} Property changes on: trunk/fb-contrib/htdocs/mbfg.css ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/fb-contrib/htdocs/mbfg.js =================================================================== --- trunk/fb-contrib/htdocs/mbfg.js (rev 0) +++ trunk/fb-contrib/htdocs/mbfg.js 2009-12-28 06:19:50 UTC (rev 1417) @@ -0,0 +1,9 @@ + +function toggleDiv(divId) +{ + var dv = document.getElementById(divId); + if (dv.style.display == 'block') + dv.style.display = 'none'; + else + dv.style.display = 'block'; +} \ No newline at end of file Property changes on: trunk/fb-contrib/htdocs/mbfg.js ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/fb-contrib/htdocs/mbfg_menu.shtml =================================================================== --- trunk/fb-contrib/htdocs/mbfg_menu.shtml (rev 0) +++ trunk/fb-contrib/htdocs/mbfg_menu.shtml 2009-12-28 06:19:50 UTC (rev 1417) @@ -0,0 +1,17 @@ + <div id="mbfg_div" onMouseover="javascript:toggleDiv('mbfg_projects')" onMouseout="javascript:toggleDiv('mbfg_projects')"> + <a id="mbfg_menu" href="#" >Other MeBigFatGuy Projects</a> + <div id="mbfg_projects"> + <ul> + <li><a href="http://beansource.sf.net">Beansource</a></li> + <li><a href="http://fb-contrib.sf.net">FB-Contrib</a></li> + <li><a href="http://mongobrowser.sf.net">MongoBrowser</a></li> + <li><a href="http://mysfstats.sf.net">MySFStats</a></li> + <li><a href="http://patchanim.sf.net">PatchAnim</a></li> + <li><a href="http://pixelle.sf.net">Pixelle</a></li> + <li><a href="http://polycasso.sf.net">Polycasso</a></li> + <li><a href="http://schemalizer.sf.net">Schemalizer</a></li> + <li><a href="http://tomailer.sf.net">ToMailer</a></li> + <li><a href="http://www.heartofgoldfarm.com">Heart of Gold Farm</a></li> + </ul> + </div> + </div> Property changes on: trunk/fb-contrib/htdocs/mbfg_menu.shtml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |