FindBugs Result

Warnings Trend

All WarningsNew WarningsFixed Warnings
304218

Summary

TotalHigh PriorityNormal PriorityLow Priority
304 0 304 0

Details

FileLinePriorityTypeCategory
121
Normal
DM_STRING_CTOR
PERFORMANCE
271
Normal
DM_STRING_CTOR
PERFORMANCE
280
Normal
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
STYLE
333
Normal
REC_CATCH_EXCEPTION
STYLE
699
Normal
DM_STRING_CTOR
PERFORMANCE
275
Normal
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
STYLE
1129
Normal
URF_UNREAD_FIELD
PERFORMANCE
276
Normal
DLS_DEAD_LOCAL_STORE
STYLE
67
Normal
SC_START_IN_CTOR
MT_CORRECTNESS
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
151
Normal
DM_STRING_CTOR
PERFORMANCE
29
Normal
IS2_INCONSISTENT_SYNC
MT_CORRECTNESS
420
Normal
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
STYLE
446
Normal
REC_CATCH_EXCEPTION
STYLE
417
Normal
SBSC_USE_STRINGBUFFER_CONCATENATION
PERFORMANCE
274
Normal
DM_STRING_CTOR
PERFORMANCE
202
Normal
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
STYLE
760
Normal
DM_STRING_TOSTRING
PERFORMANCE
555
Normal
DM_STRING_CTOR
PERFORMANCE
352
Normal
DM_STRING_CTOR
PERFORMANCE
642
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
532
Normal
NP_ALWAYS_NULL_EXCEPTION
CORRECTNESS
588
Normal
DM_STRING_TOSTRING
PERFORMANCE
215
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1252
Normal
REC_CATCH_EXCEPTION
STYLE
375
Normal
RU_INVOKE_RUN
MT_CORRECTNESS
112
Normal
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
CORRECTNESS
124
Normal
DM_STRING_CTOR
PERFORMANCE
738
Normal
UWF_UNWRITTEN_FIELD
CORRECTNESS
249
Normal
REC_CATCH_EXCEPTION
STYLE
738
Normal
NP_UNWRITTEN_FIELD
CORRECTNESS
207
Normal
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
STYLE
1112
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
574
Normal
EI_EXPOSE_REP2
MALICIOUS_CODE
457
Normal
EI_EXPOSE_REP2
MALICIOUS_CODE
884
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1063
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
512
Normal
EQ_COMPARETO_USE_OBJECT_EQUALS
BAD_PRACTICE
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
220
Normal
REC_CATCH_EXCEPTION
STYLE
380
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
91
Normal
ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD
STYLE
87
Normal
ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD
STYLE
468
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
570
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
112
Normal
EI_EXPOSE_REP2
MALICIOUS_CODE
95
Normal
DLS_DEAD_LOCAL_STORE
STYLE
79
Normal
LI_LAZY_INIT_UPDATE_STATIC
MT_CORRECTNESS
108
Normal
EI_EXPOSE_REP2
MALICIOUS_CODE
45
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
160
Normal
VA_FORMAT_STRING_ARG_MISMATCH
CORRECTNESS
150
Normal
VA_FORMAT_STRING_ARG_MISMATCH
CORRECTNESS
395
Normal
UG_SYNC_SET_UNSYNC_GET
MT_CORRECTNESS
219
Normal
NP_LOAD_OF_KNOWN_NULL_VALUE
STYLE
375
Normal
MS_PKGPROTECT
MALICIOUS_CODE
300
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
220
Normal
MS_PKGPROTECT
MALICIOUS_CODE
215
Normal
MS_PKGPROTECT
MALICIOUS_CODE
415
Normal
DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
BAD_PRACTICE
219
Normal
MS_PKGPROTECT
MALICIOUS_CODE
1109
Normal
UWF_UNWRITTEN_FIELD
CORRECTNESS
214
Normal
WMI_WRONG_MAP_ITERATOR
PERFORMANCE
1891
Normal
DB_DUPLICATE_BRANCHES
STYLE
1856
Normal
UR_UNINIT_READ
CORRECTNESS
70
Normal
MS_PKGPROTECT
MALICIOUS_CODE
80
Normal
MS_PKGPROTECT
MALICIOUS_CODE
64
Normal
MS_PKGPROTECT
MALICIOUS_CODE
1075
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
1363
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1362
Normal
DLS_DEAD_LOCAL_STORE
STYLE
2290
Normal
URF_UNREAD_FIELD
PERFORMANCE
1403
Normal
URF_UNREAD_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
258
Normal
DLS_DEAD_LOCAL_STORE
STYLE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
-1
Normal
UUF_UNUSED_FIELD
PERFORMANCE
1732
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
1674
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
1659
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
621
Normal
DLS_DEAD_LOCAL_STORE
STYLE
530
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
1392
Normal
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
CORRECTNESS
622
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1125
Normal
DLS_DEAD_LOCAL_STORE
STYLE
858
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1344
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1492
Normal
DLS_DEAD_LOCAL_STORE
STYLE
84
Normal
DLS_DEAD_LOCAL_STORE
STYLE
222
Normal
ICAST_IDIV_CAST_TO_DOUBLE
STYLE
62
Normal
DLS_DEAD_LOCAL_STORE
STYLE
83
Normal
DLS_DEAD_LOCAL_STORE
STYLE
498
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
106
Normal
DE_MIGHT_IGNORE
BAD_PRACTICE
364
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
318
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
250
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
235
Normal
ICAST_IDIV_CAST_TO_DOUBLE
STYLE
2195
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
61
Normal
MS_FINAL_PKGPROTECT
MALICIOUS_CODE
125
Normal
BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS
BAD_PRACTICE
2188
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
136
Normal
DM_NUMBER_CTOR
PERFORMANCE
162
Normal
DM_NUMBER_CTOR
PERFORMANCE
307
Normal
DM_NUMBER_CTOR
PERFORMANCE
125
Normal
NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT
BAD_PRACTICE
832
Normal
DLS_DEAD_LOCAL_STORE
STYLE
201
Normal
DM_NUMBER_CTOR
PERFORMANCE
524
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1844
Normal
DLS_DEAD_LOCAL_STORE
STYLE
480
Normal
DLS_DEAD_LOCAL_STORE
STYLE
525
Normal
DLS_DEAD_LOCAL_STORE
STYLE
481
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1494
Normal
DM_NUMBER_CTOR
PERFORMANCE
1474
Normal
DM_NUMBER_CTOR
PERFORMANCE
1219
Normal
DM_NUMBER_CTOR
PERFORMANCE
1238
Normal
DM_NUMBER_CTOR
PERFORMANCE
843
Normal
DM_NUMBER_CTOR
PERFORMANCE
161
Normal
MS_PKGPROTECT
MALICIOUS_CODE
1182
Normal
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
BAD_PRACTICE
1530
Normal
SBSC_USE_STRINGBUFFER_CONCATENATION
PERFORMANCE
1096
Normal
SBSC_USE_STRINGBUFFER_CONCATENATION
PERFORMANCE
1399
Normal
SBSC_USE_STRINGBUFFER_CONCATENATION
PERFORMANCE
1212
Normal
UPM_UNCALLED_PRIVATE_METHOD
PERFORMANCE
803
Normal
UPM_UNCALLED_PRIVATE_METHOD
PERFORMANCE
2973
Normal
NP_NULL_PARAM_DEREF
CORRECTNESS
3097
Normal
NP_NULL_PARAM_DEREF
CORRECTNESS
166
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
871
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1120
Normal
DLS_DEAD_LOCAL_STORE
STYLE
213
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
33
Normal
NP_LOAD_OF_KNOWN_NULL_VALUE
STYLE
1243
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
598
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
680
Normal
DLS_DEAD_LOCAL_STORE
STYLE
681
Normal
DLS_DEAD_LOCAL_STORE
STYLE
43
Normal
MS_SHOULD_BE_FINAL
MALICIOUS_CODE
82
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
162
Normal
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
CORRECTNESS
57
Normal
EI_EXPOSE_REP2
MALICIOUS_CODE
352
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
321
Normal
DLS_DEAD_LOCAL_STORE
STYLE
309
Normal
BC_UNCONFIRMED_CAST
STYLE
339
Normal
BC_UNCONFIRMED_CAST
STYLE
1074
Normal
DLS_DEAD_LOCAL_STORE
STYLE
772
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
429
Normal
EQ_COMPARETO_USE_OBJECT_EQUALS
BAD_PRACTICE
109
Normal
UR_UNINIT_READ
CORRECTNESS
882
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
797
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
807
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
822
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
1925
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
40
Normal
DM_NUMBER_CTOR
PERFORMANCE
824
Normal
DLS_DEAD_LOCAL_STORE
STYLE
885
Normal
DLS_DEAD_LOCAL_STORE
STYLE
140
Normal
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
BAD_PRACTICE
851
Normal
BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION
PERFORMANCE
79
Normal
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
STYLE
95
Normal
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
STYLE
368
Normal
NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT
BAD_PRACTICE
364
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
1590
Normal
URF_UNREAD_FIELD
PERFORMANCE
794
Normal
MS_PKGPROTECT
MALICIOUS_CODE
851
Normal
DM_NUMBER_CTOR
PERFORMANCE
960
Normal
DM_NUMBER_CTOR
PERFORMANCE
873
Normal
DM_NUMBER_CTOR
PERFORMANCE
368
Normal
BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS
BAD_PRACTICE
340
Normal
DLS_DEAD_LOCAL_STORE
STYLE
555
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1220
Normal
DLS_DEAD_LOCAL_STORE
STYLE
610
Normal
DLS_DEAD_LOCAL_STORE
STYLE
960
Normal
BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION
PERFORMANCE
1504
Normal
DLS_DEAD_LOCAL_STORE
STYLE
1501
Normal
DLS_DEAD_LOCAL_STORE
STYLE
341
Normal
DLS_DEAD_LOCAL_STORE
STYLE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
MS_PKGPROTECT
MALICIOUS_CODE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
1521
Normal
DLS_DEAD_LOCAL_STORE
STYLE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
27
Normal
URF_UNREAD_FIELD
PERFORMANCE
26
Normal
URF_UNREAD_FIELD
PERFORMANCE
43
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
28
Normal
URF_UNREAD_FIELD
PERFORMANCE
166
Normal
DLS_DEAD_LOCAL_STORE
STYLE
40
Normal
MS_PKGPROTECT
MALICIOUS_CODE
25
Normal
URF_UNREAD_FIELD
PERFORMANCE
24
Normal
URF_UNREAD_FIELD
PERFORMANCE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
1092
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
1090
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
NM_FIELD_NAMING_CONVENTION
BAD_PRACTICE
248
Normal
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
CORRECTNESS
275
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
599
Normal
IS2_INCONSISTENT_SYNC
MT_CORRECTNESS
508
Normal
IS2_INCONSISTENT_SYNC
MT_CORRECTNESS
141
Normal
SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
BAD_PRACTICE
138
Normal
DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
BAD_PRACTICE
219
Normal
REC_CATCH_EXCEPTION
STYLE
72
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
1091
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
171
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
151
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
151
Normal
UWF_UNWRITTEN_FIELD
CORRECTNESS
191
Normal
ODR_OPEN_DATABASE_RESOURCE
BAD_PRACTICE
233
Normal
ODR_OPEN_DATABASE_RESOURCE
BAD_PRACTICE
280
Normal
ODR_OPEN_DATABASE_RESOURCE
BAD_PRACTICE
332
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
146
Normal
DLS_DEAD_LOCAL_STORE
STYLE
128
Normal
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
BAD_PRACTICE
112
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
189
Normal
ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD
STYLE
123
Normal
SC_START_IN_CTOR
MT_CORRECTNESS
175
Normal
LI_LAZY_INIT_UPDATE_STATIC
MT_CORRECTNESS
68
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
67
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
1122
Normal
WMI_WRONG_MAP_ITERATOR
PERFORMANCE
110
Normal
ICAST_IDIV_CAST_TO_DOUBLE
STYLE
782
Normal
WMI_WRONG_MAP_ITERATOR
PERFORMANCE
1534
Normal
WMI_WRONG_MAP_ITERATOR
PERFORMANCE
877
Normal
DLS_DEAD_LOCAL_STORE
STYLE
354
Normal
WMI_WRONG_MAP_ITERATOR
PERFORMANCE
641
Normal
MS_SHOULD_BE_FINAL
MALICIOUS_CODE
876
Normal
DLS_DEAD_LOCAL_STORE
STYLE
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
357
Normal
DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
BAD_PRACTICE
147
Normal
NM_METHOD_NAMING_CONVENTION
BAD_PRACTICE
499
Normal
EI_EXPOSE_REP
MALICIOUS_CODE
788
Normal
NP_NULL_PARAM_DEREF
CORRECTNESS
87
Normal
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
CORRECTNESS
361
Normal
REC_CATCH_EXCEPTION
STYLE
292
Normal
NP_NULL_PARAM_DEREF
CORRECTNESS
58
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
-1
Normal
SE_BAD_FIELD
BAD_PRACTICE
41
Normal
NP_GUARANTEED_DEREF
CORRECTNESS
57
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
417
Normal
IS2_INCONSISTENT_SYNC
MT_CORRECTNESS
157
Normal
NM_METHOD_NAMING_CONVENTION
BAD_PRACTICE
-1
Normal
MF_CLASS_MASKS_FIELD
CORRECTNESS
877
Normal
SIC_INNER_SHOULD_BE_STATIC
PERFORMANCE
2270
Normal
DM_EXIT
BAD_PRACTICE
281
Normal
NP_NULL_PARAM_DEREF
CORRECTNESS
630
Normal
SE_BAD_FIELD_STORE
BAD_PRACTICE
750
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
151
Normal
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
CORRECTNESS
245
Normal
DM_STRING_CTOR
PERFORMANCE
901
Normal
DM_STRING_CTOR
PERFORMANCE
15
Normal
SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
BAD_PRACTICE
1492
Normal
WMI_WRONG_MAP_ITERATOR
PERFORMANCE
1705
Normal
ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD
STYLE
1458
Normal
NP_NULL_ON_SOME_PATH
CORRECTNESS
468
Normal
DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
BAD_PRACTICE
224
Normal
NP_LOAD_OF_KNOWN_NULL_VALUE
STYLE
1822
Normal
DM_STRING_CTOR
PERFORMANCE
727
Normal
NP_NULL_ON_SOME_PATH_EXCEPTION
CORRECTNESS
581
Normal
DM_STRING_TOSTRING
PERFORMANCE
File: RepBarPanel.java, Line: 121, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: usda.weru.weps.reports.RepBarPanel.makeData() invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: RepBarPanel.java, Line: 271, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: usda.weru.weps.reports.RepBarPanel.propertyChange(PropertyChangeEvent) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: ProjectSummary.java, Line: 280, Type: NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE, Priority: Normal, Category: STYLE

NP: Possible null pointer dereference in usda.weru.weps.reports.ProjectSummary.loadFile(String, String) due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

File: ProjectSummary.java, Line: 333, Type: REC_CATCH_EXCEPTION, Priority: Normal, Category: STYLE

REC: Exception is caught when Exception is not thrown in usda.weru.weps.reports.ProjectSummary.loadFile(String, String)

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

File: ProjectSummary.java, Line: 699, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: usda.weru.weps.reports.ProjectSummary.makeSummaryVector(Vector, String) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: ProjectSummary.java, Line: 275, Type: NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE, Priority: Normal, Category: STYLE

NP: Possible null pointer dereference in usda.weru.weps.reports.ProjectSummary.loadFile(String, String) due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

File: ProjectSummary.java, Line: 1129, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.weps.reports.PrintListingPainter.runDir

This field is never read.  Consider removing it from the class.

File: ProjectSummary.java, Line: 276, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to rotationYrs in usda.weru.weps.reports.ProjectSummary.loadFile(String, String)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: DataModel.java, Line: 67, Type: SC_START_IN_CTOR, Priority: Normal, Category: MT_CORRECTNESS

SC: new usda.weru.wmrm.DataModel() invokes usda.weru.wmrm.DataModel$RunsWatcher.start()

The constructor starts a thread. This is likely to be wrong if the class is ever extended/subclassed, since the thread will be started before the subclass constructor is started.

File: DataModel.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.wmrm.DataModel defines non-transient non-serializable instance field c_currentProject

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: RepSumPanel.java, Line: 151, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: new usda.weru.weps.reports.RepSumPanel(File, String, String) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: WepsDataSource.java, Line: 29, Type: IS2_INCONSISTENT_SYNC, Priority: Normal, Category: MT_CORRECTNESS

IS: Inconsistent synchronization of usda.weru.weps.reports.query.WepsDataSource.c_fields; locked 42% of time

The fields of this class appear to be accessed inconsistently with respect to synchronization.  This bug report indicates that the bug pattern detector judged that

  1. The class contains a mix of locked and unlocked accesses,
  2. At least one locked access was performed by one of the class's own methods, and
  3. The number of unsynchronized field accesses (reads and writes) was no more than one third of all accesses, with writes being weighed twice as high as reads

A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.

You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.

Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held.  Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.

This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.

File: RepSimPanel.java, Line: 420, Type: NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE, Priority: Normal, Category: STYLE

NP: Possible null pointer dereference in usda.weru.weps.reports.RepSimPanel.setSoilLossTolerance() due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

File: RepSimPanel.java, Line: 446, Type: REC_CATCH_EXCEPTION, Priority: Normal, Category: STYLE

REC: Exception is caught when Exception is not thrown in usda.weru.weps.reports.RepSimPanel.setSoilLossTolerance()

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

File: RepOutPanel.java, Line: 417, Type: SBSC_USE_STRINGBUFFER_CONCATENATION, Priority: Normal, Category: PERFORMANCE

SBSC: Method usda.weru.weps.reports.RepOutPanel.readData(String) concatenates strings using + in a loop

The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.

For example:

  // This is bad
  String s = "";
  for (int i = 0; i < field.length; ++i) {
    s = s + field[i];
  }

  // This is better
  StringBuffer buf = new StringBuffer();
  for (int i = 0; i < field.length; ++i) {
    buf.append(field[i]);
  }
  String s = buf.toString();

File: RepSimPanel.java, Line: 274, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: usda.weru.weps.reports.RepSimPanel.propertyChange(PropertyChangeEvent) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: ManagementSummary.java, Line: 202, Type: NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE, Priority: Normal, Category: STYLE

NP: Possible null pointer dereference in usda.weru.weps.reports.ManagementSummary.loadFile(String, String) due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

File: ManagementSummary.java, Line: 760, Type: DM_STRING_TOSTRING, Priority: Normal, Category: PERFORMANCE

Dm: Method usda.weru.weps.reports.ManagementSummary.printPageHeader(JCPrintEvent) invokes toString() method on a String

Calling String.toString() is just a redundant operation. Just use the String.

File: ManagementSummary.java, Line: 555, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: usda.weru.weps.reports.ManagementSummary.propertyChange(PropertyChangeEvent) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: ManagementSummary.java, Line: 352, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: new usda.weru.weps.reports.ManagementSummary(String, String, String, boolean, ConfigData) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: DetailReport.java, Line: 642, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.weps.reports.DetailReport$TableCSHManager be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: DetailReport.java, Line: 532, Type: NP_ALWAYS_NULL_EXCEPTION, Priority: Normal, Category: CORRECTNESS

NP: Null pointer dereference of progress in usda.weru.weps.reports.DetailReport$DetailData.load(Component, File) on exception path

A pointer which is null on an exception path is dereferenced here.  This will lead to a NullPointerException when the code is executed.  Note that because FindBugs currently does not prune infeasible exception paths, this may be a false warning.

Also note that FindBugs considers the default case of a switch statement to be an exception path, since the default case is often infeasible.

File: DetailReport.java, Line: 588, Type: DM_STRING_TOSTRING, Priority: Normal, Category: PERFORMANCE

Dm: Method usda.weru.weps.reports.DetailReport$DetailData.parseLine(String) invokes toString() method on a String

Calling String.toString() is just a redundant operation. Just use the String.

File: DetailReport.java, Line: 215, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to end in usda.weru.weps.reports.DetailReport$2.run()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ProjectSummary.java, Line: 1252, Type: REC_CATCH_EXCEPTION, Priority: Normal, Category: STYLE

REC: Exception is caught when Exception is not thrown in usda.weru.weps.reports.PrintListingPainter.print(Graphics, PageFormat, int)

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

File: OutputViewer.java, Line: 375, Type: RU_INVOKE_RUN, Priority: Normal, Category: MT_CORRECTNESS

Ru: usda.weru.weps.reports.OutputViewer.JCBFileNames_itemStateChanged(ItemEvent) explicitly invokes run on a thread (did you mean to start it instead?)

This method explicitly invokes run() on an object.  In general, classes implement the Runnable interface because they are going to have their run() method invoked in a new thread, in which case Thread.start() is the right method to call.

File: OutputViewer.java, Line: 112, Type: RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE, Priority: Normal, Category: CORRECTNESS

RCN: Nullcheck of hs at line 114 of value previously dereferenced in new usda.weru.weps.reports.OutputViewer(String, String)

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.

File: OutputViewer.java, Line: 124, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: new usda.weru.weps.reports.OutputViewer(String, String) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: ManagementSummary.java, Line: 738, Type: UWF_UNWRITTEN_FIELD, Priority: Normal, Category: CORRECTNESS

UwF: Unwritten field: usda.weru.weps.reports.ManagementSummary.pt

This field is never written.  All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.

File: ManagementSummary.java, Line: 249, Type: REC_CATCH_EXCEPTION, Priority: Normal, Category: STYLE

REC: Exception is caught when Exception is not thrown in usda.weru.weps.reports.ManagementSummary.loadFile(String, String)

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

File: ManagementSummary.java, Line: 738, Type: NP_UNWRITTEN_FIELD, Priority: Normal, Category: CORRECTNESS

NP: Read of unwritten field pt in usda.weru.weps.reports.ManagementSummary.printPageFooter(JCPrintEvent)

The program is dereferencing a field that does not seem to ever have a non-null value written to it. Dereferencing this value will generate a null pointer exception.

File: ManagementSummary.java, Line: 207, Type: NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE, Priority: Normal, Category: STYLE

NP: Possible null pointer dereference in usda.weru.weps.reports.ManagementSummary.loadFile(String, String) due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

File: TableMeta.java, Line: 1112, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.wmrm.TableMeta$DataThreshold be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: TableMeta.java, Line: 574, Type: EI_EXPOSE_REP2, Priority: Normal, Category: MALICIOUS_CODE

EI2: usda.weru.wmrm.TableMeta.setColumnMap(int[]) may expose internal representation by storing an externally mutable object into TableMeta.c_columnMap

This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

File: TableMeta.java, Line: 457, Type: EI_EXPOSE_REP2, Priority: Normal, Category: MALICIOUS_CODE

EI2: usda.weru.wmrm.TableMeta.setRowMap(int[]) may expose internal representation by storing an externally mutable object into TableMeta.row_map

This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

File: TableMeta.java, Line: 884, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to styleNode in usda.weru.wmrm.TableMeta$ColumnMeta.fromXml(Element)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: TableMeta.java, Line: 1063, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.wmrm.TableMeta$DataAdjustment be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: DataModel.java, Line: 512, Type: EQ_COMPARETO_USE_OBJECT_EQUALS, Priority: Normal, Category: BAD_PRACTICE

Eq: usda.weru.wmrm.DataModel$RunGroup defines compareTo(Object) and uses Object.equals()

This class defines a compareTo(...) method but inherits its equals() method from java.lang.Object. Generally, the value of compareTo should return zero if and only if equals returns true. If this is violated, weird and unpredictable failures will occur in classes such as PriorityQueue. In Java 5 the PriorityQueue.remove method uses the compareTo method, while in Java 6 it uses the equals method.

From the JavaDoc for the compareTo method in the Comparable interface:

It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."

File: DataModel.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.wmrm.DataModel defines non-transient non-serializable instance field c_watcher

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: RunWrapper.java, Line: 220, Type: REC_CATCH_EXCEPTION, Priority: Normal, Category: STYLE

REC: Exception is caught when Exception is not thrown in usda.weru.wmrm.RunWrapper.loadOutputData(File)

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

File: DataModel.java, Line: 380, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.wmrm.DataModel$RunGroup be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: DataModel.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.wmrm.DataModel defines non-transient non-serializable instance field c_projects

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: DataModel.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.wmrm.DataModel defines non-transient non-serializable instance field c_otherRuns

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: DataModel.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.wmrm.DataModel defines non-transient non-serializable instance field c_selectedGroup

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: DataModel.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.wmrm.DataModel defines non-transient non-serializable instance field c_rootGroup

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: SortIconCellRenderer.java, Line: 91, Type: ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD, Priority: Normal, Category: STYLE

ST: Write to static field usda.weru.wmrm.SortIconCellRenderer.c_desc_image from instance method usda.weru.wmrm.SortIconCellRenderer.draw(Graphics, JCCellInfo, Object, boolean)

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.

File: SortIconCellRenderer.java, Line: 87, Type: ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD, Priority: Normal, Category: STYLE

ST: Write to static field usda.weru.wmrm.SortIconCellRenderer.c_asc_image from instance method usda.weru.wmrm.SortIconCellRenderer.draw(Graphics, JCCellInfo, Object, boolean)

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.

File: TableMeta.java, Line: 468, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.wmrm.TableMeta.getRowMap() may expose internal representation by returning TableMeta.row_map

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: TableMeta.java, Line: 570, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.wmrm.TableMeta.getColumnMap() may expose internal representation by returning TableMeta.c_columnMap

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: SortIconCellRenderer.java, Line: 112, Type: EI_EXPOSE_REP2, Priority: Normal, Category: MALICIOUS_CODE

EI2: usda.weru.wmrm.SortIconCellRenderer.setColumns(int[]) may expose internal representation by storing an externally mutable object into SortIconCellRenderer.c_columns

This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

File: SortIconCellRenderer.java, Line: 95, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to y in usda.weru.wmrm.SortIconCellRenderer.draw(Graphics, JCCellInfo, Object, boolean)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: SortIconCellRenderer.java, Line: 79, Type: LI_LAZY_INIT_UPDATE_STATIC, Priority: Normal, Category: MT_CORRECTNESS

LI: Incorrect lazy initialization and update of static field usda.weru.wmrm.SortIconCellRenderer.c_creator in usda.weru.wmrm.SortIconCellRenderer.draw(Graphics, JCCellInfo, Object, boolean)

This method contains an unsynchronized lazy initialization of a static field. After the field is set, the object stored into that location is further accessed. The setting of the field is visible to other threads as soon as it is set. If the futher accesses in the method that set the field serve to initialize the object, then you have a very serious multithreading bug, unless something else prevents any other thread from accessing the stored object until it is fully initialized.

File: SortIconCellRenderer.java, Line: 108, Type: EI_EXPOSE_REP2, Priority: Normal, Category: MALICIOUS_CODE

EI2: usda.weru.wmrm.SortIconCellRenderer.setDirection(int[]) may expose internal representation by storing an externally mutable object into SortIconCellRenderer.c_directions

This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

File: NameDlg.java, Line: 45, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: ex1.NameDlg.getSelected() may expose internal representation by returning NameDlg.rows

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: RunAllStations.java, Line: 160, Type: VA_FORMAT_STRING_ARG_MISMATCH, Priority: Normal, Category: CORRECTNESS

VA: Format-string method java.io.PrintStream.printf(String, Object[]) called with format string "Started %s %s %3$tH:%3$tM:%3$tS %s " wants 3 arguments but is given 4 in usda.weru.cligen2.RunAllStations.run()

A format-string method with a variable number of arguments is called, but the number of arguments passed does not match with the number of % placeholders in the format string. This is probably not what the author intended.

File: RunAllStations.java, Line: 150, Type: VA_FORMAT_STRING_ARG_MISMATCH, Priority: Normal, Category: CORRECTNESS

VA: Format-string method java.io.PrintStream.printf(String, Object[]) called with format string "Skipped %s %s %3$tH:%3$tM:%3$tS %s " wants 3 arguments but is given 4 in usda.weru.cligen2.RunAllStations.run()

A format-string method with a variable number of arguments is called, but the number of arguments passed does not match with the number of % placeholders in the format string. This is probably not what the author intended.

File: PictureChooser.java, Line: 395, Type: UG_SYNC_SET_UNSYNC_GET, Priority: Normal, Category: MT_CORRECTNESS

UG: usda.weru.erosion.PictureChooser$PictureButton.getImageFile() is unsynchronized, usda.weru.erosion.PictureChooser$PictureButton.setImageFile(File) is synchronized

This class contains similarly-named get and set methods where the set method is synchronized and the get method is not.  This may result in incorrect behavior at runtime, as callers of the get method will not necessarily see a consistent state for the object.  The get method should be made synchronized.

File: Erosion.java, Line: 219, Type: NP_LOAD_OF_KNOWN_NULL_VALUE, Priority: Normal, Category: STYLE

NP: Load of known null value in usda.weru.erosion.Erosion.configureDefaultLoggers(File, Exception)

The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull.

File: ConfigData.java, Line: 375, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.ConfigData.hasManTempSaveAsDir should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: WindDisp.java, Line: 300, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.erosion.WindDisp.getWindTimes() may expose internal representation by returning WindDisp.windTimes

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: Interpolate.java, Line: 220, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.cligen2.interp.Interpolate.testSD should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: Interpolate.java, Line: 215, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.cligen2.interp.Interpolate.TMAX_AV should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: ConfigPanel.java, Line: 415, Type: DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED, Priority: Normal, Category: BAD_PRACTICE

DP: usda.weru.erosion.ConfigPanel.getHelpSet(String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block

This code creates a classloader, which requires a security manager. If this code will be granted security permissions, but might be invoked by code that does not have security permissions, then the classloader creation needs to occur inside a doPrivileged block.

File: Interpolate.java, Line: 219, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.cligen2.interp.Interpolate.testSeries should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: ConfigData.java, Line: 1109, Type: UWF_UNWRITTEN_FIELD, Priority: Normal, Category: CORRECTNESS

UwF: Unwritten field: usda.weru.mcrew.ConfigData.calibColLabelIdx

This field is never written.  All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.

File: ConfigData.java, Line: 214, Type: WMI_WRONG_MAP_ITERATOR, Priority: Normal, Category: PERFORMANCE

WMI: Method usda.weru.mcrew.ConfigData.initialize(Hashtable) makes inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

File: ConfigData.java, Line: 1891, Type: DB_DUPLICATE_BRANCHES, Priority: Normal, Category: STYLE

DB: Method new usda.weru.mcrew.ConfigData$CellStyle(Node) uses the same code for two branches

This method uses the same code to implement two branches of a conditional branch. Check to ensure that this isn't a coding mistake.

File: ConfigData.java, Line: 1856, Type: UR_UNINIT_READ, Priority: Normal, Category: CORRECTNESS

UR: Uninitialized read of c_localStyle in new usda.weru.mcrew.ConfigData$CellStyle(Node)

This constructor reads a field which has not yet been assigned a value.  This is often caused when the programmer mistakenly uses the field instead of one of the constructor's parameters.

File: ConfigData.java, Line: 70, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.ConfigData.kDisplayUnit should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: ConfigData.java, Line: 80, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.ConfigData.kFixedColumns should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: ConfigData.java, Line: 64, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.ConfigData.returnFlg should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: ConfigData.java, Line: 1075, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of paramName in usda.weru.mcrew.ConfigData.getColumnLabels()

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$ColumnDefn.mColumnLabel

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$ColumnDefn.mColumnNum

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: 1363, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to a1 in usda.weru.mcrew.ConfigData$DataObjectDefn.initialize(Node)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ConfigData.java, Line: 1362, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to s1 in usda.weru.mcrew.ConfigData$DataObjectDefn.initialize(Node)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ConfigData.java, Line: 2290, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.ConfigData$ChoiceList.c_prompt

This field is never read.  Consider removing it from the class.

File: ConfigData.java, Line: 1403, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.ConfigData$ColumnDefn.mDisplay

This field is never read.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$ColumnDefn.mCellStyle

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$ColumnDefn.mColumnDataObject

This field is never used.  Consider removing it from the class.

File: CropDlg.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.CropDlg.BackGroundColor doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg.java, Line: 258, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to paramVec in usda.weru.mcrew.CropDlg.populateTabs()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$DataObjectDefn.mTagName

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$DataObjectDefn.mObjectName

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$DataObjectDefn.mLangFile

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$DataObjectDefn.mDisplayFile

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$DataObjectDefn.mDefnFile

This field is never used.  Consider removing it from the class.

File: ConfigData.java, Line: -1, Type: UUF_UNUSED_FIELD, Priority: Normal, Category: PERFORMANCE

UuF: Unused field: usda.weru.mcrew.ConfigData$DataObjectDefn.mDBdir

This field is never used.  Consider removing it from the class.

File: CropDlg.java, Line: 1732, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.CropDlg$ParamChanger be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: CropDlg.java, Line: 1674, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.CropDlg$NotesCrop be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: CropDlg.java, Line: 1659, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.CropDlg$ButtonEditor.getReservedKeys() may expose internal representation by returning CropDlg$ButtonEditor.keys

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: CropDlg.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.CropDlg.SelectedForegroundColor doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.CropDlg.SelectedBackgroundColor doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.CropDlg.SecondaryForegroundColor doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.CropDlg.SecondaryBackgroundColor doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.CropDlg.ForegroundColor doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg.java, Line: 621, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to row in usda.weru.mcrew.CropDlg$ParamJCTable$1.dataChanged(JCTableDataEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: CropDlg.java, Line: 530, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.CropDlg$ParamTableCSHManager be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: CropDlg.java, Line: 1392, Type: RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE, Priority: Normal, Category: CORRECTNESS

RCN: Nullcheck of valueAttribute at line 1410 of value previously dereferenced in usda.weru.mcrew.CropDlg$ParamJCTable.saveDataSource(CropObject)

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.

File: CropDlg.java, Line: 622, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to col in usda.weru.mcrew.CropDlg$ParamJCTable$1.dataChanged(JCTableDataEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: CropDlg.java, Line: 1125, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to numCols in usda.weru.mcrew.CropDlg$ParamJCTable.setData(CropObject)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: CropDlg.java, Line: 858, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to numCols in usda.weru.mcrew.CropDlg$ParamJCTable.setDataTab(CropObject, Vector)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: CropDlg.java, Line: 1344, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to numCols in usda.weru.mcrew.CropDlg$ParamJCTable.saveDataSource(CropObject)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: CropDlg.java, Line: 1492, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to numCols in usda.weru.mcrew.CropDlg$ParamJCTable.saveTabDataSource(CropObject, Vector)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: DisplayCalendar.java, Line: 84, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to size in usda.weru.mcrew.DisplayCalendar.setVisible(boolean)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: DisplayCalendar.java, Line: 222, Type: ICAST_IDIV_CAST_TO_DOUBLE, Priority: Normal, Category: STYLE

ICAST: int division result cast to double or float in usda.weru.mcrew.DisplayCalendar.setColumnWidths()

This code casts the result of an integer division operation to double or float. Doing division on integers truncates the result to the integer value closest to zero. The fact that the result was cast to double suggests that this precision should have been retained. What was probably meant was to cast one or both of the operands to double before performing the division. Here is an example:

int x = 2;
int y = 5;
// Wrong: yields result 0.0
double value1 =  x / y;

// Right: yields result 0.4
double value2 =  x / (double) y;

File: DisplayCalendar.java, Line: 62, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to dax in new usda.weru.mcrew.DisplayCalendar(JFrame, GregorianCalendar)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: DisplayCalendar.java, Line: 83, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to bounds in usda.weru.mcrew.DisplayCalendar.setVisible(boolean)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: CropMeta.java, Line: 498, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.CropMeta.getParameters() may expose internal representation by returning CropMeta.mParameters

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: DisplayCalendar.java, Line: 106, Type: DE_MIGHT_IGNORE, Priority: Normal, Category: BAD_PRACTICE

DE: usda.weru.mcrew.DisplayCalendar.main(String[]) might ignore java.lang.Exception

This method might ignore an exception.  In general, exceptions should be handled or reported in some way, or they should be thrown out of the method.

File: CropMeta.java, Line: 364, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.CropMeta.getCropCatAndParams() may expose internal representation by returning CropMeta.cropCatAndParams

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: CropMeta.java, Line: 318, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.CropMeta.getCropDisCatAndVal() may expose internal representation by returning CropMeta.cropDisCatAndVal

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: FileDropDown.java, Line: 250, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.FileDropDown.getReservedKeys() may expose internal representation by returning FileDropDown.KEY_MODIFIERS

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: DisplayCalendar.java, Line: 235, Type: ICAST_IDIV_CAST_TO_DOUBLE, Priority: Normal, Category: STYLE

ICAST: int division result cast to double or float in usda.weru.mcrew.DisplayCalendar.setRowHeights()

This code casts the result of an integer division operation to double or float. Doing division on integers truncates the result to the integer value closest to zero. The fact that the result was cast to double suggests that this precision should have been retained. What was probably meant was to cast one or both of the operands to double before performing the division. Here is an example:

int x = 2;
int y = 5;
// Wrong: yields result 0.0
double value1 =  x / y;

// Right: yields result 0.4
double value2 =  x / (double) y;

File: SkelImportPanel.java, Line: 2195, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.mcrew.FindReplacePanel$2 stored into non-transient field FindReplacePanel.cancelbut

A non-serializable value is stored into a non-transient field of a serializable class.

File: FileDropDown.java, Line: 61, Type: MS_FINAL_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.FileDropDown.KEY_MODIFIERS should be both final and package protected

A mutable static field could be changed by malicious code or by accident from another package. The field could be made package protected and/or made final to avoid this vulnerability.

File: Identity.java, Line: 125, Type: BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS, Priority: Normal, Category: BAD_PRACTICE

BC: Equals method for usda.weru.mcrew.Identity assumes the argument is of type Identity

The equals(Object o) method shouldn't make any assumptions about the type of o. It should simply return false if o is not the same type as this.

File: SkelImportPanel.java, Line: 2188, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.mcrew.FindReplacePanel$1 stored into non-transient field FindReplacePanel.okbut

A non-serializable value is stored into a non-transient field of a serializable class.

File: Identity.java, Line: 136, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.Identity.toString() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: Identity.java, Line: 162, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.Identity.getNode(Document) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: SkelImportPanel.java, Line: 307, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.ImTableModel.getValueAt(int, int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: Identity.java, Line: 125, Type: NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT, Priority: Normal, Category: BAD_PRACTICE

NP: usda.weru.mcrew.Identity.equals(Object) does not check for null argument

This implementation of equals(Object) violates the contract defined by java.lang.Object.equals() because it does not check for null being passed as the argument. All equals() methods should return false if passed a null value.

File: JulianDay.java, Line: 832, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to yr in usda.weru.mcrew.JulianDay.set(int, double)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: JulianCalendar.java, Line: 201, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.JulianCalendar.toString() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: ManageData.java, Line: 524, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to maxYear in usda.weru.mcrew.ManageData.cycleBackward(int)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ManageData.java, Line: 1844, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to minYear in usda.weru.mcrew.ManageData.checkRotationYears()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ManageData.java, Line: 480, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to maxYear in usda.weru.mcrew.ManageData.cycleForward(int)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ManageData.java, Line: 525, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to minYear in usda.weru.mcrew.ManageData.cycleBackward(int)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ManageData.java, Line: 481, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to minYear in usda.weru.mcrew.ManageData.cycleForward(int)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ManageData.java, Line: 1494, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.ManageData.checkEmptyRows() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: ManageData.java, Line: 1474, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.ManageData.checkIfAllDatesPresent() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: ManageData.java, Line: 1219, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.ManageData.writeManFile(String, ManageData$WriteFileMode) invokes inefficient new Character(char) constructor; use Character.valueOf(char) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: ManageData.java, Line: 1238, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.ManageData.writeManFile(String, ManageData$WriteFileMode) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: ManageData.java, Line: 843, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.ManageData.writeXMLFile(String, ManageData$WriteFileMode) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: ManageData.java, Line: 161, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.ManageData.mwepsmanfilenoteslines should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: ManageData.java, Line: 1182, Type: RV_RETURN_VALUE_IGNORED_BAD_PRACTICE, Priority: Normal, Category: BAD_PRACTICE

RV: usda.weru.mcrew.ManageData.writeDataFile(String, ManageData$WriteFileMode) ignores exceptional return value of java.io.File.mkdirs()

This method returns a value that is not checked. The return value should be checked since it can indication an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

File: ManageData.java, Line: 1530, Type: SBSC_USE_STRINGBUFFER_CONCATENATION, Priority: Normal, Category: PERFORMANCE

SBSC: Method usda.weru.mcrew.ManageData.prettyConcat(String, String) concatenates strings using + in a loop

The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.

For example:

  // This is bad
  String s = "";
  for (int i = 0; i < field.length; ++i) {
    s = s + field[i];
  }

  // This is better
  StringBuffer buf = new StringBuffer();
  for (int i = 0; i < field.length; ++i) {
    buf.append(field[i]);
  }
  String s = buf.toString();

File: ManageData.java, Line: 1096, Type: SBSC_USE_STRINGBUFFER_CONCATENATION, Priority: Normal, Category: PERFORMANCE

SBSC: Method usda.weru.mcrew.ManageData.readManFile(String) concatenates strings using + in a loop

The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.

For example:

  // This is bad
  String s = "";
  for (int i = 0; i < field.length; ++i) {
    s = s + field[i];
  }

  // This is better
  StringBuffer buf = new StringBuffer();
  for (int i = 0; i < field.length; ++i) {
    buf.append(field[i]);
  }
  String s = buf.toString();

File: ManageData.java, Line: 1399, Type: SBSC_USE_STRINGBUFFER_CONCATENATION, Priority: Normal, Category: PERFORMANCE

SBSC: Method usda.weru.mcrew.ManageData.writeManFile(String, ManageData$WriteFileMode) concatenates strings using + in a loop

The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.

For example:

  // This is bad
  String s = "";
  for (int i = 0; i < field.length; ++i) {
    s = s + field[i];
  }

  // This is better
  StringBuffer buf = new StringBuffer();
  for (int i = 0; i < field.length; ++i) {
    buf.append(field[i]);
  }
  String s = buf.toString();

File: ManageData.java, Line: 1212, Type: UPM_UNCALLED_PRIVATE_METHOD, Priority: Normal, Category: PERFORMANCE

UPM: Private method usda.weru.mcrew.ManageData.writeManFile(String) is never called

This private method is never called. Although it is possible that the method will be invoked through reflection, it is more likely that the method is never used, and should be removed.

File: ManageData.java, Line: 803, Type: UPM_UNCALLED_PRIVATE_METHOD, Priority: Normal, Category: PERFORMANCE

UPM: Private method usda.weru.mcrew.ManageData.writeXMLFile(String) is never called

This private method is never called. Although it is possible that the method will be invoked through reflection, it is more likely that the method is never used, and should be removed.

File: Mcrew.java, Line: 2973, Type: NP_NULL_PARAM_DEREF, Priority: Normal, Category: CORRECTNESS

NP: Method call in usda.weru.mcrew.Mcrew.ManToSkelRec_actionPerformed(ActionEvent) passes null for unconditionally dereferenced parameter of convertToManOrSkelRec(String, String, Vector, int, ManageData$WriteFileMode)

This method call passes a null value to a method which might dereference it unconditionally.

File: Mcrew.java, Line: 3097, Type: NP_NULL_PARAM_DEREF, Priority: Normal, Category: CORRECTNESS

NP: Method call in usda.weru.mcrew.Mcrew.SkelToManRec_actionPerformed(ActionEvent) passes null for unconditionally dereferenced parameter of convertToManOrSkelRec(String, String, Vector, int, ManageData$WriteFileMode)

This method call passes a null value to a method which might dereference it unconditionally.

File: MyArrayEditor.java, Line: 166, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.MyArrayEditor.getCellEditorValue() may expose internal representation by returning MyArrayEditor.c_newValues

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: OperationDlg.java, Line: 871, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to numCols in usda.weru.mcrew.OperationDlg$ActionJCTable.setData(Action)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: OperationDlg.java, Line: 1120, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to numCols in usda.weru.mcrew.OperationDlg$ActionJCTable.saveDataSource()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: MyDateCellEditor.java, Line: 213, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.MyDateCellEditor.getReservedKeys() may expose internal representation by returning MyDateCellEditor.reservedKeys

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: MyCheckBoxCellEditor.java, Line: 33, Type: NP_LOAD_OF_KNOWN_NULL_VALUE, Priority: Normal, Category: STYLE

NP: Load of known null value in usda.weru.mcrew.MyCheckBoxCellEditor.initialize(AWTEvent, JCCellInfo, Object)

The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull.

File: OperationDlg.java, Line: 1243, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.OperationDlg$NotesOperation be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: OperationDlg.java, Line: 598, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.OperationDlg$ActionTableCSHManager be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: OperationDlg.java, Line: 680, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to row in usda.weru.mcrew.OperationDlg$ActionJCTable$1.dataChanged(JCTableDataEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: OperationDlg.java, Line: 681, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to col in usda.weru.mcrew.OperationDlg$ActionJCTable$1.dataChanged(JCTableDataEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ParameterMeta.java, Line: 43, Type: MS_SHOULD_BE_FINAL, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.ParameterMeta.kMaximumFractionDigits isn't final but should be

A mutable static field could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

File: Parameter.java, Line: 82, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of Parameter.mParameter in usda.weru.mcrew.Parameter.setValue(Object)

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: OperationMeta.java, Line: 162, Type: RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE, Priority: Normal, Category: CORRECTNESS

RCN: Nullcheck of pAction at line 163 of value previously dereferenced in usda.weru.mcrew.OperationMeta.addAction(ActionMeta)

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.

File: OperationMeta.java, Line: 57, Type: EI_EXPOSE_REP2, Priority: Normal, Category: MALICIOUS_CODE

EI2: new usda.weru.mcrew.OperationMeta(Hashtable, String) may expose internal representation by storing an externally mutable object into OperationMeta.mActions

This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

File: RowInfo.java, Line: 352, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.mcrew.RowInfo.getAllDataObjects() may expose internal representation by returning RowInfo.mDataObjectTable

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: RowInfo.java, Line: 321, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to oldCropName in usda.weru.mcrew.RowInfo.addDataObject(String, DataObject)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: RowInfo.java, Line: 309, Type: BC_UNCONFIRMED_CAST, Priority: Normal, Category: STYLE

BC: Unchecked/unconfirmed cast from usda.weru.mcrew.DataObject to usda.weru.mcrew.OperationObject in usda.weru.mcrew.RowInfo.addDataObject(String, DataObject)

This cast is unchecked, and not all instances of the type casted from can be cast to the type it is being cast to. Ensure that your program logic ensures that this cast will not fail.

File: RowInfo.java, Line: 339, Type: BC_UNCONFIRMED_CAST, Priority: Normal, Category: STYLE

BC: Unchecked/unconfirmed cast from usda.weru.mcrew.DataObject to usda.weru.mcrew.CropObject in usda.weru.mcrew.RowInfo.addDataObject(String, DataObject)

This cast is unchecked, and not all instances of the type casted from can be cast to the type it is being cast to. Ensure that your program logic ensures that this cast will not fail.

File: SkelImportPanel.java, Line: 1074, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to result in usda.weru.mcrew.SkelImportPanel.loadRUSLE2TranslationTable()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: SkelImportPanel.java, Line: 772, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.mcrew.SkelImportPanel$1 stored into non-transient field SkelImportPanel.cancelAll

A non-serializable value is stored into a non-transient field of a serializable class.

File: RowInfo.java, Line: 429, Type: EQ_COMPARETO_USE_OBJECT_EQUALS, Priority: Normal, Category: BAD_PRACTICE

Eq: usda.weru.mcrew.RowInfo defines compareTo(RowInfo) and uses Object.equals()

This class defines a compareTo(...) method but inherits its equals() method from java.lang.Object. Generally, the value of compareTo should return zero if and only if equals returns true. If this is violated, weird and unpredictable failures will occur in classes such as PriorityQueue. In Java 5 the PriorityQueue.remove method uses the compareTo method, while in Java 6 it uses the equals method.

From the JavaDoc for the compareTo method in the Comparable interface:

It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."

File: RowInfo.java, Line: 109, Type: UR_UNINIT_READ, Priority: Normal, Category: CORRECTNESS

UR: Uninitialized read of mDataObjectTable in new usda.weru.mcrew.RowInfo(JulianCalendar, DataObject)

This constructor reads a field which has not yet been assigned a value.  This is often caused when the programmer mistakenly uses the field instead of one of the constructor's parameters.

File: SkelImportPanel.java, Line: 882, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.mcrew.SkelImportPanel$5 stored into non-transient field SkelImportPanel.replaceLoc

A non-serializable value is stored into a non-transient field of a serializable class.

File: SkelImportPanel.java, Line: 797, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.mcrew.SkelImportPanel$2 stored into non-transient field SkelImportPanel.skipped

A non-serializable value is stored into a non-transient field of a serializable class.

File: SkelImportPanel.java, Line: 807, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.mcrew.SkelImportPanel$3 stored into non-transient field SkelImportPanel.ok

A non-serializable value is stored into a non-transient field of a serializable class.

File: SkelImportPanel.java, Line: 822, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.mcrew.SkelImportPanel$4 stored into non-transient field SkelImportPanel.replace

A non-serializable value is stored into a non-transient field of a serializable class.

File: SkelImportPanel.java, Line: 1925, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.SkelImportPanel$OprnCropFilter be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: SkeletonUpdater.java, Line: 40, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.SkeletonUpdater.readWEPSManBrief(String) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: SkelImportPanel.java, Line: 824, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to lastRow in usda.weru.mcrew.SkelImportPanel$4.actionPerformed(ActionEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: SkelImportPanel.java, Line: 885, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to lastRow in usda.weru.mcrew.SkelImportPanel$5.actionPerformed(ActionEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: SkeletonUpdater.java, Line: 140, Type: RV_RETURN_VALUE_IGNORED_BAD_PRACTICE, Priority: Normal, Category: BAD_PRACTICE

RV: usda.weru.mcrew.SkeletonUpdater.writeSkeletonXMLFile(String) ignores exceptional return value of java.io.File.mkdirs()

This method returns a value that is not checked. The return value should be checked since it can indication an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

File: Table.java, Line: 851, Type: BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION, Priority: Normal, Category: PERFORMANCE

Bx: Primitive value is boxed then unboxed to perform primative coercion in usda.weru.mcrew.Table.adjustDirection()

A primitive boxed value constructed and then immediately converted into a different primitive type (e.g., new Double(d).intValue()). Just perform direct primitive coercion (e.g., (int) d).

File: SkeletonUpdater.java, Line: 79, Type: NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE, Priority: Normal, Category: STYLE

NP: Possible null pointer dereference in usda.weru.mcrew.SkeletonUpdater.readWEPSManBrief(String) due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

File: SkeletonUpdater.java, Line: 95, Type: NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE, Priority: Normal, Category: STYLE

NP: Possible null pointer dereference in usda.weru.mcrew.SkeletonUpdater.readWEPSManBrief(String) due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

File: Table.java, Line: 368, Type: NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT, Priority: Normal, Category: BAD_PRACTICE

NP: usda.weru.mcrew.Table$CompareRange.equals(Object) does not check for null argument

This implementation of equals(Object) violates the contract defined by java.lang.Object.equals() because it does not check for null being passed as the argument. All equals() methods should return false if passed a null value.

File: Table.java, Line: 364, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.Table$CompareRange be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: Table.java, Line: 1590, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.Table$MyMouseAdapter.cnt

This field is never read.  Consider removing it from the class.

File: XMLConstants.java, Line: 794, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.XMLConstants.XMLDescriptionfiles should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: Table.java, Line: 851, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.Table.adjustDirection() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: Table.java, Line: 960, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.Table.incrDecrDir(int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: Table.java, Line: 873, Type: DM_NUMBER_CTOR, Priority: Normal, Category: PERFORMANCE

Bx: Method usda.weru.mcrew.Table.setAbsoluteDirection(int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.

File: Table.java, Line: 368, Type: BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS, Priority: Normal, Category: BAD_PRACTICE

BC: Equals method for usda.weru.mcrew.Table$CompareRange assumes the argument is of type Table$CompareRange

The equals(Object o) method shouldn't make any assumptions about the type of o. It should simply return false if o is not the same type as this.

File: Table.java, Line: 340, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to startRow in usda.weru.mcrew.Table.afterSelect(JCSelectEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Table.java, Line: 555, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to jccr in usda.weru.mcrew.Table.cutRows()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Table.java, Line: 1220, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to jccr in usda.weru.mcrew.Table.isOneRowSelected(String)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Table.java, Line: 610, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to rowCnt in usda.weru.mcrew.Table.pasteRows()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Table.java, Line: 960, Type: BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION, Priority: Normal, Category: PERFORMANCE

Bx: Primitive value is boxed then unboxed to perform primative coercion in usda.weru.mcrew.Table.incrDecrDir(int)

A primitive boxed value constructed and then immediately converted into a different primitive type (e.g., new Double(d).intValue()). Just perform direct primitive coercion (e.g., (int) d).

File: Table.java, Line: 1504, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to dirPath in usda.weru.mcrew.Table.addColumnData(File)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Table.java, Line: 1501, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to fileExtension in usda.weru.mcrew.Table.addColumnData(File)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Table.java, Line: 341, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to endRow in usda.weru.mcrew.Table.afterSelect(JCSelectEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.AboutJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.gui.Mcrew_n.UndoDeleteJMI should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.ConfigurationJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.ColumnOptionsJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.CropDlg_n.ParamPanel doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: CropDlg_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.CropDlg_n.CancelButton doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: 1521, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to menuBarHeight in usda.weru.mcrew.gui.Mcrew_n.addNotify()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: CropDlg_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.CropDlg_n.SaveAsJButton doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: XMLManagementUpdater.java, Line: 27, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.XMLManagementUpdater.substNamesLong

This field is never read.  Consider removing it from the class.

File: XMLManagementUpdater.java, Line: 26, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.XMLManagementUpdater.missingNames

This field is never read.  Consider removing it from the class.

File: XMLManagementUpdater.java, Line: 43, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.mcrew.XMLManagementUpdater$XMLFileFilter be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: XMLManagementUpdater.java, Line: 28, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.XMLManagementUpdater.substNamesShort

This field is never read.  Consider removing it from the class.

File: XMLManagementUpdater.java, Line: 166, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to basedir in usda.weru.mcrew.XMLManagementUpdater.doRecursion(String, boolean, String)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: XMLDoc.java, Line: 40, Type: MS_PKGPROTECT, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.mcrew.XMLDoc.defaultDTDfiles should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

File: XMLManagementUpdater.java, Line: 25, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.XMLManagementUpdater.fileshort

This field is never read.  Consider removing it from the class.

File: XMLManagementUpdater.java, Line: 24, Type: URF_UNREAD_FIELD, Priority: Normal, Category: PERFORMANCE

UrF: Unread field: usda.weru.mcrew.XMLManagementUpdater.filelong

This field is never read.  Consider removing it from the class.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.NotesJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.OpenCTJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.InsertJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.NewJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.HelpJM doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.HelpJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.ExitJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.FileJM doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.EditJM doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.EmailJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.CycleFwdJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.DeleteJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.CutJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.CycleBwdJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.ConfigureJM doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.CopyJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: IFC.java, Line: 1092, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.soil.IFC.getToolTipText(int) may expose internal representation by returning IFC.layerList

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: IFC.java, Line: 1090, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.soil.IFC.getToolTipText(int) may expose internal representation by returning IFC.idList

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: OperationDlg_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.OperationDlg_n.DateField doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.ViewJM doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.UpdateWepsJM doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.UpdateRecJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.UpdateFilesJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.UndoDeleteJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.ToolsJM doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.SortJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.SaveJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.SaveAsTJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.SaveAsJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.PrintJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.PasteJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: Mcrew_n.java, Line: -1, Type: NM_FIELD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The field name usda.weru.mcrew.gui.Mcrew_n.OpenJMI doesn't start with a lower case letter

Names of fields that are not final should be in mixed case with a lowercase first letter and the first letters of subsequent words capitalized.

File: SoilTreeModel.java, Line: 248, Type: RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE, Priority: Normal, Category: CORRECTNESS

RCN: Nullcheck of rootFile at line 251 of value previously dereferenced in usda.weru.soil.SoilTreeModel.getFriendlyName(File, File)

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.

File: SoilTreeModel.java, Line: 275, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.soil.SoilTreeModel$IFCFileFilter be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: ConfigData.java, Line: 599, Type: IS2_INCONSISTENT_SYNC, Priority: Normal, Category: MT_CORRECTNESS

IS: Inconsistent synchronization of usda.weru.util.ConfigData.c_mainConfig; locked 75% of time

The fields of this class appear to be accessed inconsistently with respect to synchronization.  This bug report indicates that the bug pattern detector judged that

  1. The class contains a mix of locked and unlocked accesses,
  2. At least one locked access was performed by one of the class's own methods, and
  3. The number of unsynchronized field accesses (reads and writes) was no more than one third of all accesses, with writes being weighed twice as high as reads

A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.

You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.

Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held.  Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.

This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.

File: ConfigData.java, Line: 508, Type: IS2_INCONSISTENT_SYNC, Priority: Normal, Category: MT_CORRECTNESS

IS: Inconsistent synchronization of usda.weru.util.ConfigData$ConfigStorage.c_data; locked 60% of time

The fields of this class appear to be accessed inconsistently with respect to synchronization.  This bug report indicates that the bug pattern detector judged that

  1. The class contains a mix of locked and unlocked accesses,
  2. At least one locked access was performed by one of the class's own methods, and
  3. The number of unsynchronized field accesses (reads and writes) was no more than one third of all accesses, with writes being weighed twice as high as reads

A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.

You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.

Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held.  Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.

This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.

File: FileTreeNode.java, Line: 141, Type: SE_COMPARATOR_SHOULD_BE_SERIALIZABLE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.util.FileTreeNode$DefaultComparator implements Comparator but not Serializable

This class implements the Comparator interface. You should consider whether or not it should also implement the Serializable interface. If a comparator is used to construct an ordered collection such as a TreeMap, then the TreeMap will be serializable only if the comparator is also serializable. As most comparators have little or no state, making them serializable is generally easy and good defensive programming.

File: Help.java, Line: 138, Type: DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED, Priority: Normal, Category: BAD_PRACTICE

DP: usda.weru.util.Help.loadJar(String, String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block

This code creates a classloader, which requires a security manager. If this code will be granted security permissions, but might be invoked by code that does not have security permissions, then the classloader creation needs to occur inside a doPrivileged block.

File: Help.java, Line: 219, Type: REC_CATCH_EXCEPTION, Priority: Normal, Category: STYLE

REC: Exception is caught when Exception is not thrown in usda.weru.util.Help.loadDirectory(String)

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

File: LazyTree.java, Line: 72, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.util.LazyTree$LoadingNode$1 stored into non-transient field LazyTree$LoadingNode.c_nodeTask

A non-serializable value is stored into a non-transient field of a serializable class.

File: IFC.java, Line: 1091, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.soil.IFC.getToolTipText(int) may expose internal representation by returning IFC.surfaceList

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: IfcSoilDatabase.java, Line: 171, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.soil.IfcSoilDatabase$IfcNode be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: IfcSoilDatabase.java, Line: 151, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.soil.IfcSoilDatabase$NodeComparator be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: JdbcSoilDatabase.java, Line: 151, Type: UWF_UNWRITTEN_FIELD, Priority: Normal, Category: CORRECTNESS

UwF: Unwritten field: usda.weru.soil.JdbcSoilDatabase.c_indexer

This field is never written.  All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.

File: JdbcSoilDatabase.java, Line: 191, Type: ODR_OPEN_DATABASE_RESOURCE, Priority: Normal, Category: BAD_PRACTICE

ODR: usda.weru.soil.JdbcSoilDatabase$DatabaseNode.addNotify() may fail to close java.sql.Statement

The method creates a database resource (such as a database connection or row set), does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the object on all paths out of the method.  Failure to close database resources on all paths out of a method may result in poor performance, and could cause the application to have problems communicating with the database.

File: JdbcSoilDatabase.java, Line: 233, Type: ODR_OPEN_DATABASE_RESOURCE, Priority: Normal, Category: BAD_PRACTICE

ODR: usda.weru.soil.JdbcSoilDatabase$LegendNode.addNotify() may fail to close java.sql.Statement

The method creates a database resource (such as a database connection or row set), does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the object on all paths out of the method.  Failure to close database resources on all paths out of a method may result in poor performance, and could cause the application to have problems communicating with the database.

File: JdbcSoilDatabase.java, Line: 280, Type: ODR_OPEN_DATABASE_RESOURCE, Priority: Normal, Category: BAD_PRACTICE

ODR: usda.weru.soil.JdbcSoilDatabase$MapUnitNode.addNotify() may fail to close java.sql.Statement

The method creates a database resource (such as a database connection or row set), does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the object on all paths out of the method.  Failure to close database resources on all paths out of a method may result in poor performance, and could cause the application to have problems communicating with the database.

File: JdbcSoilDatabase.java, Line: 332, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.soil.JdbcSoilDatabase$NodeComparator be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: WEPSPrintPreviewer.java, Line: 146, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to jcpage in usda.weru.util.WEPSPrintPreviewer.actionPerformed(ActionEvent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Util.java, Line: 128, Type: RV_RETURN_VALUE_IGNORED_BAD_PRACTICE, Priority: Normal, Category: BAD_PRACTICE

RV: usda.weru.util.Util.copyFile(File, File) ignores exceptional return value of java.io.File.mkdirs()

This method returns a value that is not checked. The return value should be checked since it can indication an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

File: WepsMessage.java, Line: 112, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.util.WepsMessage.getTimestamp() may expose internal representation by returning WepsMessage.c_timestamp

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: WepsFileChooser.java, Line: 189, Type: ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD, Priority: Normal, Category: STYLE

ST: Write to static field usda.weru.util.WepsFileChooser.newFlg from instance method new usda.weru.util.WepsFileChooser(int, String, int)

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.

File: WindGenStationDisplay.java, Line: 123, Type: SC_START_IN_CTOR, Priority: Normal, Category: MT_CORRECTNESS

SC: new usda.weru.util.WindGenStationDisplay(String, String) invokes Thread.start()

The constructor starts a thread. This is likely to be wrong if the class is ever extended/subclassed, since the thread will be started before the subclass constructor is started.

File: WindGenDisp.java, Line: 175, Type: LI_LAZY_INIT_UPDATE_STATIC, Priority: Normal, Category: MT_CORRECTNESS

LI: Incorrect lazy initialization and update of static field usda.weru.util.WindGenDisp.staList in usda.weru.util.WindGenDisp.loadData(String)

This method contains an unsynchronized lazy initialization of a static field. After the field is set, the object stored into that location is further accessed. The setting of the field is visible to other threads as soon as it is set. If the futher accesses in the method that set the field serve to initialize the object, then you have a very serious multithreading bug, unless something else prevents any other thread from accessing the stored object until it is fully initialized.

File: FileListBuilder.java, Line: 68, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of dirB in usda.weru.util.diff.listbuilders.FileListBuilder.buildDirectoryList(File, File)

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: FileListBuilder.java, Line: 67, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of dirA in usda.weru.util.diff.listbuilders.FileListBuilder.buildDirectoryList(File, File)

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: Table.java, Line: 1122, Type: WMI_WRONG_MAP_ITERATOR, Priority: Normal, Category: PERFORMANCE

WMI: Method usda.weru.util.Table.colorRows(Hashtable, int, int, int) makes inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

File: PrinterHelper.java, Line: 110, Type: ICAST_IDIV_CAST_TO_DOUBLE, Priority: Normal, Category: STYLE

ICAST: int division result cast to double or float in usda.weru.util.PrinterHelper.createParamMap(RepSumPanel, RepSimPanel)

This code casts the result of an integer division operation to double or float. Doing division on integers truncates the result to the integer value closest to zero. The fact that the result was cast to double suggests that this precision should have been retained. What was probably meant was to cast one or both of the operands to double before performing the division. Here is an example:

int x = 2;
int y = 5;
// Wrong: yields result 0.0
double value1 =  x / y;

// Right: yields result 0.4
double value2 =  x / (double) y;

File: Table.java, Line: 782, Type: WMI_WRONG_MAP_ITERATOR, Priority: Normal, Category: PERFORMANCE

WMI: Method usda.weru.util.Table.parseHeaders(Hashtable, String) makes inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

File: Table.java, Line: 1534, Type: WMI_WRONG_MAP_ITERATOR, Priority: Normal, Category: PERFORMANCE

WMI: Method usda.weru.util.Table.getColumnWidths(int, Hashtable) makes inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

File: Util.java, Line: 877, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to fm in usda.weru.util.Util.adjustLabelWidth(JComponent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Table.java, Line: 354, Type: WMI_WRONG_MAP_ITERATOR, Priority: Normal, Category: PERFORMANCE

WMI: Method usda.weru.util.Table.setColumnStyles(Hashtable, JCTable, int, int, int) makes inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

File: Util.java, Line: 641, Type: MS_SHOULD_BE_FINAL, Priority: Normal, Category: MALICIOUS_CODE

MS: usda.weru.util.Util.debugFlg isn't final but should be

A mutable static field could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

File: Util.java, Line: 876, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to text in usda.weru.util.Util.adjustLabelWidth(JComponent)

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: Data.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.util.table.test.Data defines non-transient non-serializable instance field c_meta

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: BarDialog.java, Line: 357, Type: DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED, Priority: Normal, Category: BAD_PRACTICE

DP: usda.weru.weps.BarDialog.getHelpSet(String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block

This code creates a classloader, which requires a security manager. If this code will be granted security permissions, but might be invoked by code that does not have security permissions, then the classloader creation needs to occur inside a doPrivileged block.

File: WepsTable.java, Line: 147, Type: NM_METHOD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The method name usda.weru.util.table.WepsTable.YtoRow(int) doesn't start with a lower case letter

Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.

File: WepsTableMeta.java, Line: 499, Type: EI_EXPOSE_REP, Priority: Normal, Category: MALICIOUS_CODE

EI: usda.weru.util.table.WepsTableMeta.getLabelMatrix() may expose internal representation by returning WepsTableMeta.c_labelMatrix

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

File: BarPanel.java, Line: 788, Type: NP_NULL_PARAM_DEREF, Priority: Normal, Category: CORRECTNESS

NP: Method call in usda.weru.weps.BarPanel.selectBarrierType(ItemEvent) passes null for unconditionally dereferenced parameter of java.util.Hashtable.containsKey(Object)

This method call passes a null value to a method which might dereference it unconditionally.

File: Barrier.java, Line: 87, Type: RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE, Priority: Normal, Category: CORRECTNESS

RCN: Nullcheck of Barrier.name at line 87 of value previously dereferenced in usda.weru.weps.Barrier.equals(Object)

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.

File: BarDialog.java, Line: 361, Type: REC_CATCH_EXCEPTION, Priority: Normal, Category: STYLE

REC: Exception is caught when Exception is not thrown in usda.weru.weps.BarDialog.getHelpSet(String)

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

File: BarPanel.java, Line: 292, Type: NP_NULL_PARAM_DEREF, Priority: Normal, Category: CORRECTNESS

NP: Method call in usda.weru.weps.BarPanel.JB_detail_actionPerformed(ActionEvent) passes null for unconditionally dereferenced parameter of new BarDialog(Frame, String, String, Barrier, PropertyChangeSupport, String, String)

This method call passes a null value to a method which might dereference it unconditionally.

File: RunDirectoryListBuilder.java, Line: 58, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of dirB in usda.weru.util.diff.listbuilders.RunDirectoryListBuilder.buildList(DiffEngine, WepsFileListBuilder$RunDirectory, WepsFileListBuilder$RunDirectory)

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: CellStyle.java, Line: -1, Type: SE_BAD_FIELD, Priority: Normal, Category: BAD_PRACTICE

Se: Class usda.weru.util.table.CellStyle defines non-transient non-serializable instance field c_meta

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.

File: ObjectListBuilder.java, Line: 41, Type: NP_GUARANTEED_DEREF, Priority: Normal, Category: CORRECTNESS

NP: a could be null and is guaranteed to be dereferenced in usda.weru.util.diff.listbuilders.ObjectListBuilder.test(Class, Object, Object)

There is a statement or branch that if executed guarantees that a value is null at this point, and that value that is guaranteed to be dereferenced (except on forward paths involving runtime exceptions).

File: RunDirectoryListBuilder.java, Line: 57, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of dirA in usda.weru.util.diff.listbuilders.RunDirectoryListBuilder.buildList(DiffEngine, WepsFileListBuilder$RunDirectory, WepsFileListBuilder$RunDirectory)

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: WepsTable.java, Line: 417, Type: IS2_INCONSISTENT_SYNC, Priority: Normal, Category: MT_CORRECTNESS

IS: Inconsistent synchronization of usda.weru.util.table.WepsTable.c_parseListeners; locked 66% of time

The fields of this class appear to be accessed inconsistently with respect to synchronization.  This bug report indicates that the bug pattern detector judged that

  1. The class contains a mix of locked and unlocked accesses,
  2. At least one locked access was performed by one of the class's own methods, and
  3. The number of unsynchronized field accesses (reads and writes) was no more than one third of all accesses, with writes being weighed twice as high as reads

A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.

You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.

Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held.  Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.

This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.

File: WepsTable.java, Line: 157, Type: NM_METHOD_NAMING_CONVENTION, Priority: Normal, Category: BAD_PRACTICE

Nm: The method name usda.weru.util.table.WepsTable.XtoColumn(int) doesn't start with a lower case letter

Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.

File: WepsPrintTable.java, Line: -1, Type: MF_CLASS_MASKS_FIELD, Priority: Normal, Category: CORRECTNESS

MF: Field WepsPrintTable.cellAreaHandler masks field in superclass com.klg.jclass.table.JCTable

This class defines a field with the same name as a visible instance field in a superclass. This is confusing, and may indicate an error if methods update or access one of the fields when they wanted the other.

File: WepsPrintTable.java, Line: 877, Type: SIC_INNER_SHOULD_BE_STATIC, Priority: Normal, Category: PERFORMANCE

SIC: Should usda.weru.util.table.WepsPrintTable$WepsPrintCellAreaHandler be a _static_ inner class?

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

File: Weps.java, Line: 2270, Type: DM_EXIT, Priority: Normal, Category: BAD_PRACTICE

Dm: usda.weru.weps.Weps$LoadCP.createProj() invokes System.exit(...), which shuts down the entire virtual machine

Invoking System.exit 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.

File: Weps.java, Line: 281, Type: NP_NULL_PARAM_DEREF, Priority: Normal, Category: CORRECTNESS

NP: Method call in usda.weru.weps.Weps$3.accept(File) passes null for unconditionally dereferenced parameter of java.util.Date.after(Date)

This method call passes a null value to a method which might dereference it unconditionally.

File: Weps.java, Line: 630, Type: SE_BAD_FIELD_STORE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.weps.Weps$4 stored into non-transient field Weps.fileWatcher

A non-serializable value is stored into a non-transient field of a serializable class.

File: Weps.java, Line: 750, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of current in usda.weru.weps.Weps.makeProjDir()

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: DetailReport.java, Line: 151, Type: RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE, Priority: Normal, Category: CORRECTNESS

RCN: Nullcheck of hs at line 155 of value previously dereferenced in usda.weru.weps.reports.DetailReport.initCSH()

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.

File: CropSummary.java, Line: 245, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: usda.weru.weps.reports.CropSummary.makeSummaryVector(Vector, String) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: CropSummary.java, Line: 901, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: new usda.weru.weps.reports.CropSummary(String, String, String, boolean, ConfigData) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: WindCliStation.java, Line: 15, Type: SE_COMPARATOR_SHOULD_BE_SERIALIZABLE, Priority: Normal, Category: BAD_PRACTICE

Se: usda.weru.weps.WindCliStation implements Comparator but not Serializable

This class implements the Comparator interface. You should consider whether or not it should also implement the Serializable interface. If a comparator is used to construct an ordered collection such as a TreeMap, then the TreeMap will be serializable only if the comparator is also serializable. As most comparators have little or no state, making them serializable is generally easy and good defensive programming.

File: RunFileData.java, Line: 1492, Type: WMI_WRONG_MAP_ITERATOR, Priority: Normal, Category: PERFORMANCE

WMI: Method usda.weru.weps.RunFileData.readRunData(String) makes inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

File: RunFileData.java, Line: 1705, Type: ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD, Priority: Normal, Category: STYLE

ST: Write to static field usda.weru.weps.RunFileData.CurProj from instance method usda.weru.weps.RunFileData.propertyChange(PropertyChangeEvent)

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.

File: RunFileData.java, Line: 1458, Type: NP_NULL_ON_SOME_PATH, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of root in usda.weru.weps.RunFileData.readRunData(String)

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

File: ConfigPanel.java, Line: 468, Type: DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED, Priority: Normal, Category: BAD_PRACTICE

DP: usda.weru.weps.ConfigPanel.getHelpSet(String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block

This code creates a classloader, which requires a security manager. If this code will be granted security permissions, but might be invoked by code that does not have security permissions, then the classloader creation needs to occur inside a doPrivileged block.

File: Weps.java, Line: 224, Type: NP_LOAD_OF_KNOWN_NULL_VALUE, Priority: Normal, Category: STYLE

NP: Load of known null value in usda.weru.weps.Weps.configureDefaultLoggers(File, Exception)

The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull.

File: Weps.java, Line: 1822, Type: DM_STRING_CTOR, Priority: Normal, Category: PERFORMANCE

Dm: usda.weru.weps.Weps.propertyChange(PropertyChangeEvent) invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.

File: RunProgram.java, Line: 727, Type: NP_NULL_ON_SOME_PATH_EXCEPTION, Priority: Normal, Category: CORRECTNESS

NP: Possible null pointer dereference of outout in usda.weru.weps.RunProgram.run() on exception path

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  Note that because FindBugs currently does not prune infeasible exception paths, this may be a false warning.

Also note that FindBugs considers the default case of a switch statement to be an exception path, since the default case is often infeasible.

File: RunProgram.java, Line: 581, Type: DM_STRING_TOSTRING, Priority: Normal, Category: PERFORMANCE

Dm: Method usda.weru.weps.RunProgram.displayCalibReport(File, String) invokes toString() method on a String

Calling String.toString() is just a redundant operation. Just use the String.

File: Mcrew_n.java, Line: 1521, Type: DLS_DEAD_LOCAL_STORE, Priority: Normal, Category: STYLE

DLS: Dead store to menuBarHeight in usda.weru.mcrew.gui.Mcrew_n.addNotify()

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

File: ObjectListBuilder.java, Line: 41, Type: NP_GUARANTEED_DEREF, Priority: Normal, Category: CORRECTNESS

NP: a could be null and is guaranteed to be dereferenced in usda.weru.util.diff.listbuilders.ObjectListBuilder.test(Class, Object, Object)

There is a statement or branch that if executed guarantees that a value is null at this point, and that value that is guaranteed to be dereferenced (except on forward paths involving runtime exceptions).

ClassWarning Type
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaDLS_DEAD_LOCAL_STORE
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
ObjectListBuilder.javaNP_GUARANTEED_DEREF
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION
Mcrew_n.javaNM_FIELD_NAMING_CONVENTION