874
CWE - Java Mapping to CodeSonar® GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc. Category ID Category Name CodeSonar Class Mnemonic CodeSonar Class Name Relationship Type (category to class) CWE:1 Location FB.CORRECTNESS.RE_POSSIBLE _UNINTENDED_PATTERN "." used for regular expression hierarchy ancestor CWE:1 Location FB.CORRECTNESS.ICAST_BAD_S HIFT_AMOUNT 32 bit int shifted by an amount not in the range -31..31 hierarchy ancestor CWE:1 Location FB.CORRECTNESS.IL_CONTAINE R_ADDED_TO_ITSELF A collection is added to itself hierarchy ancestor CWE:1 Location FB.CORRECTNESS.NP_NULL_INS TANCEOF A known null value is checked to see if it is an instance of a type hierarchy ancestor CWE:1 Location FB.CORRECTNESS.IP_PARAMETE R_IS_DEAD_BUT_OVERWRITTEN A parameter is dead upon entry to a method but overwritten hierarchy ancestor CWE:1 Location FB.SECURITY.SQL_PREPARED_ST ATEMENT_GENERATED_FROM_N ONCONSTANT_STRING A prepared statement is generated from a nonconstant String hierarchy ancestor CWE:1 Location FB.MT_CORRECTNESS.VO_VOLA TILE_REFERENCE_TO_ARRAY A volatile reference to an array doesn't treat the array elements as volatile hierarchy ancestor CWE:1 Location FB.BAD_PRACTICE.DMI_ENTRY_S ETS_MAY_REUSE_ENTRY_OBJEC TS Adding elements of an entry set may fail due to reuse of Entry objects hierarchy ancestor CWE:1 Location FB.CORRECTNESS.IL_INFINITE_L OOP An apparent infinite loop hierarchy ancestor CWE:1 Location FB.CORRECTNESS.IL_INFINITE_R ECURSIVE_LOOP An apparent infinite recursive loop hierarchy ancestor CWE:1 Location FB.MT_CORRECTNESS.VO_VOLA TILE_INCREMENT An increment to a volatile field isn't atomic hierarchy ancestor CWE:1 Location FB.CORRECTNESS.NM_METHOD_ CONSTRUCTOR_CONFUSION Apparent method/constructor confusion hierarchy ancestor CWE:1 Location FB.CORRECTNESS.VA_FORMAT_ STRING_BAD_CONVERSION_FRO M_ARRAY Array formatted in useless way using format string hierarchy ancestor CWE:1 Location PMD.Design.AssignmentToNonFin alStatic Assignment To Non Final Static hierarchy ancestor CWE:1 Location PMD.Migration.AvoidAssertAsIdent ifier Avoid Assert As Identifier hierarchy ancestor CWE:1 Location PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalize hierarchy ancestor

CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

  • Upload
    others

  • View
    22

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

Category ID

Category Name CodeSonar Class Mnemonic CodeSonar Class NameRelationship Type (category to class)

CWE:1 LocationFB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:1 LocationFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:1 LocationPMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:1 LocationPMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

CWE:1 Location PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

Page 2: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationPMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:1 LocationPMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:1 LocationPMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:1 Location PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy ancestor

CWE:1 LocationPMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:1 LocationPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy ancestor

CWE:1 LocationPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy ancestor

CWE:1 LocationPMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:1 LocationPMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:1 LocationPMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:1 Location PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:1 Location PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

Page 3: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:1 Location PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:1 Location PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:1 LocationFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:1 Location FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:1 LocationPMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy ancestor

Page 4: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy ancestor

CWE:1 Location FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:1 Location PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

Page 5: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:1 LocationPMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:1 LocationFB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:1 LocationFB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:1 LocationFB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:1 LocationFB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:1 LocationFB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

Page 6: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy ancestor

CWE:1 Location PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:1 LocationPMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:1 Location PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:1 Location FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:1 Location PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:1 LocationPMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:1 LocationFB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:1 LocationFB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:1 LocationPMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:1 LocationPMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:1 LocationFB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

CWE:1 Location PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:1 LocationFB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

Page 7: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 Location FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:1 LocationFB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:1 LocationCTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:1 LocationPMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

Page 8: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:1 Location

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:1 LocationFB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:1 LocationFB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:1 LocationFB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:1 LocationFB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:1 Location FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:1 LocationCTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:1 LocationCTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

Page 9: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:1 Location FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy ancestor

CWE:1 LocationFB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:1 LocationFB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

Page 10: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy ancestor

CWE:1 LocationPMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:1 LocationPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:1 LocationFB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:1 LocationFB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

Page 11: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:1 LocationFB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:1 Location FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:1 LocationFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:1 LocationFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

Page 12: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:1 Location PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:1 Location PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:1 Location CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:1 Location CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

Page 13: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationPMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:1 LocationCTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:1 LocationFB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:1 LocationFB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:1 LocationFB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:1 LocationPMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:1 LocationFB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:1 LocationFB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

Page 14: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:1 LocationFB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:1 LocationFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:1 LocationFB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:1 LocationPMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:1 LocationFB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:1 LocationFB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:1 LocationFB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:1 LocationFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:1 Location FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:1 LocationFB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:1 LocationFB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy ancestor

Page 15: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy ancestor

CWE:1 LocationFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy ancestor

CWE:1 LocationFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy ancestor

CWE:1 LocationFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:1 LocationFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy ancestor

CWE:1 LocationFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:1 Location PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:1 LocationFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:1 LocationFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:1 LocationCTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

Page 16: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationPMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:1 LocationPMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:1 LocationPMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:1 LocationPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy ancestor

CWE:1 LocationPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:1 LocationPMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:1 LocationFB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

Page 17: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:1 LocationFB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

Page 18: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationCTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:1 LocationFB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:1 LocationPMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:1 LocationCTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:1 LocationFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:1 LocationCTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:1 LocationPMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:1 LocationPMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:1 LocationPMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:1 LocationPMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:1 LocationFB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:1 LocationPMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

Page 19: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:1 LocationPMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:1 LocationFB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy ancestor

CWE:1 LocationFB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy ancestor

CWE:1 LocationFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

Page 20: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:1 LocationFB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:1 LocationFB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:1 LocationFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:1 LocationFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:1 LocationFB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:2 EnvironmentPMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

CWE:2 EnvironmentPMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:2 EnvironmentFB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

Page 21: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:2 EnvironmentFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:2 EnvironmentFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:3Technology-specific Environment Issues

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:4J2EE Environment Issues

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

closely mapped

CWE:5

J2EE Misconfiguration: Data Transmission Without Encryption

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy descendant

CWE:6J2EE Misconfiguration: Insufficient Session-

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:6

J2EE Misconfiguration: Insufficient Session-ID Length

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy descendant

CWE:7J2EE Misconfiguration: Missing Custom Error

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:7J2EE Misconfiguration:

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:7J2EE Misconfiguration: Missing Custom Error

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:7J2EE Misconfiguration:

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:7J2EE Misconfiguration:

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:7

J2EE Misconfiguration: Missing Custom Error Page

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy descendant

CWE:8

J2EE Misconfiguration: Entity Bean Declared Remote

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy descendant

CWE:9

J2EE Misconfiguration: Weak Access Permissions for EJB

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:9

J2EE Misconfiguration: Weak Access Permissions for EJB Methods

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

Page 22: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:9

J2EE Misconfiguration: Weak Access Permissions for EJB

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy descendant

CWE:12ASP.NET Misconfiguration: Missing Custom Error

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:12ASP.NET Misconfiguration:

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:12ASP.NET Misconfiguration: Missing Custom Error

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:12ASP.NET Misconfiguration:

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:12ASP.NET Misconfiguration:

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:14Compiler Removal of Code to Clear Buffers

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on fieldhierarchy descendant

CWE:15External Control of System or Configuration Setting

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:15External Control of System or Configuration Setting

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:17 CodeFB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:17 CodeFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy ancestor

Page 23: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:17 CodePMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:17 CodePMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

CWE:17 Code PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:17 CodePMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:17 CodePMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:17 CodePMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:17 Code PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy ancestor

CWE:17 CodePMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:17 CodePMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy ancestor

CWE:17 CodePMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy ancestor

CWE:17 CodePMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:17 CodePMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:17 CodePMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:17 Code PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

Page 24: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:17 Code PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:17 Code PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:17 Code PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:17 CodeFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:17 Code FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

Page 25: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodePMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy ancestor

CWE:17 Code FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy ancestor

Page 26: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:17 Code PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:17 CodePMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:17 CodeFB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

Page 27: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:17 CodeFB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:17 CodeFB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:17 CodeFB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:17 CodeFB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:17 CodePMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy ancestor

CWE:17 Code PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:17 CodePMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:17 Code PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:17 Code FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:17 Code PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:17 CodePMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:17 CodeFB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:17 CodeFB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:17 CodePMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

Page 28: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodePMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:17 CodeFB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

CWE:17 Code PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:17 CodeFB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:17 Code FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:17 CodeFB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

Page 29: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeCTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:17 CodePMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:17 Code

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:17 CodeFB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:17 CodeFB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:17 CodeFB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

Page 30: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:17 CodeFB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:17 Code FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:17 CodeCTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:17 CodeCTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:17 Code FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

Page 31: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy ancestor

CWE:17 CodeFB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:17 CodeFB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:17 CodePMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy ancestor

CWE:17 CodePMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:17 CodePMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

Page 32: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:17 CodeFB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:17 CodeFB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:17 CodeFB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:17 Code FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

Page 33: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:17 CodeFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:17 CodeFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:17 Code PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:17 Code PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

Page 34: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 Code CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:17 Code CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:17 CodePMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:17 CodeCTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:17 CodeFB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:17 CodeFB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:17 CodeFB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

Page 35: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodePMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:17 CodeFB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:17 CodeFB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:17 CodeFB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:17 CodeFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:17 CodeFB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:17 CodePMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:17 CodeFB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:17 CodeFB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:17 CodeFB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

Page 36: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:17 Code FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:17 CodeFB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:17 CodeFB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy ancestor

CWE:17 CodeFB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy ancestor

CWE:17 CodeFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy ancestor

CWE:17 CodeFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy ancestor

CWE:17 CodeFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:17 CodeFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy ancestor

CWE:17 CodeFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:17 Code PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

Page 37: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:17 CodeFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:17 CodeFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:17 CodeCTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:17 CodePMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:17 CodePMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:17 CodePMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:17 CodePMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy ancestor

CWE:17 CodePMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy ancestor

Page 38: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:17 CodePMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:17 CodeFB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:17 CodeFB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

Page 39: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:17 CodeFB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:17 CodeCTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:17 CodeFB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:17 CodePMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:17 CodeCTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:17 CodeFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:17 CodeCTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:17 CodePMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:17 CodePMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

Page 40: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodePMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:17 CodePMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:17 CodeFB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:17 CodePMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:17 CodePMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:17 CodeFB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy ancestor

Page 41: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy ancestor

CWE:17 CodeFB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy ancestor

CWE:17 CodeFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:17 CodeFB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:17 CodeFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:17 CodeFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

Page 42: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:17 CodeFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:17 CodeFB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:18 Source CodePMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:18 Source CodePMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

Page 43: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source Code PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:18 Source CodePMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:18 Source CodePMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:18 Source CodePMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:18 Source Code PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy ancestor

CWE:18 Source CodePMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:18 Source CodePMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy ancestor

CWE:18 Source CodePMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy ancestor

CWE:18 Source CodePMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:18 Source CodePMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:18 Source CodePMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:18 Source Code PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:18 Source Code PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

Page 44: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:18 Source Code PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:18 Source Code PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:18 Source CodeFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:18 Source Code FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:18 Source CodePMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy ancestor

Page 45: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy ancestor

CWE:18 Source Code FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:18 Source Code PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

Page 46: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:18 Source CodePMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:18 Source CodeFB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:18 Source CodeFB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

Page 47: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodePMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy ancestor

CWE:18 Source Code PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:18 Source CodePMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:18 Source Code PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:18 Source Code FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:18 Source Code PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:18 Source CodePMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:18 Source CodeFB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:18 Source CodeFB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:18 Source CodePMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:18 Source CodePMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:18 Source CodeFB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

CWE:18 Source Code PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

Page 48: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source Code FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:18 Source CodeCTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:18 Source CodePMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

Page 49: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:18 Source Code

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:18 Source CodeFB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:18 Source Code FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:18 Source CodeCTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:18 Source CodeCTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

Page 50: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:18 Source Code FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

Page 51: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodePMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy ancestor

CWE:18 Source CodePMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:18 Source CodePMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

Page 52: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:18 Source CodeFB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:18 Source Code FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:18 Source CodeFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:18 Source CodeFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

Page 53: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:18 Source Code PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:18 Source Code PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:18 Source Code CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:18 Source Code CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

Page 54: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodePMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:18 Source CodeCTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:18 Source CodePMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:18 Source CodeFB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:18 Source CodeFB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

Page 55: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:18 Source CodeFB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:18 Source CodePMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:18 Source CodeFB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:18 Source Code FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:18 Source CodeFB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy ancestor

Page 56: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy ancestor

CWE:18 Source CodeFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:18 Source Code PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:18 Source CodeFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:18 Source CodeCTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

Page 57: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodePMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:18 Source CodePMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:18 Source CodePMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:18 Source CodePMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy ancestor

CWE:18 Source CodePMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:18 Source CodePMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

Page 58: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

Page 59: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeCTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:18 Source CodePMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:18 Source CodeCTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:18 Source CodeCTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:18 Source CodePMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:18 Source CodePMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:18 Source CodePMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:18 Source CodePMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:18 Source CodeFB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:18 Source CodePMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

Page 60: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:18 Source CodePMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy ancestor

CWE:18 Source CodeFB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy ancestor

CWE:18 Source CodeFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

Page 61: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:18 Source CodeFB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:18 Source CodeFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:18 Source CodeFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:18 Source CodeFB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:19 Data HandlingFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

Page 62: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:19 Data HandlingPMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:19 Data HandlingPMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:19 Data HandlingPMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:19 Data HandlingPMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:19 Data HandlingPMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:19 Data HandlingPMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:19 Data HandlingFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:19 Data HandlingFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:19 Data HandlingFB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:19 Data HandlingFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

Page 63: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:19 Data HandlingFB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:19 Data HandlingFB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:19 Data HandlingFB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:19 Data HandlingFB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:19 Data HandlingFB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:19 Data HandlingFB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:19 Data HandlingFB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:19 Data HandlingFB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:19 Data HandlingFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:19 Data HandlingFB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:19 Data Handling FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

Page 64: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:19 Data HandlingFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:19 Data HandlingFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:19 Data HandlingPMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:19 Data HandlingPMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:19 Data HandlingPMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:19 Data HandlingFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:19 Data HandlingFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:19 Data HandlingPMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:19 Data HandlingPMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:19 Data HandlingFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:19 Data HandlingFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

Page 65: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:19 Data HandlingFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:20Improper Input Validation

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:20Improper Input Validation

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:20Improper Input Validation

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:20Improper Input Validation

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:20Improper Input Validation

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:20Improper Input Validation

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:20Improper Input Validation

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:20Improper Input Validation

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:20Improper Input Validation

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:20Improper Input Validation

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:20Improper Input Validation

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:20Improper Input Validation

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:20Improper Input Validation

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:37Path Traversal: '/absolute/pathname/here'

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 66: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:37Path Traversal: '/absolute/pathname/here'

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:37Path Traversal: '/absolute/pathname/h

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:37Path Traversal: '/absolute/pathname/here'

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:37Path Traversal: '/absolute/pathname/here'

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:42Path Equivalence: 'filename.' (Trailing Dot)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:42Path Equivalence: 'filename.' (Trailing Dot)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:42Path Equivalence: 'filename.' (Trailing

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:42Path Equivalence: 'filename.' (Trailing Dot)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:42Path Equivalence: 'filename.' (Trailing Dot)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:43Path Equivalence: 'filename....' (Multiple Trailing Dot)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:43Path Equivalence: 'filename....' (Multiple Trailing Dot)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:43Path Equivalence: 'filename....' (Multiple

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:43Path Equivalence: 'filename....' (Multiple Trailing Dot)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:43Path Equivalence: 'filename....' (Multiple Trailing Dot)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:45Path Equivalence: 'file...name' (Multiple Internal Dot)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 67: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:45Path Equivalence: 'file...name' (Multiple Internal Dot)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:45Path Equivalence: 'file...name' (Multiple

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:45Path Equivalence: 'file...name' (Multiple Internal Dot)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:45Path Equivalence: 'file...name' (Multiple Internal Dot)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:46Path Equivalence: 'filename ' (Trailing Space)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:46Path Equivalence: 'filename ' (Trailing Space)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:46Path Equivalence: 'filename ' (Trailing

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:46Path Equivalence: 'filename ' (Trailing Space)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:46Path Equivalence: 'filename ' (Trailing Space)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:49Path Equivalence: 'filename/' (Trailing Slash)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:49Path Equivalence: 'filename/' (Trailing Slash)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:49Path Equivalence: 'filename/' (Trailing

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:49Path Equivalence: 'filename/' (Trailing Slash)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:49Path Equivalence: 'filename/' (Trailing Slash)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:50Path Equivalence: '//multiple/leading/slash'

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 68: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:50Path Equivalence: '//multiple/leading/slash'

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:50Path Equivalence: '//multiple/leading/sla

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:50Path Equivalence: '//multiple/leading/slash'

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:50Path Equivalence: '//multiple/leading/slash'

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:52Path Equivalence: '/multiple/trailing/slash//'

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:52Path Equivalence: '/multiple/trailing/slash//'

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:52Path Equivalence: '/multiple/trailing/slash

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:52Path Equivalence: '/multiple/trailing/slash//'

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:52Path Equivalence: '/multiple/trailing/slash//'

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:53Path Equivalence: '\multiple\\internal\backslash'

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:53Path Equivalence: '\multiple\\internal\backslash'

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:53Path Equivalence: '\multiple\\internal\bac

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:53Path Equivalence: '\multiple\\internal\backslash'

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:53Path Equivalence: '\multiple\\internal\backslash'

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:54Path Equivalence: 'filedir\' (Trailing Backslash)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 69: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:54Path Equivalence: 'filedir\' (Trailing Backslash)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:54Path Equivalence: 'filedir\' (Trailing

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:54Path Equivalence: 'filedir\' (Trailing Backslash)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:54Path Equivalence: 'filedir\' (Trailing Backslash)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:56Path Equivalence: 'filedir*' (Wildcard)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:56Path Equivalence: 'filedir*' (Wildcard)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:56Path Equivalence: 'filedir*' (Wildcard)

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:56Path Equivalence: 'filedir*' (Wildcard)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:56Path Equivalence: 'filedir*' (Wildcard)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:73External Control of File Name or Path

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:73External Control of File Name or Path

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:74

Improper Neutralization of Special Elements in Output Used by a Downstream

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:74

Improper Neutralization of Special Elements in Output Used by a Downstream

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:74

Improper Neutralization of Special Elements in Output Used by a Downstream

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

Page 70: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:74

Improper Neutralization of Special Elements in Output Used by a

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:74Improper Neutralization of Special Elements in

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:74Improper Neutralization of Special Elements in

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:74

Improper Neutralization of Special Elements in Output Used by a Downstream

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:74Improper Neutralization of Special Elements in

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:74

Improper Neutralization of Special Elements in Output Used by a

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:74

Improper Neutralization of Special Elements in Output Used by a

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:74Improper Neutralization of Special Elements in

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:74Improper Neutralization of Special Elements in

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:75

Failure to Sanitize Special Elements into a Different Plane (Special Element Injection)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:75

Failure to Sanitize Special Elements into a Different Plane (Special Element Injection)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:75Failure to Sanitize Special Elements into a Different Plane

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:75Failure to Sanitize Special Elements into a Different Plane

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:75Failure to Sanitize Special Elements into a Different Plane

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:76

Improper Neutralization of Equivalent Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 71: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:76

Improper Neutralization of Equivalent Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:76Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:76Improper Neutralization of Equivalent Special

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:76Improper Neutralization of Equivalent Special

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:77

Improper Neutralization of Special Elements used in a Command ('Command Injection')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:77

Improper Neutralization of Special Elements used in a Command ('Command Injection')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:77Improper Neutralization of Special Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:77Improper Neutralization of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:77Improper Neutralization of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:78

Improper Neutralization of Special Elements used in an OS Command ('OS

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:78

Improper Neutralization of Special Elements used in an OS Command ('OS

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:78Improper Neutralization of Special Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:78Improper Neutralization of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:78Improper Neutralization of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 72: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:79Improper Neutralization of Input During Web Page

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

closely mapped

CWE:79Improper Neutralization of Input During Web Page

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:79

Improper Neutralization of Input During Web Page Generation ('Cross-

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

closely mapped

CWE:79

Improper Neutralization of Input During Web Page Generation ('Cross-

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

closely mapped

CWE:79Improper Neutralization of Input During Web Page

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:79Improper Neutralization of Input During Web Page

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:80

Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:80

Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:80Improper Neutralization of Script-Related HTML

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:80Improper Neutralization of Script-Related HTML

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:80

Improper Neutralization of Script-Related HTML Tags in a Web Page

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:80

Improper Neutralization of Script-Related HTML Tags in a Web Page

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy descendant

CWE:80Improper Neutralization of Script-Related HTML

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:80Improper Neutralization of Script-Related HTML

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 73: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:81

Improper Neutralization of Script in an Error Message Web Page

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:81

Improper Neutralization of Script in an Error Message Web Page

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:81Improper Neutralization of Script in an Error

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:81Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:81

Improper Neutralization of Script in an Error Message Web Page

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:81

Improper Neutralization of Script in an Error Message Web Page

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

closely mapped

CWE:81Improper Neutralization of Script in an Error

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:81Improper Neutralization of Script in an Error

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:82

Improper Neutralization of Script in Attributes of IMG Tags in a Web Page

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:82

Improper Neutralization of Script in Attributes of IMG Tags in a Web Page

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:82Improper Neutralization of Script in Attributes of

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:82Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:82

Improper Neutralization of Script in Attributes of IMG Tags in a Web

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:82

Improper Neutralization of Script in Attributes of IMG Tags in a Web

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy descendant

CWE:82Improper Neutralization of Script in Attributes of

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:82Improper Neutralization of Script in Attributes of

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 74: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:83

Improper Neutralization of Script in Attributes in a Web Page

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:83

Improper Neutralization of Script in Attributes in a Web Page

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:83Improper Neutralization of Script in Attributes in

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:83Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:83

Improper Neutralization of Script in Attributes in a Web Page

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:83

Improper Neutralization of Script in Attributes in a Web Page

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy descendant

CWE:83Improper Neutralization of Script in Attributes in

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:83Improper Neutralization of Script in Attributes in

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:84

Improper Neutralization of Encoded URI Schemes in a Web Page

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:84

Improper Neutralization of Encoded URI Schemes in a Web Page

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:84Improper Neutralization of Encoded URI

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:84Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:84

Improper Neutralization of Encoded URI Schemes in a Web

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:84

Improper Neutralization of Encoded URI Schemes in a Web

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy descendant

CWE:84Improper Neutralization of Encoded URI

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:84Improper Neutralization of Encoded URI

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 75: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:85Doubled Character XSS Manipulations

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:85Doubled Character XSS Manipulations

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:85Doubled Character XSS Manipulations

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:85Doubled Character XSS Manipulations

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:85Doubled Character XSS Manipulations

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:85Doubled Character XSS Manipulations

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy descendant

CWE:85Doubled Character XSS Manipulations

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:85Doubled Character XSS Manipulations

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:86

Improper Neutralization of Invalid Characters in Identifiers in Web Pages

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:86

Improper Neutralization of Invalid Characters in Identifiers in Web Pages

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:86Improper Neutralization of Invalid Characters in

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:86Improper Neutralization of Invalid Characters in

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:86

Improper Neutralization of Invalid Characters in Identifiers in Web

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:86

Improper Neutralization of Invalid Characters in Identifiers in Web

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy descendant

CWE:86Improper Neutralization of Invalid Characters in

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

Page 76: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:86Improper Neutralization of Invalid Characters in

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:87Improper Neutralization of Alternate XSS Syntax

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:87Improper Neutralization of Alternate XSS Syntax

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:87Improper Neutralization of Alternate XSS Syntax

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy descendant

CWE:87Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:87Improper Neutralization of Alternate XSS Syntax

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy descendant

CWE:87Improper Neutralization of Alternate XSS Syntax

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy descendant

CWE:87Improper Neutralization of Alternate XSS Syntax

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:87Improper Neutralization of Alternate XSS Syntax

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:88Argument Injection or Modification

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:88Argument Injection or Modification

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:88Argument Injection or Modification

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:88Argument Injection or Modification

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:88Argument Injection or Modification

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:89

Improper Neutralization of Special Elements used in an SQL Command ('SQL

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

closely mapped

Page 77: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:89

Improper Neutralization of Special Elements used in an SQL Command ('SQL

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:89

Improper Neutralization of Special Elements used in an SQL Command ('SQL

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

closely mapped

CWE:89Improper Neutralization of Special Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:89Improper Neutralization of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:89Improper Neutralization of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:90

Improper Neutralization of Special Elements used in an LDAP Query ('LDAP

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:90

Improper Neutralization of Special Elements used in an LDAP Query ('LDAP

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:90Improper Neutralization of Special Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:90Improper Neutralization of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:90Improper Neutralization of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:91XML Injection (aka Blind XPath Injection)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:91XML Injection (aka Blind XPath Injection)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:91XML Injection (aka Blind XPath Injection)

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:91XML Injection (aka Blind XPath Injection)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:91XML Injection (aka Blind XPath Injection)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 78: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:93

Improper Neutralization of CRLF Sequences ('CRLF Injection')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:93

Improper Neutralization of CRLF Sequences ('CRLF Injection')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:93

Improper Neutralization of CRLF Sequences ('CRLF Injection')

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:93Improper Neutralization of CRLF Sequences

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:93Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:93Improper Neutralization of CRLF Sequences

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:93Improper Neutralization of CRLF Sequences

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:94Improper Control of Generation of Code ('Code Injection')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:94Improper Control of Generation of Code ('Code Injection')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:94Improper Control of Generation of Code ('Code Injection')

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:94Improper Control of Generation of Code ('Code Injection')

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:94Improper Control of Generation of Code

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:94Improper Control of Generation of Code ('Code Injection')

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:94Improper Control of Generation of Code ('Code Injection')

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:95

Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 79: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:95

Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:95

Improper Neutralization of Directives in Dynamically

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:95Improper Neutralization of Directives in

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:95Improper Neutralization of Directives in

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:95Improper Neutralization of Directives in

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:95Improper Neutralization of Directives in

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:96

Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:96

Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:96

Improper Neutralization of Directives in Statically Saved Code ('Static

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:96Improper Neutralization of Directives in Statically

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:96Improper Neutralization of Directives in Statically

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:96Improper Neutralization of Directives in Statically

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:96Improper Neutralization of Directives in Statically

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:97

Improper Neutralization of Server-Side Includes (SSI) Within a Web Page

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:97

Improper Neutralization of Server-Side Includes (SSI) Within a Web Page

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

Page 80: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:97

Improper Neutralization of Server-Side Includes (SSI) Within a Web

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:97Improper Neutralization of Server-Side Includes

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:97Improper Neutralization of Server-Side Includes

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:97Improper Neutralization of Server-Side Includes

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:97Improper Neutralization of Server-Side Includes

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:99Improper Control of Resource Identifiers ('Resource Injection')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:99Improper Control of Resource Identifiers ('Resource Injection')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:99Improper Control of Resource Identifiers

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:99Improper Control of Resource Identifiers ('Resource Injection')

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:99Improper Control of Resource Identifiers ('Resource Injection')

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

Page 81: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:102Struts: Duplicate Validation Forms

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:102Struts: Duplicate Validation Forms

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

Page 82: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:102Struts: Duplicate Validation Forms

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

Page 83: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:103Struts: Incomplete validate() Method Definition

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

Page 84: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:104Struts: Form Bean Does Not Extend Validation Class

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 85: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:107Struts: Unused Validation Form

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 86: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:107Struts: Unused Validation Form

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:107Struts: Unused Validation Form

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 87: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:110Struts: Validator Without Form Field

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:110Struts: Validator Without Form Field

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:110Struts: Validator Without Form Field

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Code closely mapped

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

Page 88: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:111Direct Use of Unsafe JNI

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

Page 89: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:111Direct Use of Unsafe JNI

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:113

Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:113

Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:113

Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

closely mapped

CWE:113Improper Neutralization of CRLF Sequences in

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

closely mapped

CWE:113Improper Neutralization of CRLF Sequences in

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:113Improper Neutralization of CRLF Sequences in

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:113Improper Neutralization of CRLF Sequences in

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:116Improper Encoding or Escaping of Output

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:116Improper Encoding or Escaping of Output

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:116Improper Encoding or Escaping of Output

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:116Improper Encoding or Escaping of Output

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:116Improper Encoding or Escaping of Output

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:117Improper Output Neutralization for Logs

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:117Improper Output Neutralization for Logs

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

Page 90: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:117Improper Output Neutralization for

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:117Improper Output Neutralization for Logs

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:117Improper Output Neutralization for Logs

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:128 Wrap-around ErrorFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:128 Wrap-around ErrorFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:128 Wrap-around ErrorFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:130Improper Handling of Length Parameter Inconsistency

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:130Improper Handling of Length Parameter Inconsistency

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:130Improper Handling of Length Parameter Inconsistency

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:130Improper Handling of Length Parameter

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:130Improper Handling of Length Parameter Inconsistency

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:130Improper Handling of Length Parameter

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:130Improper Handling of Length Parameter

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:130Improper Handling of Length Parameter

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:130Improper Handling of Length Parameter Inconsistency

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:130Improper Handling of Length Parameter Inconsistency

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:131Incorrect Calculation of Buffer Size

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:131Incorrect Calculation of Buffer Size

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:131Incorrect Calculation of Buffer Size

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

Page 91: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:133 String ErrorsFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:133 String ErrorsFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:133 String ErrorsPMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:134Use of Externally-Controlled Format String

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:134Use of Externally-Controlled Format String

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:134Use of Externally-Controlled Format

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:134Use of Externally-Controlled Format String

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:134Use of Externally-Controlled Format String

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:135Incorrect Calculation of Multi-Byte String Length

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:135Incorrect Calculation of Multi-Byte String Length

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:135Incorrect Calculation of Multi-Byte String Length

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:136 Type ErrorsFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:136 Type ErrorsPMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:136 Type ErrorsFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:136 Type Errors FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:136 Type ErrorsFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

Page 92: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:136 Type ErrorsFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:136 Type ErrorsFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:136 Type ErrorsFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:136 Type ErrorsFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:136 Type ErrorsFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:137 Representation ErrorsFB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:137 Representation ErrorsFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:137 Representation ErrorsPMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:137 Representation ErrorsFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:137 Representation ErrorsFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:137 Representation ErrorsFB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:137 Representation ErrorsFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:137 Representation ErrorsFB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:137 Representation ErrorsFB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:137 Representation ErrorsFB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:137 Representation ErrorsFB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

Page 93: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:137 Representation ErrorsFB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:137 Representation ErrorsFB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:137 Representation ErrorsFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:137 Representation ErrorsFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:137 Representation ErrorsFB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:137 Representation ErrorsFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:137 Representation ErrorsFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:137 Representation ErrorsPMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:137 Representation ErrorsFB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:137 Representation ErrorsPMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:137 Representation ErrorsFB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:138Improper Neutralization of Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:138Improper Neutralization of Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:138Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:138Improper Neutralization of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

Page 94: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:138Improper Neutralization of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:140Improper Neutralization of Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:140Improper Neutralization of Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:140Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:140Improper Neutralization of Delimiters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:140Improper Neutralization of Delimiters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:141

Improper Neutralization of Parameter/Argument Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:141

Improper Neutralization of Parameter/Argument Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:141Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:141Improper Neutralization of Parameter/Argument

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:141Improper Neutralization of Parameter/Argument

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:142Improper Neutralization of Value Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:142Improper Neutralization of Value Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:142Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:142Improper Neutralization of Value Delimiters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:142Improper Neutralization of Value Delimiters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 95: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:143Improper Neutralization of Record Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:143Improper Neutralization of Record Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:143Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:143Improper Neutralization of Record Delimiters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:143Improper Neutralization of Record Delimiters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:144Improper Neutralization of Line Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:144Improper Neutralization of Line Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:144Improper Neutralization of Line

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:144Improper Neutralization of Line Delimiters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:144Improper Neutralization of Line Delimiters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:145Improper Neutralization of Section Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:145Improper Neutralization of Section Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:145Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:145Improper Neutralization of Section Delimiters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:145Improper Neutralization of Section Delimiters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 96: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:146

Improper Neutralization of Expression/Command Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:146

Improper Neutralization of Expression/Command Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:146Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:146Improper Neutralization of Expression/Command

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:146Improper Neutralization of Expression/Command

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:147Improper Neutralization of Input Terminators

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:147Improper Neutralization of Input Terminators

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:147Improper Neutralization of Input

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:147Improper Neutralization of Input Terminators

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:147Improper Neutralization of Input Terminators

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:148Improper Neutralization of Input Leaders

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:148Improper Neutralization of Input Leaders

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:148Improper Neutralization of Input

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:148Improper Neutralization of Input Leaders

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:148Improper Neutralization of Input Leaders

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 97: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:149Improper Neutralization of Quoting Syntax

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:149Improper Neutralization of Quoting Syntax

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:149Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:149Improper Neutralization of Quoting Syntax

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:149Improper Neutralization of Quoting Syntax

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:150

Improper Neutralization of Escape, Meta, or Control Sequences

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:150

Improper Neutralization of Escape, Meta, or Control Sequences

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:150Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:150Improper Neutralization of Escape, Meta, or

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:150Improper Neutralization of Escape, Meta, or

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:151Improper Neutralization of Comment Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:151Improper Neutralization of Comment Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:151Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:151Improper Neutralization of Comment Delimiters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:151Improper Neutralization of Comment Delimiters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 98: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:152Improper Neutralization of Macro Symbols

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:152Improper Neutralization of Macro Symbols

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:152Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:152Improper Neutralization of Macro Symbols

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:152Improper Neutralization of Macro Symbols

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:153

Improper Neutralization of Substitution Characters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:153

Improper Neutralization of Substitution Characters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:153Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:153Improper Neutralization of Substitution

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:153Improper Neutralization of Substitution

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:154

Improper Neutralization of Variable Name Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:154

Improper Neutralization of Variable Name Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:154Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:154Improper Neutralization of Variable Name

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:154Improper Neutralization of Variable Name

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 99: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:155

Improper Neutralization of Wildcards or Matching Symbols

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:155

Improper Neutralization of Wildcards or Matching Symbols

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:155Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:155Improper Neutralization of Wildcards or

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:155Improper Neutralization of Wildcards or

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:156Improper Neutralization of Whitespace

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:156Improper Neutralization of Whitespace

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:156Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:156Improper Neutralization of Whitespace

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:156Improper Neutralization of Whitespace

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:157Failure to Sanitize Paired Delimiters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:157Failure to Sanitize Paired Delimiters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:157Failure to Sanitize Paired Delimiters

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:157Failure to Sanitize Paired Delimiters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:157Failure to Sanitize Paired Delimiters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 100: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:158

Improper Neutralization of Null Byte or NUL Character

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:158

Improper Neutralization of Null Byte or NUL Character

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:158Improper Neutralization of Null

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:158Improper Neutralization of Null Byte or NUL

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:158Improper Neutralization of Null Byte or NUL

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:159Failure to Sanitize Special Element

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:159Failure to Sanitize Special Element

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:159Failure to Sanitize Special Element

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:159Failure to Sanitize Special Element

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:159Failure to Sanitize Special Element

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:160

Improper Neutralization of Leading Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:160

Improper Neutralization of Leading Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:160Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:160Improper Neutralization of Leading Special

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:160Improper Neutralization of Leading Special

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 101: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:161

Improper Neutralization of Multiple Leading Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:161

Improper Neutralization of Multiple Leading Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:161Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:161Improper Neutralization of Multiple Leading

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:161Improper Neutralization of Multiple Leading

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:162

Improper Neutralization of Trailing Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:162

Improper Neutralization of Trailing Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:162Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:162Improper Neutralization of Trailing Special

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:162Improper Neutralization of Trailing Special

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:163

Improper Neutralization of Multiple Trailing Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:163

Improper Neutralization of Multiple Trailing Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:163Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:163Improper Neutralization of Multiple Trailing

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:163Improper Neutralization of Multiple Trailing

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 102: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:164

Improper Neutralization of Internal Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:164

Improper Neutralization of Internal Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:164Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:164Improper Neutralization of Internal Special

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:164Improper Neutralization of Internal Special

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:165

Improper Neutralization of Multiple Internal Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:165

Improper Neutralization of Multiple Internal Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:165Improper Neutralization of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:165Improper Neutralization of Multiple Internal

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:165Improper Neutralization of Multiple Internal

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:166Improper Handling of Missing Special Element

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:166Improper Handling of Missing Special Element

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:166Improper Handling of Missing Special Element

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:166Improper Handling of Missing Special

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:166Improper Handling of Missing Special Element

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:166Improper Handling of Missing Special

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:166Improper Handling of Missing Special

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

Page 103: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:166Improper Handling of Missing Special

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:166Improper Handling of Missing Special Element

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:166Improper Handling of Missing Special Element

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:167Improper Handling of Additional Special Element

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:167Improper Handling of Additional Special Element

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:167Improper Handling of Additional Special Element

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:167Improper Handling of Additional Special

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:167Improper Handling of Additional Special Element

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:167Improper Handling of Additional Special

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:167Improper Handling of Additional Special

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:167Improper Handling of Additional Special

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:167Improper Handling of Additional Special Element

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:167Improper Handling of Additional Special Element

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:168Improper Handling of Inconsistent Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:168Improper Handling of Inconsistent Special Elements

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:168Improper Handling of Inconsistent Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:168Improper Handling of Inconsistent Special

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:168Improper Handling of Inconsistent Special Elements

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:168Improper Handling of Inconsistent Special

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

Page 104: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:168Improper Handling of Inconsistent Special

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:168Improper Handling of Inconsistent Special

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:168Improper Handling of Inconsistent Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:168Improper Handling of Inconsistent Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:169Technology-Specific Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:169Technology-Specific Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:169Technology-Specific Special Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:169Technology-Specific Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:169Technology-Specific Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:170Improper Null Termination

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:170Improper Null Termination

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:170Improper Null Termination

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:170Improper Null Termination

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:170Improper Null Termination

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

Page 105: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:171Cleansing, Canonicalization, and

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:171Cleansing, Canonicalization, and

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

Page 106: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:171Cleansing, Canonicalization, and Comparison Errors

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:171Cleansing, Canonicalization, and Comparison Errors

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:172 Encoding ErrorFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:172 Encoding Error FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:172 Encoding ErrorFB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:172 Encoding ErrorPMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:172 Encoding ErrorPMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:173Improper Handling of Alternate Encoding

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 107: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:173Improper Handling of Alternate Encoding

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:173Improper Handling of Alternate Encoding

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:173Improper Handling of Alternate Encoding

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:173Improper Handling of Alternate Encoding

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:174Double Decoding of the Same Data

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:174Double Decoding of the Same Data

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy descendant

CWE:174Double Decoding of the Same Data

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy descendant

Page 108: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:174Double Decoding of the Same Data

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:174Double Decoding of the Same Data

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:174Double Decoding of the Same Data

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:174Double Decoding of the Same Data

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:175Improper Handling of Mixed Encoding

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:175Improper Handling of Mixed Encoding

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:175Improper Handling of Mixed Encoding

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

Page 109: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:175Improper Handling of Mixed Encoding

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:175Improper Handling of Mixed Encoding

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:176Improper Handling of Unicode Encoding

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:176Improper Handling of Unicode Encoding

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:176Improper Handling of Unicode Encoding

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:176Improper Handling of Unicode Encoding

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:176Improper Handling of Unicode Encoding

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:177Improper Handling of URL Encoding (Hex Encoding)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:177Improper Handling of URL Encoding (Hex Encoding)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:177Improper Handling of URL Encoding (Hex

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:177Improper Handling of URL Encoding (Hex Encoding)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:177Improper Handling of URL Encoding (Hex Encoding)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:178Improper Handling of Case Sensitivity

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:178Improper Handling of Case Sensitivity

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:178Improper Handling of Case Sensitivity

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:178Improper Handling of Case Sensitivity

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

Page 110: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:178Improper Handling of Case Sensitivity

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:179Incorrect Behavior Order: Early Validation

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:179Incorrect Behavior Order: Early Validation

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:179Incorrect Behavior Order: Early

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy descendant

CWE:179Incorrect Behavior Order: Early Validation

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy descendant

CWE:179Incorrect Behavior Order: Early Validation

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:179Incorrect Behavior Order: Early Validation

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:179Incorrect Behavior Order: Early

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:179Incorrect Behavior Order: Early Validation

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:179Incorrect Behavior Order: Early Validation

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:180Incorrect Behavior Order: Validate Before Canonicalize

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:180Incorrect Behavior Order: Validate Before Canonicalize

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:180Incorrect Behavior Order: Validate

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy descendant

CWE:180Incorrect Behavior Order: Validate Before Canonicalize

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy descendant

CWE:180Incorrect Behavior Order: Validate Before Canonicalize

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:180Incorrect Behavior Order: Validate Before Canonicalize

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 111: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:180Incorrect Behavior Order: Validate

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:180Incorrect Behavior Order: Validate Before Canonicalize

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:180Incorrect Behavior Order: Validate Before Canonicalize

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:181Incorrect Behavior Order: Validate Before Filter

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:181Incorrect Behavior Order: Validate Before Filter

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:181Incorrect Behavior Order: Validate

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy descendant

CWE:181Incorrect Behavior Order: Validate Before Filter

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy descendant

CWE:181Incorrect Behavior Order: Validate Before Filter

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:181Incorrect Behavior Order: Validate Before Filter

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:181Incorrect Behavior Order: Validate

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:181Incorrect Behavior Order: Validate Before Filter

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:181Incorrect Behavior Order: Validate Before Filter

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:182Collapse of Data into Unsafe Value

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:182Collapse of Data into Unsafe Value

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:182Collapse of Data into Unsafe Value

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:182Collapse of Data into Unsafe Value

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:182Collapse of Data into Unsafe Value

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 112: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:183 Permissive WhitelistFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:183 Permissive Whitelist FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:183 Permissive WhitelistFB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:183 Permissive WhitelistPMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:183 Permissive WhitelistPMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:184 Incomplete BlacklistFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:184 Incomplete Blacklist FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:184 Incomplete BlacklistFB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:184 Incomplete BlacklistPMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:184 Incomplete BlacklistPMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:185Incorrect Regular Expression

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expression closely mapped

CWE:185Incorrect Regular Expression

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:185Incorrect Regular Expression

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:185Incorrect Regular Expression

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

closely mapped

CWE:185Incorrect Regular Expression

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

closely mapped

Page 113: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:185Incorrect Regular Expression

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:185Incorrect Regular Expression

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:185Incorrect Regular Expression

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:186Overly Restrictive Regular Expression

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy descendant

CWE:186Overly Restrictive Regular Expression

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:186Overly Restrictive Regular Expression

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:186Overly Restrictive Regular Expression

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy descendant

CWE:186Overly Restrictive Regular Expression

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy descendant

CWE:186Overly Restrictive Regular Expression

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:186Overly Restrictive Regular Expression

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:186Overly Restrictive Regular Expression

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:187 Partial ComparisonFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:187 Partial Comparison FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:187 Partial ComparisonFB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:187 Partial ComparisonPMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:187 Partial ComparisonPMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:188Reliance on Data/Memory Layout

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on fieldhierarchy descendant

Page 114: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:189 Numeric ErrorsFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:189 Numeric ErrorsPMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:189 Numeric ErrorsFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:189 Numeric ErrorsFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:189 Numeric ErrorsFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:189 Numeric ErrorsFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:189 Numeric ErrorsFB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:189 Numeric ErrorsFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:189 Numeric Errors FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:189 Numeric ErrorsFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:189 Numeric ErrorsFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:189 Numeric ErrorsFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:189 Numeric ErrorsFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:189 Numeric ErrorsFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:189 Numeric ErrorsFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:189 Numeric ErrorsFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

Page 115: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:189 Numeric ErrorsFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:190Integer Overflow or Wraparound

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

closely mapped

CWE:190Integer Overflow or Wraparound

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

closely mapped

CWE:190Integer Overflow or Wraparound

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:190Integer Overflow or Wraparound

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

closely mapped

CWE:190Integer Overflow or Wraparound

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

closely mapped

CWE:190Integer Overflow or Wraparound

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:190Integer Overflow or Wraparound

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:190Integer Overflow or Wraparound

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

closely mapped

CWE:191Integer Underflow (Wrap or Wraparound)

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:191Integer Underflow (Wrap or Wraparound)

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:191Integer Underflow (Wrap or Wraparound)

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

closely mapped

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:192 Integer Coercion ErrorPMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy descendant

CWE:192 Integer Coercion Error PMD.Design.BadComparison Bad Comparisonhierarchy descendant

Page 116: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:192 Integer Coercion ErrorPMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy descendant

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:192 Integer Coercion Error FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

closely mapped

CWE:192 Integer Coercion ErrorFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

closely mapped

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:192 Integer Coercion ErrorFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

closely mapped

Page 117: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

closely mapped

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

closely mapped

CWE:192 Integer Coercion ErrorFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

closely mapped

CWE:192 Integer Coercion ErrorFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

closely mapped

CWE:193 Off-by-one ErrorFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:193 Off-by-one ErrorFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:193 Off-by-one ErrorFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:194Unexpected Sign Extension

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy descendant

CWE:194Unexpected Sign Extension

PMD.Design.BadComparison Bad Comparisonhierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy descendant

CWE:194Unexpected Sign Extension

PMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

Page 118: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:194Unexpected Sign Extension

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy descendant

CWE:194Unexpected Sign Extension

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

PMD.Design.BadComparison Bad Comparisonhierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

PMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy descendant

Page 119: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy descendant

CWE:195Signed to Unsigned Conversion Error

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

PMD.Design.BadComparison Bad Comparisonhierarchy descendant

Page 120: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

PMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy descendant

CWE:196Unsigned to Signed Conversion Error

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy descendant

Page 121: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:197Numeric Truncation Error

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:197Numeric Truncation Error

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy descendant

CWE:197Numeric Truncation Error

PMD.Design.BadComparison Bad Comparisonhierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy descendant

CWE:197Numeric Truncation Error

PMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

CWE:197Numeric Truncation Error

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

CWE:197Numeric Truncation Error

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:197Numeric Truncation Error

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:197Numeric Truncation Error

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:197Numeric Truncation Error

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy descendant

Page 122: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:197Numeric Truncation Error

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy descendant

CWE:197Numeric Truncation Error

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy descendant

CWE:197Numeric Truncation Error

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy descendant

CWE:198Use of Incorrect Byte Ordering

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on fieldhierarchy descendant

CWE:199Information Management Errors

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:199Information Management Errors

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:199Information Management Errors

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:199Information Management Errors

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:199Information Management Errors

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:199Information Management Errors

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:199Information Management Errors

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:199Information Management Errors

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:199Information Management Errors

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:209Information Exposure Through an Error Message

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:209Information Exposure Through an Error

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:209Information Exposure Through an Error Message

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:209Information Exposure Through an Error

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:209Information Exposure Through an Error

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

Page 123: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:210Information Exposure Through Self-generated Error

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:210Information Exposure Through Self-

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:210Information Exposure Through Self-generated Error

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:210Information Exposure Through Self-

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:210Information Exposure Through Self-

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:211Information Exposure Through Externally-generated Error

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:211Information Exposure Through Externally-

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:211Information Exposure Through Externally-generated Error

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:211Information Exposure Through Externally-

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:211Information Exposure Through Externally-

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:216Containment Errors (Container Errors)

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:216Containment Errors (Container Errors)

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:216Containment Errors (Container Errors)

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:216Containment Errors (Container Errors)

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:221Information Loss or Omission

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:221Information Loss or Omission

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:221Information Loss or Omission

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:221Information Loss or Omission

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:221Information Loss or Omission

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

Page 124: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:226Sensitive Information Uncleared Before Release

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:226Sensitive Information Uncleared Before

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:226Sensitive Information Uncleared Before

PMD.Design.CloseResource Close Resourcehierarchy descendant

CWE:226Sensitive Information Uncleared Before

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

Page 125: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:226Sensitive Information Uncleared Before

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy descendant

CWE:226Sensitive Information Uncleared Before

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 126: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:226Sensitive Information Uncleared Before Release

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:226Sensitive Information Uncleared Before Release

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

Page 127: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return null closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entry closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entry closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

Page 128: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

closely mapped

Page 129: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

Page 130: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

closely mapped

Page 131: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

closely mapped

CWE:227Improper Fulfillment of API Contract ('API Abuse')

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:228Improper Handling of Syntactically Invalid Structure

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:228Improper Handling of Syntactically Invalid Structure

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:228Improper Handling of Syntactically Invalid Structure

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:228Improper Handling of Syntactically Invalid

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:228Improper Handling of Syntactically Invalid Structure

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:228Improper Handling of Syntactically Invalid

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:228Improper Handling of Syntactically Invalid

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:228Improper Handling of Syntactically Invalid

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

Page 132: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:228Improper Handling of Syntactically Invalid Structure

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:228Improper Handling of Syntactically Invalid Structure

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:229Improper Handling of Values

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:229Improper Handling of Values

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:229Improper Handling of Values

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:229Improper Handling of Values

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:229Improper Handling of Values

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:229Improper Handling of Values

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:229Improper Handling of Values

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:229Improper Handling of Values

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:229Improper Handling of Values

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:229Improper Handling of Values

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:230Improper Handling of Missing Values

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:230Improper Handling of Missing Values

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:230Improper Handling of Missing Values

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:230Improper Handling of Missing Values

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:230Improper Handling of Missing Values

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:230Improper Handling of Missing Values

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:230Improper Handling of Missing Values

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

Page 133: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:230Improper Handling of Missing Values

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:230Improper Handling of Missing Values

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:230Improper Handling of Missing Values

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:231Improper Handling of Extra Values

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:231Improper Handling of Extra Values

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:231Improper Handling of Extra Values

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:231Improper Handling of Extra Values

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:231Improper Handling of Extra Values

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:231Improper Handling of Extra Values

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:231Improper Handling of Extra Values

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:231Improper Handling of Extra Values

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:231Improper Handling of Extra Values

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:231Improper Handling of Extra Values

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:232Improper Handling of Undefined Values

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:232Improper Handling of Undefined Values

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:232Improper Handling of Undefined Values

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:232Improper Handling of Undefined Values

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:232Improper Handling of Undefined Values

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:232Improper Handling of Undefined Values

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

Page 134: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:232Improper Handling of Undefined Values

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:232Improper Handling of Undefined Values

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:232Improper Handling of Undefined Values

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:232Improper Handling of Undefined Values

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:233Improper Handling of Parameters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:233Improper Handling of Parameters

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:233Improper Handling of Parameters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:233Improper Handling of Parameters

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:233Improper Handling of Parameters

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:233Improper Handling of Parameters

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:233Improper Handling of Parameters

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:233Improper Handling of Parameters

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:233Improper Handling of Parameters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:233Improper Handling of Parameters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:234Failure to Handle Missing Parameter

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:234Failure to Handle Missing Parameter

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:234Failure to Handle Missing Parameter

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:234Failure to Handle Missing Parameter

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:234Failure to Handle Missing Parameter

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

Page 135: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:234Failure to Handle Missing Parameter

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:234Failure to Handle Missing Parameter

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:234Failure to Handle Missing Parameter

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:234Failure to Handle Missing Parameter

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:234Failure to Handle Missing Parameter

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:235Improper Handling of Extra Parameters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:235Improper Handling of Extra Parameters

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:235Improper Handling of Extra Parameters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:235Improper Handling of Extra Parameters

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:235Improper Handling of Extra Parameters

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:235Improper Handling of Extra Parameters

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:235Improper Handling of Extra Parameters

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:235Improper Handling of Extra Parameters

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:235Improper Handling of Extra Parameters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:235Improper Handling of Extra Parameters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:236Improper Handling of Undefined Parameters

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:236Improper Handling of Undefined Parameters

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:236Improper Handling of Undefined Parameters

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:236Improper Handling of Undefined

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

Page 136: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:236Improper Handling of Undefined Parameters

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:236Improper Handling of Undefined

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:236Improper Handling of Undefined

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:236Improper Handling of Undefined

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:236Improper Handling of Undefined Parameters

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:236Improper Handling of Undefined Parameters

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:237Improper Handling of Structural Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:237Improper Handling of Structural Elements

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:237Improper Handling of Structural Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:237Improper Handling of Structural Elements

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:237Improper Handling of Structural Elements

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:237Improper Handling of Structural Elements

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:237Improper Handling of Structural Elements

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:237Improper Handling of Structural Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:237Improper Handling of Structural Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:237Improper Handling of Structural Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:238Improper Handling of Incomplete Structural Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:238Improper Handling of Incomplete Structural Elements

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:238Improper Handling of Incomplete Structural Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

Page 137: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:238Improper Handling of Incomplete Structural

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:238Improper Handling of Incomplete Structural Elements

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:238Improper Handling of Incomplete Structural

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:238Improper Handling of Incomplete Structural

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:238Improper Handling of Incomplete Structural

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:238Improper Handling of Incomplete Structural Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:238Improper Handling of Incomplete Structural Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:239Failure to Handle Incomplete Element

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:239Failure to Handle Incomplete Element

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:239Failure to Handle Incomplete Element

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:239Failure to Handle Incomplete Element

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:239Failure to Handle Incomplete Element

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:239Failure to Handle Incomplete Element

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:239Failure to Handle Incomplete Element

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:239Failure to Handle Incomplete Element

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:239Failure to Handle Incomplete Element

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:239Failure to Handle Incomplete Element

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:240Improper Handling of Inconsistent Structural Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:240Improper Handling of Inconsistent Structural Elements

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

Page 138: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:240Improper Handling of Inconsistent Structural Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:240Improper Handling of Inconsistent

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:240Improper Handling of Inconsistent Structural Elements

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:240Improper Handling of Inconsistent

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:240Improper Handling of Inconsistent

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:240Improper Handling of Inconsistent

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:240Improper Handling of Inconsistent Structural Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:240Improper Handling of Inconsistent Structural Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:241Improper Handling of Unexpected Data Type

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:241Improper Handling of Unexpected Data Type

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:241Improper Handling of Unexpected Data Type

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:241Improper Handling of Unexpected Data

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:241Improper Handling of Unexpected Data Type

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:241Improper Handling of Unexpected Data

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:241Improper Handling of Unexpected Data

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:241Improper Handling of Unexpected Data

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:241Improper Handling of Unexpected Data Type

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:241Improper Handling of Unexpected Data Type

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 139: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:242Use of Inherently Dangerous Function

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

Page 140: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:243Creation of chroot Jail Without Changing Working Directory

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

Page 141: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:244Improper Clearing of Heap Memory Before

PMD.Design.CloseResource Close Resourcehierarchy descendant

CWE:244Improper Clearing of Heap Memory Before

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 142: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

Page 143: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:244Improper Clearing of Heap Memory Before Release ('Heap

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:244

Improper Clearing of Heap Memory Before Release ('Heap Inspection')

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

Page 144: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:245J2EE Bad Practices: Direct Management of Connections

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 145: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:246J2EE Bad Practices: Direct Use of Sockets

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

Page 146: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:248 Uncaught ExceptionPMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:248 Uncaught Exception PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:248 Uncaught ExceptionFB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:248 Uncaught Exception PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:248 Uncaught ExceptionPMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:248 Uncaught Exception FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:248 Uncaught ExceptionFB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:248 Uncaught ExceptionFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:248 Uncaught ExceptionFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 147: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:248 Uncaught ExceptionFB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:248 Uncaught ExceptionPMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:248 Uncaught ExceptionFB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:248 Uncaught ExceptionFB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:248 Uncaught ExceptionFB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

Page 148: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:250Execution with Unnecessary Privileges

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:250Execution with Unnecessary Privileges

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:251Often Misused: String Management

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:251Often Misused: String Management

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

Page 149: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:251Often Misused: String Management

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:252Unchecked Return Value

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:252Unchecked Return Value

PMD.Basic.CheckResultSet Check Result Set closely mapped

CWE:252Unchecked Return Value

PMD.Basic.CheckSkipResult Check Skip Result closely mapped

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:252Unchecked Return Value

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

closely mapped

CWE:252Unchecked Return Value

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:252Unchecked Return Value

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:252Unchecked Return Value

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

closely mapped

CWE:252Unchecked Return Value

FB.CORRECTNESS.EC_BAD_ARRAY_COMPARE

Invocation of equals() on an array, which is equivalent to ==

hierarchy descendant

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

Page 150: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

closely mapped

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

closely mapped

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

closely mapped

CWE:252Unchecked Return Value

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return value closely mapped

CWE:252Unchecked Return Value

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

closely mapped

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:252Unchecked Return Value

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:252Unchecked Return Value

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

closely mapped

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:252Unchecked Return Value

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:252Unchecked Return Value

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

closely mapped

CWE:252Unchecked Return Value

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 151: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:253Incorrect Check of Function Return Value

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:253Incorrect Check of Function Return Value

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

Page 152: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:253Incorrect Check of Function Return Value

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:253Incorrect Check of Function Return Value

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:254 Security FeaturesFB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:254 Security FeaturesPMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:254 Security FeaturesFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:254 Security FeaturesFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:254 Security FeaturesFB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:254 Security FeaturesFB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:254 Security FeaturesFB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:254 Security FeaturesFB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:254 Security FeaturesFB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:254 Security FeaturesFB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:254 Security FeaturesFB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:254 Security FeaturesFB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:254 Security FeaturesFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

Page 153: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:254 Security FeaturesFB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:254 Security FeaturesFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:254 Security FeaturesFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:254 Security FeaturesFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:254 Security FeaturesFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:255Credentials Management

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:255Credentials Management

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:259Use of Hard-coded Password

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database password closely mapped

CWE:259Use of Hard-coded Password

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

closely mapped

CWE:259Use of Hard-coded Password

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:262Not Using Password Aging

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:262Not Using Password Aging

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:262Not Using Password Aging

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:262Not Using Password Aging

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:262Not Using Password Aging

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:262Not Using Password Aging

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:262Not Using Password Aging

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 154: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:262Not Using Password Aging

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:262Not Using Password Aging

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:262Not Using Password Aging

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:262Not Using Password Aging

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:262Not Using Password Aging

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:262Not Using Password Aging

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:262Not Using Password Aging

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

Page 155: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:262Not Using Password Aging

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:262Not Using Password Aging

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:262Not Using Password Aging

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 156: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:263Password Aging with Long Expiration

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 157: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:263Password Aging with Long Expiration

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:263Password Aging with Long Expiration

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:264Permissions, Privileges, and Access Controls

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:264Permissions, Privileges, and Access Controls

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:264Permissions, Privileges, and Access Controls

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:264Permissions, Privileges, and Access Controls

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:265Privilege / Sandbox Issues

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

closely mapped

CWE:265Privilege / Sandbox Issues

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

closely mapped

CWE:266Incorrect Privilege Assignment

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:266Incorrect Privilege Assignment

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:267Privilege Defined With Unsafe Actions

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:267Privilege Defined With Unsafe Actions

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:268 Privilege ChainingFB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:268 Privilege ChainingFB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

Page 158: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:269Improper Privilege Management

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:269Improper Privilege Management

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:270Privilege Context Switching Error

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:270Privilege Context Switching Error

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:271Privilege Dropping / Lowering Errors

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:271Privilege Dropping / Lowering Errors

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:272Least Privilege Violation

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:272Least Privilege Violation

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:273Improper Check for Dropped Privileges

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:273Improper Check for Dropped Privileges

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:273Improper Check for Dropped Privileges

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:273Improper Check for Dropped Privileges

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:273Improper Check for Dropped Privileges

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:273Improper Check for Dropped Privileges

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:273Improper Check for Dropped Privileges

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

Page 159: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:274Improper Handling of Insufficient Privileges

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:274Improper Handling of Insufficient Privileges

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:274Improper Handling of Insufficient Privileges

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:274Improper Handling of Insufficient Privileges

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:274Improper Handling of Insufficient Privileges

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:274Improper Handling of Insufficient Privileges

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:274Improper Handling of Insufficient Privileges

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:280Improper Handling of Insufficient Permissions or

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:280Improper Handling of Insufficient

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:280Improper Handling of Insufficient Permissions or

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:280Improper Handling of Insufficient

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:280Improper Handling of Insufficient

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:284Improper Access Control

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:284Improper Access Control

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:287Improper Authentication

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:287Improper Authentication

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:289Authentication Bypass by Alternate Name

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:289Authentication Bypass by Alternate Name

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:289Authentication Bypass by Alternate

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

Page 160: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:289Authentication Bypass by Alternate Name

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:289Authentication Bypass by Alternate Name

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

Page 161: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:296Improper Following of a Certificate's Chain of Trust

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:299Improper Check for Certificate Revocation

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 162: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:299Improper Check for Certificate Revocation

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:299Improper Check for Certificate Revocation

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:299Improper Check for Certificate Revocation

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:299Improper Check for Certificate Revocation

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

Page 163: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

Page 164: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:304Missing Critical Step in Authentication

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:304Missing Critical Step in Authentication

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:307

Improper Restriction of Excessive Authentication Attempts

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:307Improper Restriction of Excessive Authentication

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:321Use of Hard-coded Cryptographic Key

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:323Reusing a Nonce, Key Pair in Encryption

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

Page 165: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:325Missing Required Cryptographic Step

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:325Missing Required Cryptographic Step

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

Page 166: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:329Not Using a Random IV with CBC Mode

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:330Use of Insufficiently Random Values

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:330Use of Insufficiently Random Values

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:330Use of Insufficiently Random Values

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

closely mapped

CWE:331 Insufficient EntropyFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:332Insufficient Entropy in PRNG

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:333Improper Handling of Insufficient Entropy in TRNG

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

Page 167: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:333Improper Handling of Insufficient Entropy in

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:333Improper Handling of Insufficient Entropy in TRNG

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:333Improper Handling of Insufficient Entropy in

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:333Improper Handling of Insufficient Entropy in

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:333Improper Handling of Insufficient Entropy in TRNG

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:334Small Space of Random Values

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:335 PRNG Seed ErrorFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:336 Same Seed in PRNGFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:337Predictable Seed in PRNG

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:338Use of Cryptographically Weak Pseudo-

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:339Small Seed Space in PRNG

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:340Predictability Problems

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:341Predictable from Observable State

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:342Predictable Exact Value from Previous Values

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:343Predictable Value Range from Previous Values

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:344Use of Invariant Value in Dynamically Changing Context

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:344Use of Invariant Value in Dynamically Changing Context

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:344Use of Invariant Value in Dynamically Changing Context

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 168: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:350Reliance on Reverse DNS Resolution for a Security-Critical

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:350Reliance on Reverse DNS Resolution for a Security-Critical

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:350Reliance on Reverse DNS Resolution for a Security-Critical

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:350

Reliance on Reverse DNS Resolution for a Security-Critical Action

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:354Improper Validation of Integrity Check Value

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:354Improper Validation of Integrity Check Value

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:354Improper Validation of Integrity Check Value

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:354Improper Validation of Integrity Check Value

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:354Improper Validation of Integrity Check Value

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

Page 169: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:358Improperly Implemented Security Check for Standard

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

Page 170: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:358Improperly Implemented Security Check for Standard

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:361 Time and StateFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:361 Time and StatePMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:361 Time and StatePMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:361 Time and StatePMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:361 Time and StatePMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:361 Time and StatePMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

Page 171: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:361 Time and StateFB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:361 Time and State PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:361 Time and State PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:361 Time and State PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:361 Time and State PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:361 Time and StatePMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:361 Time and StatePMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:361 Time and StateFB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

CWE:361 Time and StateFB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

Page 172: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:361 Time and StateFB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:361 Time and StateCTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:361 Time and StateFB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:361 Time and StateCTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:361 Time and StateCTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

Page 173: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:361 Time and StateFB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:361 Time and StatePMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:361 Time and State FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:361 Time and StateFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:361 Time and StateFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

Page 174: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:361 Time and StateFB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:361 Time and State PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:361 Time and State PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:361 Time and State CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:361 Time and State CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:361 Time and StatePMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:361 Time and StateCTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:361 Time and StateFB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:361 Time and StateFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy ancestor

CWE:361 Time and StatePMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:361 Time and StateFB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:361 Time and StateFB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:361 Time and StateFB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:361 Time and StateFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy ancestor

CWE:361 Time and State FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

Page 175: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:361 Time and StateFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:361 Time and State PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:361 Time and StateCTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:361 Time and StatePMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:361 Time and StatePMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:361 Time and StatePMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:361 Time and StateFB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

Page 176: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:361 Time and StateFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:361 Time and StateCTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:361 Time and StateFB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:361 Time and StateCTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:361 Time and StateFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:361 Time and StateCTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:361 Time and StateFB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:361 Time and StatePMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:361 Time and StateFB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

Page 177: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:361 Time and StateFB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy ancestor

CWE:361 Time and StateFB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:361 Time and StateFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:361 Time and StateFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:362Concurrent Execution using Shared Resource with

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

closely mapped

CWE:362

Concurrent Execution using Shared Resource with Improper

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:362

Concurrent Execution using Shared Resource with Improper

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:362Concurrent Execution using Shared Resource with

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

closely mapped

CWE:362Concurrent Execution using Shared Resource with

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:362

Concurrent Execution using Shared Resource with Improper

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:362Concurrent Execution using Shared Resource with

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:362Concurrent Execution using Shared Resource with

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe content closely mapped

CWE:362

Concurrent Execution using Shared Resource with Improper

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

Page 178: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:362

Concurrent Execution using Shared Resource with Improper

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:362

Concurrent Execution using Shared Resource with Improper Synchronization

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

closely mapped

CWE:362Concurrent Execution using Shared Resource with

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

closely mapped

CWE:362

Concurrent Execution using Shared Resource with Improper

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

closely mapped

CWE:363Race Condition Enabling Link Following

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:363Race Condition Enabling Link Following

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:363Race Condition Enabling Link Following

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:363Race Condition Enabling Link Following

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:363Race Condition Enabling Link Following

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:363Race Condition Enabling Link Following

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:363Race Condition Enabling Link Following

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:363Race Condition Enabling Link Following

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:364Signal Handler Race Condition

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:364Signal Handler Race Condition

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:364Signal Handler Race Condition

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:364Signal Handler Race Condition

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 179: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:364Signal Handler Race Condition

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:364Signal Handler Race Condition

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:364Signal Handler Race Condition

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:364Signal Handler Race Condition

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:365Race Condition in Switch

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:365Race Condition in Switch

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:365Race Condition in Switch

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:365Race Condition in Switch

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:365Race Condition in Switch

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:365Race Condition in Switch

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:365Race Condition in Switch

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:365Race Condition in Switch

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy descendant

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendar closely mapped

Page 180: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormat closely mapped

CWE:366Race Condition within a Thread

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronization closely mapped

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:366Race Condition within a Thread

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:366Race Condition within a Thread

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:366Race Condition within a Thread

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar field closely mapped

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormat closely mapped

CWE:366Race Condition within a Thread

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:366Race Condition within a Thread

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:366Race Condition within a Thread

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:366Race Condition within a Thread

FB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy descendant

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

Page 181: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:367Time-of-check Time-of-use (TOCTOU) Race Condition

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:368Context Switching Race Condition

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:368Context Switching Race Condition

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:368Context Switching Race Condition

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:368Context Switching Race Condition

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:368Context Switching Race Condition

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:368Context Switching Race Condition

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:368Context Switching Race Condition

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:368Context Switching Race Condition

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:369 Divide By Zero PMD.Design.BadComparison Bad Comparisonhierarchy descendant

CWE:369 Divide By ZeroFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:369 Divide By ZeroPMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy descendant

CWE:369 Divide By ZeroFB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy descendant

Page 182: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:369 Divide By ZeroFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:369 Divide By ZeroFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:370Missing Check for Certificate Revocation

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:370Missing Check for Certificate Revocation

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 183: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:370Missing Check for Certificate Revocation

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:370Missing Check for Certificate Revocation after Initial Check

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:371 State IssuesPMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:371 State IssuesFB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

Page 184: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:371 State IssuesFB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:371 State IssuesFB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:372Incomplete Internal State Distinction

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:372Incomplete Internal State Distinction

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:372Incomplete Internal State Distinction

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:372Incomplete Internal State Distinction

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:372Incomplete Internal State Distinction

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:374Passing Mutable Objects to an Untrusted Method

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:374Passing Mutable Objects to an Untrusted Method

FB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

closely mapped

CWE:374Passing Mutable Objects to an Untrusted Method

FB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

closely mapped

CWE:374Passing Mutable Objects to an Untrusted Method

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:374Passing Mutable Objects to an Untrusted Method

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:375Returning a Mutable Object to an Untrusted Caller

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

Page 185: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:375Returning a Mutable Object to an Untrusted Caller

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:375Returning a Mutable Object to an Untrusted Caller

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:380Technology-Specific Time and State Issues

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:380Technology-Specific Time and State Issues

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:380Technology-Specific Time and State Issues

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:380Technology-Specific Time and State Issues

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:380Technology-Specific Time and State Issues

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:380Technology-Specific Time and State Issues

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:381J2EE Time and State Issues

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:381J2EE Time and State Issues

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:381J2EE Time and State Issues

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:381J2EE Time and State Issues

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:381J2EE Time and State Issues

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:381J2EE Time and State Issues

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:382J2EE Bad Practices: Use of System.exit()

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

Page 186: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:382J2EE Bad Practices: Use of System.exit()

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exit closely mapped

CWE:382J2EE Bad Practices: Use of System.exit()

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...) closely mapped

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:382J2EE Bad Practices: Use of System.exit()

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

Page 187: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:382J2EE Bad Practices: Use of System.exit()

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

PMD.J2EE.DoNotUseThreads Do Not Use Threads closely mapped

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

Page 188: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:383J2EE Bad Practices: Direct Use of Threads

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:385Covert Timing Channel

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:385Covert Timing Channel

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:385Covert Timing Channel

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:385Covert Timing Channel

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:385Covert Timing Channel

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:385Covert Timing Channel

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:385Covert Timing Channel

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 189: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:385Covert Timing Channel

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:385Covert Timing Channel

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:385Covert Timing Channel

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:385Covert Timing Channel

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:385Covert Timing Channel

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:385Covert Timing Channel

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:385Covert Timing Channel

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:385Covert Timing Channel

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:385Covert Timing Channel

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:385Covert Timing Channel

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

Page 190: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:388 Error HandlingPMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:388 Error HandlingPMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:388 Error HandlingPMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:388 Error Handling PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:388 Error Handling PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:388 Error HandlingFB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:388 Error HandlingPMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:388 Error HandlingFB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:388 Error HandlingFB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:388 Error HandlingFB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:388 Error HandlingFB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:388 Error HandlingFB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:388 Error HandlingFB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:388 Error HandlingFB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:388 Error HandlingFB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:388 Error HandlingFB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:388 Error Handling PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:388 Error HandlingFB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

Page 191: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:388 Error HandlingPMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:388 Error HandlingPMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:388 Error HandlingPMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:389Error Conditions, Return Values, Status

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

Page 192: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:389Error Conditions, Return Values, Status

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:389Error Conditions, Return Values, Status

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:389Error Conditions, Return Values, Status

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:389Error Conditions, Return Values, Status Codes

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:390Detection of Error Condition Without Action

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:390Detection of Error Condition Without

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:390Detection of Error Condition Without Action

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:390Detection of Error Condition Without

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:390Detection of Error Condition Without

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:391Unchecked Error Condition

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:391Unchecked Error Condition

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:391Unchecked Error Condition

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:391Unchecked Error Condition

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Block closely mapped

CWE:391Unchecked Error Condition

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:391Unchecked Error Condition

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exception closely mapped

CWE:391Unchecked Error Condition

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exception closely mapped

CWE:392Missing Report of Error Condition

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 193: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:392Missing Report of Error Condition

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:392Missing Report of Error Condition

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:392Missing Report of Error Condition

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:392Missing Report of Error Condition

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:392Missing Report of Error Condition

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:393Return of Wrong Status Code

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 194: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:393Return of Wrong Status Code

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:393Return of Wrong Status Code

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:393Return of Wrong Status Code

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:393Return of Wrong Status Code

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:393Return of Wrong Status Code

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:394Unexpected Status Code or Return Value

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:394Unexpected Status Code or Return Value

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:394Unexpected Status Code or Return Value

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

Page 195: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:394Unexpected Status Code or Return Value

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:394Unexpected Status Code or Return Value

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:395Use of NullPointerException Catch to Detect NULL

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPE closely mapped

CWE:395Use of NullPointerException Catch to Detect NULL

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:395Use of NullPointerException

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:395Use of NullPointerException Catch to Detect NULL

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:395Use of NullPointerException

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:395Use of NullPointerException Catch to Detect NULL

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:395Use of NullPointerException

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:395Use of NullPointerException

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:395

Use of NullPointerException Catch to Detect NULL Pointer Dereference

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:395Use of NullPointerException Catch to Detect NULL

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:395Use of NullPointerException

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:395Use of NullPointerException Catch to Detect NULL

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:395Use of NullPointerException Catch to Detect NULL

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:396Declaration of Catch for Generic Exception

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

closely mapped

CWE:396Declaration of Catch for Generic Exception

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:396Declaration of Catch for Generic Exception

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:396Declaration of Catch for Generic Exception

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:396Declaration of Catch for Generic Exception

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:396Declaration of Catch for Generic Exception

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

Page 196: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:396Declaration of Catch for Generic Exception

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

closely mapped

CWE:396Declaration of Catch for Generic Exception

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:396Declaration of Catch for Generic Exception

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:396Declaration of Catch for Generic Exception

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:396Declaration of Catch for Generic Exception

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:396Declaration of Catch for Generic Exception

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:396Declaration of Catch for Generic Exception

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:396Declaration of Catch for Generic Exception

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:397Declaration of Throws for Generic Exception

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:397Declaration of Throws for Generic Exception

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:397Declaration of Throws for Generic Exception

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

closely mapped

CWE:397Declaration of Throws for Generic Exception

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:397Declaration of Throws for Generic Exception

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:397Declaration of Throws for Generic Exception

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:397Declaration of Throws for Generic Exception

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:397Declaration of Throws for Generic Exception

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:397Declaration of Throws for Generic Exception

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:397Declaration of Throws for Generic Exception

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:397Declaration of Throws for Generic Exception

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

closely mapped

Page 197: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:397Declaration of Throws for Generic Exception

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

closely mapped

CWE:397Declaration of Throws for Generic Exception

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:397Declaration of Throws for Generic Exception

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:397Declaration of Throws for Generic Exception

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

closely mapped

CWE:398Indicator of Poor Code Quality

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Naming.AvoidDollarSigns Avoid Dollar Signs closely mapped

CWE:398Indicator of Poor Code Quality

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

closely mapped

CWE:398Indicator of Poor Code Quality

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

closely mapped

CWE:398Indicator of Poor Code Quality

PMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

Page 198: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

closely mapped

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

closely mapped

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method names closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

Page 199: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

closely mapped

CWE:398Indicator of Poor Code Quality

PMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

closely mapped

CWE:398Indicator of Poor Code Quality

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

Page 200: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Naming.MethodNamingConventions

Method Naming Conventions closely mapped

CWE:398Indicator of Poor Code Quality

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

closely mapped

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

Page 201: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:398Indicator of Poor Code Quality

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

Page 202: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:398Indicator of Poor Code Quality

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Name closely mapped

Page 203: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:398Indicator of Poor Code Quality

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

closely mapped

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:398Indicator of Poor Code Quality

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

Page 204: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

closely mapped

CWE:398Indicator of Poor Code Quality

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method names closely mapped

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

closely mapped

CWE:398Indicator of Poor Code Quality

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

closely mapped

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:398Indicator of Poor Code Quality

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

Page 205: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:399Resource Management Errors

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:399Resource Management Errors

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:399Resource Management Errors

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:399Resource Management Errors

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:399Resource Management Errors

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:399Resource Management Errors

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:399Resource Management Errors

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:399Resource Management Errors

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:399Resource Management Errors

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:399Resource Management Errors

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

Page 206: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:399Resource Management Errors

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:399Resource Management Errors

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:399Resource Management Errors

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:399Resource Management Errors

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:399Resource Management Errors

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:399Resource Management Errors

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:399Resource Management Errors

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:399Resource Management Errors

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:399Resource Management Errors

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:399Resource Management Errors

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:399Resource Management Errors

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:399Resource Management Errors

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:399Resource Management Errors

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

Page 207: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:399Resource Management Errors

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:399Resource Management Errors

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:399Resource Management Errors

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:400Uncontrolled Resource

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:400Uncontrolled Resource Consumption

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:400Uncontrolled Resource Consumption

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:400Uncontrolled Resource Consumption

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource Exhaustion')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource Exhaustion')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:400Uncontrolled Resource

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 208: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:400

Uncontrolled Resource Consumption ('Resource

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource Exhaustion')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:400Uncontrolled Resource Consumption

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:400Uncontrolled Resource

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:400Uncontrolled Resource Consumption

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource Exhaustion')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource Exhaustion')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:400Uncontrolled Resource

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:400Uncontrolled Resource Consumption

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:400Uncontrolled Resource Consumption

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:400Uncontrolled Resource Consumption

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:400Uncontrolled Resource Consumption

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:400Uncontrolled Resource Consumption

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:400

Uncontrolled Resource Consumption ('Resource

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

Page 209: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:400Uncontrolled Resource Consumption

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory Leak')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory Leak')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory Leak')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

Page 210: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:401Improper Release of Memory Before Removing Last

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory Leak')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory Leak')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:401

Improper Release of Memory Before Removing Last Reference ('Memory

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:401Improper Release of Memory Before Removing Last

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:402Transmission of Private Resources

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

Page 211: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:402Transmission of Private Resources into a New Sphere

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:402Transmission of Private Resources

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:402Transmission of Private Resources

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 212: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:402

Transmission of Private Resources into a New Sphere ('Resource Leak')

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:402Transmission of Private Resources into a New Sphere

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 213: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File Descriptor Leak')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File Descriptor Leak')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File Descriptor Leak')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File Descriptor Leak')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File Descriptor Leak')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

Page 214: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:403Exposure of File Descriptor to Unintended Control

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:403

Exposure of File Descriptor to Unintended Control Sphere ('File

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:403Exposure of File Descriptor to Unintended Control

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 215: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:404Improper Resource Shutdown or Release

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:404Improper Resource Shutdown or Release

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

Page 216: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:404Improper Resource Shutdown or Release

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:404Improper Resource Shutdown or Release

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:405Asymmetric Resource Consumption

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 217: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:405Asymmetric Resource Consumption

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:405Asymmetric Resource Consumption

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

Page 218: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:405Asymmetric Resource Consumption (Amplification)

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 219: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 220: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:406

Insufficient Control of Network Message Volume (Network Amplification)

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:406Insufficient Control of Network Message Volume (Network

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:407Algorithmic Complexity

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:407Algorithmic Complexity

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:407Algorithmic Complexity

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:407Algorithmic Complexity

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:407Algorithmic Complexity

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:407Algorithmic Complexity

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:407Algorithmic Complexity

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:407Algorithmic Complexity

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 221: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:407Algorithmic Complexity

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:407Algorithmic Complexity

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:407Algorithmic Complexity

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:407Algorithmic Complexity

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:407Algorithmic Complexity

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:407Algorithmic Complexity

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:407Algorithmic Complexity

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:407Algorithmic Complexity

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:407Algorithmic Complexity

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:408Incorrect Behavior Order: Early

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 222: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:408Incorrect Behavior Order: Early Amplification

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:408Incorrect Behavior Order: Early

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:408Incorrect Behavior Order: Early

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

Page 223: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:408Incorrect Behavior Order: Early Amplification

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:408Incorrect Behavior Order: Early

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:408Incorrect Behavior Order: Early Amplification

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 224: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 225: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 226: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:409

Improper Handling of Highly Compressed Data (Data Amplification)

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:409Improper Handling of Highly Compressed Data (Data

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 227: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:410Insufficient Resource Pool

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:410Insufficient Resource Pool

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:410Insufficient Resource Pool

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:410Insufficient Resource Pool

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:411Resource Locking Problems

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:411Resource Locking Problems

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 228: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:411Resource Locking Problems

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:411Resource Locking Problems

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:411Resource Locking Problems

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:411Resource Locking Problems

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:411Resource Locking Problems

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:411Resource Locking Problems

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:411Resource Locking Problems

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:411Resource Locking Problems

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:411Resource Locking Problems

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

Page 229: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:411Resource Locking Problems

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:411Resource Locking Problems

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:411Resource Locking Problems

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:411Resource Locking Problems

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:411Resource Locking Problems

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:411Resource Locking Problems

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:412Unrestricted Externally Accessible

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 230: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:412Unrestricted Externally Accessible Lock

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:412Unrestricted Externally Accessible

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:412Unrestricted Externally Accessible

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:412Unrestricted Externally Accessible

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

Page 231: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:412Unrestricted Externally Accessible

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:412Unrestricted Externally Accessible

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

Page 232: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:412Unrestricted Externally Accessible Lock

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

Page 233: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:412Unrestricted Externally Accessible Lock

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:413Improper Resource Locking

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:413Improper Resource Locking

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:413Improper Resource Locking

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:413Improper Resource Locking

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:413Improper Resource Locking

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:413Improper Resource Locking

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:413Improper Resource Locking

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:413Improper Resource Locking

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:413Improper Resource Locking

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 234: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:413Improper Resource Locking

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:413Improper Resource Locking

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:413Improper Resource Locking

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:413Improper Resource Locking

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:413Improper Resource Locking

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:413Improper Resource Locking

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:413Improper Resource Locking

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

Page 235: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:413Improper Resource Locking

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:413Improper Resource Locking

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:413Improper Resource Locking

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:413Improper Resource Locking

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:413Improper Resource Locking

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:413Improper Resource Locking

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:413Improper Resource Locking

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

Page 236: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:413Improper Resource Locking

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:413Improper Resource Locking

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:413Improper Resource Locking

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:413Improper Resource Locking

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:413Improper Resource Locking

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:414 Missing Lock CheckFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:414 Missing Lock Check PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:414 Missing Lock CheckPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:414 Missing Lock CheckPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:414 Missing Lock CheckCTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:414 Missing Lock CheckFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:414 Missing Lock CheckFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:414 Missing Lock CheckFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

Page 237: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:414 Missing Lock CheckPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:414 Missing Lock Check FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:414 Missing Lock CheckCTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:414 Missing Lock CheckCTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:414 Missing Lock CheckPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:414 Missing Lock CheckPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:414 Missing Lock CheckFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 238: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:414 Missing Lock Check CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:414 Missing Lock Check CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:414 Missing Lock CheckFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:414 Missing Lock CheckFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:414 Missing Lock CheckPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:414 Missing Lock CheckPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

Page 239: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:414 Missing Lock CheckCTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:414 Missing Lock CheckCTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:414 Missing Lock CheckCTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:414 Missing Lock CheckFB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:414 Missing Lock CheckFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:414 Missing Lock CheckFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:414 Missing Lock CheckFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:415 Double Free PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:415 Double FreePMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

Page 240: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:415 Double FreePMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:415 Double Free FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

Page 241: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:415 Double FreeFB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:415 Double FreePMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:415 Double FreeFB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy descendant

CWE:415 Double FreeFB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy descendant

CWE:415 Double Free FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:415 Double FreePMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:415 Double FreePMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:415 Double FreeFB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

Page 242: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:415 Double FreePMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:415 Double FreePMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:415 Double FreeFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:415 Double FreeFB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:415 Double FreeFB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:416 Use After FreeFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:416 Use After Free PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:416 Use After FreePMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:416 Use After FreePMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

Page 243: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:416 Use After FreeFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:416 Use After FreeFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:416 Use After FreeFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:416 Use After FreePMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:416 Use After Free FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:416 Use After FreePMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:416 Use After FreePMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:416 Use After FreeFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 244: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:416 Use After FreePMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:416 Use After FreePMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:416 Use After FreeFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:416 Use After FreeFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:416 Use After FreeFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:417Channel and Path Errors

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:417Channel and Path Errors

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:417Channel and Path Errors

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:417Channel and Path Errors

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:417Channel and Path Errors

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:417Channel and Path Errors

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:417Channel and Path Errors

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 245: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:417Channel and Path Errors

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:417Channel and Path Errors

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:417Channel and Path Errors

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:417Channel and Path Errors

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:417Channel and Path Errors

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:417Channel and Path Errors

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:417Channel and Path Errors

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

Page 246: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:417Channel and Path Errors

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:417Channel and Path Errors

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:417Channel and Path Errors

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:418 Channel ErrorsFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:418 Channel Errors PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:418 Channel ErrorsPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:418 Channel ErrorsPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:418 Channel ErrorsFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:418 Channel ErrorsFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:418 Channel ErrorsFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 247: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:418 Channel ErrorsPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:418 Channel Errors FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:418 Channel ErrorsPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:418 Channel ErrorsPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:418 Channel ErrorsFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:418 Channel ErrorsPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:418 Channel ErrorsPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:418 Channel ErrorsFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 248: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:418 Channel ErrorsFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:418 Channel ErrorsFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 249: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:419Unprotected Primary Channel

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:419Unprotected Primary Channel

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:419Unprotected Primary Channel

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:419Unprotected Primary Channel

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:420Unprotected Alternate Channel

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 250: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:420Unprotected Alternate Channel

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:420Unprotected Alternate Channel

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:420Unprotected Alternate Channel

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:420Unprotected Alternate Channel

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:420Unprotected Alternate Channel

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

Page 251: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:420Unprotected Alternate Channel

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:420Unprotected Alternate Channel

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:420Unprotected Alternate Channel

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:420Unprotected Alternate Channel

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:420Unprotected Alternate Channel

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:421Race Condition During Access to

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 252: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:421Race Condition During Access to Alternate Channel

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:421Race Condition During Access to

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:421Race Condition During Access to

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 253: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:421Race Condition During Access to Alternate Channel

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

Page 254: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

Page 255: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:422Unprotected Windows Messaging Channel ('Shatter')

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:422Unprotected Windows Messaging Channel ('Shatter')

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 256: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:424Improper Protection of Alternate Path

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

Page 257: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:424Improper Protection of Alternate Path

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:424Improper Protection of Alternate Path

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

Page 258: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:425Direct Request ('Forced Browsing')

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

Page 259: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:425Direct Request ('Forced Browsing')

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:426Untrusted Search Path

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:426Untrusted Search Path

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:426Untrusted Search Path

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:426Untrusted Search Path

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:426Untrusted Search Path

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:426Untrusted Search Path

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:426Untrusted Search Path

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 260: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:426Untrusted Search Path

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:426Untrusted Search Path

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:426Untrusted Search Path

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:426Untrusted Search Path

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:426Untrusted Search Path

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:426Untrusted Search Path

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:426Untrusted Search Path

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:426Untrusted Search Path

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:426Untrusted Search Path

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:426Untrusted Search Path

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

Page 261: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:427Uncontrolled Search Path Element

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:427Uncontrolled Search Path Element

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:427Uncontrolled Search Path Element

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:427Uncontrolled Search Path Element

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:427Uncontrolled Search Path Element

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:427Uncontrolled Search Path Element

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

Page 262: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:427Uncontrolled Search Path Element

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:427Uncontrolled Search Path Element

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:427Uncontrolled Search Path Element

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:427Uncontrolled Search Path Element

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 263: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:428Unquoted Search Path or Element

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

Page 264: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:428Unquoted Search Path or Element

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:428Unquoted Search Path or Element

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:428Unquoted Search Path or Element

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:430Deployment of Wrong Handler

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:430Deployment of Wrong Handler

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:431 Missing HandlerFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:431 Missing HandlerFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:432Dangerous Signal Handler not Disabled During Sensitive

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:432Dangerous Signal Handler not Disabled During Sensitive

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:432

Dangerous Signal Handler not Disabled During Sensitive Operations

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:432Dangerous Signal Handler not Disabled During Sensitive

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:432Dangerous Signal Handler not Disabled During Sensitive

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

Page 265: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:432

Dangerous Signal Handler not Disabled During Sensitive Operations

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:432Dangerous Signal Handler not Disabled During Sensitive

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:432

Dangerous Signal Handler not Disabled During Sensitive Operations

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:435 Interaction ErrorPMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

CWE:435 Interaction ErrorPMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:435 Interaction ErrorFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:435 Interaction ErrorFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:438 Behavioral ProblemsPMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

CWE:438 Behavioral ProblemsPMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:438 Behavioral Problems PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:438 Behavioral Problems PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

Page 266: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:438 Behavioral ProblemsFB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:438 Behavioral Problems FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:438 Behavioral Problems

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

Page 267: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:438 Behavioral ProblemsFB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:438 Behavioral Problems PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:438 Behavioral Problems FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:438 Behavioral ProblemsFB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

Page 268: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:438 Behavioral ProblemsPMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:438 Behavioral ProblemsFB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:439Behavioral Change in New Version or

PMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifier closely mapped

CWE:439Behavioral Change in New Version or

PMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifier closely mapped

CWE:439Behavioral Change in New Version or Environment

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

closely mapped

CWE:439Behavioral Change in New Version or Environment

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

closely mapped

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for month closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

closely mapped

Page 269: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:440Expected Behavior Violation

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

closely mapped

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

closely mapped

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an array closely mapped

Page 270: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

closely mapped

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:440Expected Behavior Violation

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

closely mapped

CWE:440Expected Behavior Violation

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

closely mapped

CWE:440Expected Behavior Violation

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

closely mapped

CWE:440Expected Behavior Violation

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

closely mapped

CWE:440Expected Behavior Violation

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

closely mapped

CWE:440Expected Behavior Violation

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

closely mapped

CWE:440Expected Behavior Violation

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method arguments closely mapped

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:440Expected Behavior Violation

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

Page 271: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:440Expected Behavior Violation

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

closely mapped

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collections closely mapped

CWE:440Expected Behavior Violation

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:440Expected Behavior Violation

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes next closely mapped

CWE:441Unintended Proxy or Intermediary ('Confused Deputy')

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:441Unintended Proxy or Intermediary ('Confused Deputy')

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:442 Web ProblemsFB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:442 Web ProblemsFB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:442 Web ProblemsFB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:442 Web ProblemsFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:442 Web ProblemsFB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

Page 272: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:446UI Discrepancy for Security Feature

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

Page 273: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:447Unimplemented or Unsupported Feature in UI

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:448Obsolete Feature in UI

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

Page 274: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:448Obsolete Feature in UI

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:448Obsolete Feature in UI

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:449The UI Performs the Wrong Action

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 275: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:451User Interface (UI) Misrepresentation of Critical Information

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:452Initialization and Cleanup Errors

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

Page 276: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:452Initialization and Cleanup Errors

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:452Initialization and Cleanup Errors

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:453Insecure Default Variable Initialization

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:454External Initialization of Trusted Variables

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:455Non-exit on Failed Initialization

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:455Non-exit on Failed Initialization

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:455Non-exit on Failed Initialization

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:455Non-exit on Failed Initialization

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:455Non-exit on Failed Initialization

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:455Non-exit on Failed Initialization

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:455Non-exit on Failed Initialization

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:455Non-exit on Failed Initialization

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:455Non-exit on Failed Initialization

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:455Non-exit on Failed Initialization

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:455Non-exit on Failed Initialization

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

Page 277: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:455Non-exit on Failed Initialization

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:455Non-exit on Failed Initialization

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:456Missing Initialization of a Variable

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:456Missing Initialization of a Variable

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten field closely mapped

CWE:456Missing Initialization of a Variable

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

closely mapped

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:457Use of Uninitialized Variable

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:457Use of Uninitialized Variable

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:457Use of Uninitialized Variable

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 278: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:457Use of Uninitialized Variable

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:457Use of Uninitialized Variable

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:457Use of Uninitialized Variable

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:457Use of Uninitialized Variable

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:457Use of Uninitialized Variable

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

closely mapped

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

closely mapped

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

Page 279: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:457Use of Uninitialized Variable

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:457Use of Uninitialized Variable

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:457Use of Uninitialized Variable

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:459 Incomplete CleanupFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:459 Incomplete Cleanup PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:459 Incomplete CleanupPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:459 Incomplete CleanupPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:459 Incomplete CleanupFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:459 Incomplete CleanupFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:459 Incomplete CleanupFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:459 Incomplete Cleanup PMD.Design.CloseResource Close Resource closely mapped

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 280: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:459 Incomplete CleanupPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:459 Incomplete Cleanup FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:459 Incomplete CleanupPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:459 Incomplete CleanupPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:459 Incomplete CleanupFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:459 Incomplete CleanupFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

closely mapped

CWE:459 Incomplete CleanupFB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

closely mapped

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

closely mapped

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

closely mapped

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close stream closely mapped

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

closely mapped

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

Page 281: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:459 Incomplete CleanupPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:459 Incomplete CleanupPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:459 Incomplete CleanupFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:459 Incomplete CleanupFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:459 Incomplete CleanupFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

Page 282: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Design.CloseResource Close Resourcehierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy descendant

Page 283: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:460Improper Cleanup on Thrown Exception

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:460Improper Cleanup on Thrown Exception

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

Page 284: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

Page 285: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:462Duplicate Key in Associative List (Alist)

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:462Duplicate Key in Associative List (Alist)

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:463Deletion of Data Structure Sentinel

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:463Deletion of Data Structure Sentinel

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:463Deletion of Data Structure Sentinel

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:463Deletion of Data Structure Sentinel

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:463Deletion of Data Structure Sentinel

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:464Addition of Data Structure Sentinel

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:464Addition of Data Structure Sentinel

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:464Addition of Data Structure Sentinel

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:464Addition of Data Structure Sentinel

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:464Addition of Data Structure Sentinel

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:465 Pointer Issues PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

Page 286: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:465 Pointer IssuesFB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:465 Pointer IssuesFB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

Page 287: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:465 Pointer IssuesFB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:465 Pointer IssuesFB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:465 Pointer IssuesFB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:465 Pointer IssuesFB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:465 Pointer IssuesFB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:467Use of sizeof() on a Pointer Type

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:467Use of sizeof() on a Pointer Type

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:467Use of sizeof() on a Pointer Type

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

Page 288: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:468Incorrect Pointer Scaling

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:468Incorrect Pointer Scaling

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:468Incorrect Pointer Scaling

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:469Use of Pointer Subtraction to Determine Size

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy descendant

CWE:469Use of Pointer Subtraction to Determine Size

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy descendant

CWE:469Use of Pointer Subtraction to Determine Size

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy descendant

CWE:470

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:470

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:471Modification of Assumed-Immutable Data (MAID)

FB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:471Modification of Assumed-Immutable Data (MAID)

FB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:471Modification of Assumed-Immutable Data (MAID)

FB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:474Use of Function with Inconsistent Implementations

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:474Use of Function with Inconsistent

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 289: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:474Use of Function with Inconsistent Implementations

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:474Use of Function with Inconsistent

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:474Use of Function with Inconsistent

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

Page 290: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:474Use of Function with Inconsistent Implementations

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 291: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

Page 292: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:475Undefined Behavior for Input to API

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 293: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:475Undefined Behavior for Input to API

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:476NULL Pointer Dereference

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:476NULL Pointer Dereference

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:476NULL Pointer Dereference

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:476NULL Pointer Dereference

PMD.Basic.BrokenNullCheck Broken Null Check closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

Page 294: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return null closely mapped

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:476NULL Pointer Dereference

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

closely mapped

CWE:476NULL Pointer Dereference

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

closely mapped

CWE:476NULL Pointer Dereference

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

closely mapped

CWE:476NULL Pointer Dereference

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null value closely mapped

CWE:476NULL Pointer Dereference

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:476NULL Pointer Dereference

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

closely mapped

Page 295: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

closely mapped

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereference closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

closely mapped

CWE:476NULL Pointer Dereference

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereference closely mapped

CWE:476NULL Pointer Dereference

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

closely mapped

Page 296: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:476NULL Pointer Dereference

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten field closely mapped

CWE:476NULL Pointer Dereference

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

closely mapped

CWE:476NULL Pointer Dereference

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:476NULL Pointer Dereference

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

closely mapped

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

closely mapped

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:476NULL Pointer Dereference

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

closely mapped

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

closely mapped

CWE:476NULL Pointer Dereference

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return null closely mapped

Page 297: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:477Use of Obsolete Functions

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:477Use of Obsolete Functions

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:477Use of Obsolete Functions

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:477Use of Obsolete Functions

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:477Use of Obsolete Functions

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:477Use of Obsolete Functions

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

Page 298: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:477Use of Obsolete Functions

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:477Use of Obsolete Functions

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:477Use of Obsolete Functions

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:477Use of Obsolete Functions

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:477Use of Obsolete Functions

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

Page 299: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:478Missing Default Case in Switch Statement

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

Page 300: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:478Missing Default Case in Switch Statement

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

closely mapped

CWE:478Missing Default Case in Switch Statement

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

closely mapped

CWE:478Missing Default Case in Switch Statement

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:478Missing Default Case in Switch Statement

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

Page 301: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:479Signal Handler Use of a Non-reentrant Function

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.CORRECTNESS.EC_BAD_ARRAY_COMPARE

Invocation of equals() on an array, which is equivalent to ==

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

Page 302: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:479Signal Handler Use of a Non-reentrant Function

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 303: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 304: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:480Use of Incorrect Operator

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:480Use of Incorrect Operator

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 305: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:480Use of Incorrect Operator

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:480Use of Incorrect Operator

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:481Assigning instead of Comparing

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:481Assigning instead of Comparing

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:481Assigning instead of Comparing

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:481Assigning instead of Comparing

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 306: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:481Assigning instead of Comparing

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:481Assigning instead of Comparing

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:481Assigning instead of Comparing

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

closely mapped

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

Page 307: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:481Assigning instead of Comparing

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:481Assigning instead of Comparing

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:481Assigning instead of Comparing

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:481Assigning instead of Comparing

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

Page 308: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

Page 309: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:482Comparing instead of Assigning

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:482Comparing instead of Assigning

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:482Comparing instead of Assigning

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:482Comparing instead of Assigning

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 310: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

Page 311: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:483Incorrect Block Delimitation

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:483Incorrect Block Delimitation

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:483Incorrect Block Delimitation

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:483Incorrect Block Delimitation

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

Page 312: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

closely mapped

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

closely mapped

CWE:484Omitted Break Statement in Switch

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Design.MissingBreakInSwitch Missing Break In Switch closely mapped

Page 313: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:484Omitted Break Statement in Switch

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:484Omitted Break Statement in Switch

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

closely mapped

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:484Omitted Break Statement in Switch

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:485Insufficient Encapsulation

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

Page 314: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:485Insufficient Encapsulation

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:485Insufficient Encapsulation

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:485Insufficient Encapsulation

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:485Insufficient Encapsulation

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:485Insufficient Encapsulation

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:485Insufficient Encapsulation

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:485Insufficient Encapsulation

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:486Comparison of Classes by Name

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:486Comparison of Classes by Name

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:486Comparison of Classes by Name

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:486Comparison of Classes by Name

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:486Comparison of Classes by Name

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:486Comparison of Classes by Name

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:486Comparison of Classes by Name

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 315: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:486Comparison of Classes by Name

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

closely mapped

CWE:487Reliance on Package-level Scope

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:487Reliance on Package-level Scope

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:487Reliance on Package-level Scope

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:490 Mobile Code IssuesPMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:490 Mobile Code IssuesFB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:490 Mobile Code IssuesFB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:490 Mobile Code IssuesFB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:490 Mobile Code IssuesCTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:490 Mobile Code IssuesPMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:491Public cloneable() Method Without Final ('Object Hijack')

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:491Public cloneable() Method Without Final ('Object Hijack')

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:491Public cloneable() Method Without Final ('Object Hijack')

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:492Use of Inner Class Containing Sensitive Data

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:492Use of Inner Class Containing Sensitive Data

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:492Use of Inner Class Containing Sensitive Data

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe content closely mapped

Page 316: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:492Use of Inner Class Containing Sensitive Data

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:493Critical Public Variable Without Final Modifier

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:493Critical Public Variable Without Final

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:493Critical Public Variable Without Final Modifier

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

closely mapped

CWE:493Critical Public Variable Without Final Modifier

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:493Critical Public Variable Without Final Modifier

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:493Critical Public Variable Without Final

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:493Critical Public Variable Without Final Modifier

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:495Private Array-Typed Field Returned From A Public Method

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Array closely mapped

CWE:495Private Array-Typed Field Returned From A Public Method

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

closely mapped

CWE:497Exposure of System Data to an Unauthorized Control

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:497Exposure of System Data to an

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:497Exposure of System Data to an Unauthorized Control

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:497Exposure of System Data to an

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:497Exposure of System Data to an

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:498Cloneable Class Containing Sensitive Information

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:498Cloneable Class Containing Sensitive Information

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

Page 317: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:498Cloneable Class Containing Sensitive Information

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:500Public Static Field Not Marked Final

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:500Public Static Field Not Marked Final

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Static closely mapped

CWE:500Public Static Field Not Marked Final

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy descendant

CWE:500Public Static Field Not Marked Final

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should be closely mapped

CWE:500Public Static Field Not Marked Final

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:500Public Static Field Not Marked Final

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Final closely mapped

CWE:500Public Static Field Not Marked Final

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:503 Byte/Object CodePMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:503 Byte/Object CodeFB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:503 Byte/Object CodeFB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:503 Byte/Object CodeFB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:503 Byte/Object CodeCTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:503 Byte/Object CodePMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:514 Covert ChannelFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:514 Covert Channel PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:514 Covert ChannelPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:514 Covert ChannelPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

Page 318: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:514 Covert ChannelFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:514 Covert ChannelFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:514 Covert ChannelFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:514 Covert ChannelPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:514 Covert Channel FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:514 Covert ChannelPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:514 Covert ChannelPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:514 Covert ChannelFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 319: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:514 Covert ChannelPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:514 Covert ChannelPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:514 Covert ChannelFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:514 Covert ChannelFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:514 Covert ChannelFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:515Covert Storage Channel

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:515Covert Storage Channel

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:515Covert Storage Channel

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:515Covert Storage Channel

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:515Covert Storage Channel

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:515Covert Storage Channel

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:515Covert Storage Channel

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 320: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:515Covert Storage Channel

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:515Covert Storage Channel

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:515Covert Storage Channel

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:515Covert Storage Channel

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:515Covert Storage Channel

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:515Covert Storage Channel

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:515Covert Storage Channel

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

Page 321: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:515Covert Storage Channel

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:515Covert Storage Channel

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:515Covert Storage Channel

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:520.NET Misconfiguration: Use of Impersonation

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:520.NET Misconfiguration: Use of Impersonation

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:535Information Exposure Through Shell Error Message

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:535Information Exposure Through Shell Error

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:535Information Exposure Through Shell Error Message

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:535Information Exposure Through Shell Error

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:535Information Exposure Through Shell Error

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:536Information Exposure Through Servlet Runtime Error

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:536Information Exposure Through Servlet

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:536Information Exposure Through Servlet Runtime Error

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:536Information Exposure Through Servlet

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:536Information Exposure Through Servlet

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:537Information Exposure Through Java Runtime Error

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:537Information Exposure Through Java

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

Page 322: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:537Information Exposure Through Java Runtime Error

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:537Information Exposure Through Java

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:537Information Exposure Through Java

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

closely mapped

CWE:543Use of Singleton Pattern Without Synchronization in a

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

closely mapped

CWE:543Use of Singleton Pattern Without Synchronization in a

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singleton closely mapped

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

Page 323: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:543Use of Singleton Pattern Without Synchronization in a

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:543Use of Singleton Pattern Without Synchronization in a

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy descendant

CWE:543

Use of Singleton Pattern Without Synchronization in a Multithreaded Context

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:544Missing Standardized Error Handling Mechanism

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

Page 324: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:544Missing Standardized Error Handling

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:544Missing Standardized Error Handling Mechanism

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:544Missing Standardized Error Handling

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:544Missing Standardized Error Handling

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:546 Suspicious CommentFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:546 Suspicious Comment PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:546 Suspicious CommentPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:546 Suspicious CommentPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:546 Suspicious CommentFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:546 Suspicious CommentFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:546 Suspicious CommentFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:546 Suspicious CommentPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 325: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:546 Suspicious Comment FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:546 Suspicious CommentPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:546 Suspicious CommentPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:546 Suspicious CommentFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:546 Suspicious CommentPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:546 Suspicious CommentPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:546 Suspicious CommentFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:546 Suspicious CommentFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:546 Suspicious CommentFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 326: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:547Use of Hard-coded, Security-relevant Constants

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant

PMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IP closely mapped

CWE:547Use of Hard-coded, Security-relevant Constants

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant

PMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Card closely mapped

CWE:547Use of Hard-coded, Security-relevant Constants

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

Page 327: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:547Use of Hard-coded, Security-relevant Constants

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:547Use of Hard-coded, Security-relevant Constants

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:550Information Exposure Through Server Error Message

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:550Information Exposure Through Server Error

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:550Information Exposure Through Server Error Message

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:550Information Exposure Through Server Error

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:550Information Exposure Through Server Error

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:551Incorrect Behavior Order: Authorization Before Parsing and

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy descendant

Page 328: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:551

Incorrect Behavior Order: Authorization Before Parsing and Canonicalization

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy descendant

CWE:551

Incorrect Behavior Order: Authorization Before Parsing and Canonicalization

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:551Incorrect Behavior Order: Authorization Before Parsing and

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:555

J2EE Misconfiguration: Plaintext Password in Configuration File

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy descendant

CWE:556

ASP.NET Misconfiguration: Use of Identity Impersonation

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:556

ASP.NET Misconfiguration: Use of Identity Impersonation

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

closely mapped

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:557 Concurrency Issues PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

closely mapped

Page 329: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:557 Concurrency IssuesCTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:557 Concurrency IssuesFB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks held closely mapped

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

Page 330: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:558Use of getlogin() in Multithreaded

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

Page 331: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy descendant

CWE:558Use of getlogin() in Multithreaded Application

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:559Often Misused: Arguments and

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

Page 332: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:559Often Misused: Arguments and Parameters

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

Page 333: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:559Often Misused: Arguments and Parameters

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:560Use of umask() with chmod-style

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy descendant

Page 334: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:560Use of umask() with chmod-style Argument

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:561 Dead Code PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 335: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:561 Dead CodePMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:561 Dead CodePMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:561 Dead Code PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:561 Dead Code FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 336: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:561 Dead CodePMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:561 Dead Code PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:561 Dead Code FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:561 Dead CodePMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

closely mapped

CWE:561 Dead Code FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:561 Dead Code FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:561 Dead CodePMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:561 Dead CodePMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:561 Dead CodeFB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never called closely mapped

CWE:561 Dead CodeFB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:561 Dead CodePMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

Page 337: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:561 Dead CodePMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

closely mapped

CWE:561 Dead CodePMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:561 Dead CodePMD.Unused-Code.UnusedPrivateMethod

Unused Private Method closely mapped

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:561 Dead CodeFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:561 Dead CodeFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:561 Dead CodeFB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:561 Dead CodeFB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:561 Dead CodeFB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:562Return of Stack Variable Address

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:562Return of Stack Variable Address

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 338: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:562Return of Stack Variable Address

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:562Return of Stack Variable Address

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:562Return of Stack Variable Address

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:562Return of Stack Variable Address

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:562Return of Stack Variable Address

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

Page 339: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:562Return of Stack Variable Address

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:562Return of Stack Variable Address

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:562Return of Stack Variable Address

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:562Return of Stack Variable Address

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:562Return of Stack Variable Address

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:563Assignment to Variable without Use

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 340: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:563Assignment to Variable without Use

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literal closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

closely mapped

CWE:563Assignment to Variable without Use

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variable closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

Page 341: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:563Assignment to Variable without Use

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten increment closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameter closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variable closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

PMD.Unused-Code.UnusedPrivateField

Unused Private Field closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

closely mapped

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

Page 342: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:563Assignment to Variable without Use ('Unused Variable')

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:564SQL Injection: Hibernate

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:564SQL Injection: Hibernate

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:564SQL Injection: Hibernate

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy descendant

CWE:564SQL Injection: Hibernate

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:564SQL Injection: Hibernate

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:564SQL Injection: Hibernate

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:567Unsynchronized Access to Shared

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronization closely mapped

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

closely mapped

CWE:567Unsynchronized Access to Shared Data in a

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

closely mapped

Page 343: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:567Unsynchronized Access to Shared Data in a

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:567Unsynchronized Access to Shared

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:567Unsynchronized Access to Shared

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

closely mapped

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

Page 344: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:567Unsynchronized Access to Shared Data in a

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

closely mapped

CWE:567

Unsynchronized Access to Shared Data in a Multithreaded Context

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:567Unsynchronized Access to Shared Data in a

FB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:568finalize() Method Without

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:568finalize() Method Without super.finalize()

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

Page 345: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:568finalize() Method Without

PMD.Design.CloseResource Close Resourcehierarchy descendant

CWE:568finalize() Method Without

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:568finalize() Method Without super.finalize()

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

closely mapped

Page 346: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

closely mapped

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:568finalize() Method Without

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:568finalize() Method Without super.finalize()

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy descendant

CWE:568finalize() Method Without

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

Page 347: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:568finalize() Method Without super.finalize()

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:568finalize() Method Without super.finalize()

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:569 Expression IssuesFB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:569 Expression Issues PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:569 Expression IssuesPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:569 Expression IssuesPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

Page 348: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:569 Expression Issues PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:569 Expression Issues FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:569 Expression IssuesFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:569 Expression IssuesFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:569 Expression IssuesPMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:569 Expression IssuesFB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

Page 349: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:569 Expression IssuesFB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:569 Expression IssuesPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:569 Expression IssuesFB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:569 Expression Issues PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:569 Expression IssuesFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:569 Expression Issues FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:569 Expression Issues FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:569 Expression Issues FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:569 Expression IssuesPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:569 Expression IssuesPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:569 Expression IssuesFB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

Page 350: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:569 Expression IssuesFB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

closely mapped

CWE:569 Expression IssuesFB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

closely mapped

CWE:569 Expression IssuesFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

closely mapped

CWE:569 Expression IssuesFB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

closely mapped

CWE:569 Expression IssuesFB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional tests closely mapped

CWE:569 Expression IssuesFB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:569 Expression IssuesPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:569 Expression IssuesPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:569 Expression IssuesFB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:569 Expression IssuesFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:569 Expression IssuesFB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:569 Expression IssuesPMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:569 Expression IssuesPMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

Page 351: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:569 Expression IssuesFB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:569 Expression IssuesFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:569 Expression IssuesFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:569 Expression IssuesFB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:569 Expression IssuesFB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:569 Expression IssuesFB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:570Expression is Always False

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:570Expression is Always False

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:570Expression is Always False

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:570Expression is Always False

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:570Expression is Always False

PMD.Design.BadComparison Bad Comparison closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

closely mapped

Page 352: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:570Expression is Always False

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null) closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:570Expression is Always False

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaN closely mapped

CWE:570Expression is Always False

PMD.Design.EqualsNull Equals Null closely mapped

CWE:570Expression is Always False

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

Page 353: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:570Expression is Always False

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or masks closely mapped

CWE:570Expression is Always False

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1 closely mapped

CWE:570Expression is Always False

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:570Expression is Always False

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:570Expression is Always False

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy descendant

CWE:570Expression is Always False

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:570Expression is Always False

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:570Expression is Always False

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:570Expression is Always False

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:570Expression is Always False

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:570Expression is Always False

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy descendant

Page 354: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:570Expression is Always False

PMD.Basic.UnconditionalIfStatement

Unconditional If Statement closely mapped

CWE:570Expression is Always False

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:570Expression is Always False

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:570Expression is Always False

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:570Expression is Always False

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

closely mapped

CWE:570Expression is Always False

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

closely mapped

CWE:571Expression is Always True

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:571Expression is Always True

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:571Expression is Always True

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:571Expression is Always True

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0 closely mapped

CWE:571Expression is Always True

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 355: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:571Expression is Always True

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:571Expression is Always True

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:571Expression is Always True

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:571Expression is Always True

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy descendant

CWE:571Expression is Always True

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:571Expression is Always True

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 356: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:571Expression is Always True

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy descendant

CWE:571Expression is Always True

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:571Expression is Always True

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:571Expression is Always True

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:571Expression is Always True

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

closely mapped

CWE:571Expression is Always True

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

closely mapped

CWE:571Expression is Always True

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:571Expression is Always True

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy descendant

CWE:571Expression is Always True

PMD.Basic.UnconditionalIfStatement

Unconditional If Statement closely mapped

CWE:571Expression is Always True

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

Page 357: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:571Expression is Always True

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:571Expression is Always True

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:571Expression is Always True

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

closely mapped

CWE:571Expression is Always True

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return true closely mapped

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy descendant

CWE:572Call to Thread run() instead of start()

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:572Call to Thread run() instead of start()

PMD.Basic.DontCallThreadRun Don't Call Thread Run closely mapped

CWE:572Call to Thread run() instead of start()

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:572Call to Thread run() instead of start()

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

closely mapped

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:572Call to Thread run() instead of start()

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:572Call to Thread run() instead of start()

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

Page 358: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:572Call to Thread run() instead of start()

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:572Call to Thread run() instead of start()

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

Page 359: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:572Call to Thread run() instead of start()

FB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy descendant

CWE:573Improper Following of Specification by

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:573Improper Following of Specification by

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:573Improper Following of Specification by Caller

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

closely mapped

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:573Improper Following of Specification by

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

Page 360: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:573Improper Following of Specification by Caller

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

closely mapped

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

Page 361: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:573Improper Following of Specification by Caller

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

Page 362: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:574EJB Bad Practices: Use of

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:574EJB Bad Practices: Use of

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:574EJB Bad Practices: Use of

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

Page 363: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:574EJB Bad Practices: Use of Synchronization

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

Page 364: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:574EJB Bad Practices: Use of Synchronization

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:574

EJB Bad Practices: Use of Synchronization Primitives

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

Page 365: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:575EJB Bad Practices: Use of AWT Swing

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:575EJB Bad Practices: Use of AWT Swing

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

Page 366: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:576EJB Bad Practices: Use of Java I/O

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

Page 367: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:577EJB Bad Practices: Use of Sockets

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

Page 368: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:578EJB Bad Practices: Use of Class Loader

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:578EJB Bad Practices: Use of Class Loader

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

Page 369: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:579J2EE Bad Practices: Non-serializable Object Stored in

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:579J2EE Bad Practices: Non-serializable Object Stored in

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:579J2EE Bad Practices: Non-serializable Object Stored in

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:579J2EE Bad Practices: Non-serializable Object Stored in

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

closely mapped

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:579J2EE Bad Practices: Non-serializable Object Stored in

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

Page 370: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:579

J2EE Bad Practices: Non-serializable Object Stored in Session

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:580clone() Method Without super.clone()

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementation closely mapped

Page 371: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

closely mapped

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:580clone() Method Without super.clone()

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:580clone() Method Without super.clone()

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

closely mapped

CWE:581Object Model Violation: Just One of Equals and Hashcode

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

closely mapped

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

closely mapped

CWE:581Object Model Violation: Just One of Equals and Hashcode

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

closely mapped

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

closely mapped

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

Page 372: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:581Object Model Violation: Just One of Equals and Hashcode

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:581Object Model Violation: Just One of Equals and Hashcode

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:581Object Model Violation: Just One of Equals and Hashcode

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:581Object Model Violation: Just One of Equals and Hashcode

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:581Object Model Violation: Just One of Equals and Hashcode

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

closely mapped

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

closely mapped

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

closely mapped

CWE:581Object Model Violation: Just One of Equals and Hashcode

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

Page 373: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:581

Object Model Violation: Just One of Equals and Hashcode Defined

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:582Array Declared Public, Final, and Static

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:582Array Declared Public, Final, and Static

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:582Array Declared Public, Final, and Static

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:583finalize() Method Declared Public

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:583finalize() Method Declared Public

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

closely mapped

CWE:583finalize() Method Declared Public

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:583finalize() Method Declared Public

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:584Return Inside Finally Block

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:584Return Inside Finally Block

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:584Return Inside Finally Block

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:584Return Inside Finally Block

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:584Return Inside Finally Block

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:584Return Inside Finally Block

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:584Return Inside Finally Block

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:584Return Inside Finally Block

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

Page 374: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:584Return Inside Finally Block

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:584Return Inside Finally Block

PMD.Basic.ReturnFromFinallyBlock Return From Finally Block closely mapped

CWE:584Return Inside Finally Block

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:584Return Inside Finally Block

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:584Return Inside Finally Block

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:585Empty Synchronized Block

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:585Empty Synchronized Block

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:585Empty Synchronized Block

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:585Empty Synchronized Block

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:585Empty Synchronized Block

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:585Empty Synchronized Block

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:585Empty Synchronized Block

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 375: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:585Empty Synchronized Block

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:585Empty Synchronized Block

PMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Block closely mapped

CWE:585Empty Synchronized Block

FB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized block closely mapped

CWE:585Empty Synchronized Block

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:585Empty Synchronized Block

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:585Empty Synchronized Block

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:585Empty Synchronized Block

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:585Empty Synchronized Block

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:585Empty Synchronized Block

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:585Empty Synchronized Block

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 376: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:585Empty Synchronized Block

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:585Empty Synchronized Block

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalize closely mapped

CWE:586Explicit Call to Finalize()

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 377: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizer closely mapped

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 378: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

closely mapped

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:586Explicit Call to Finalize()

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

Page 379: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:586Explicit Call to Finalize()

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:586Explicit Call to Finalize()

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:587Assignment of a Fixed Address to a Pointer

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on fieldhierarchy descendant

CWE:587Assignment of a Fixed Address to a Pointer

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:588Attempt to Access Child of a Non-

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 380: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:588Attempt to Access Child of a Non-

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

CWE:588Attempt to Access Child of a Non-

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on fieldhierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

Page 381: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:588Attempt to Access Child of a Non-

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:588Attempt to Access Child of a Non-structure Pointer

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

Page 382: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:589Call to Non-ubiquitous API

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:589Call to Non-ubiquitous API

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:589Call to Non-ubiquitous API

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

Page 383: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:589Call to Non-ubiquitous API

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:589Call to Non-ubiquitous API

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:589Call to Non-ubiquitous API

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:589Call to Non-ubiquitous API

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

Page 384: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:589Call to Non-ubiquitous API

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:589Call to Non-ubiquitous API

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

Page 385: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:590Free of Memory not on the Heap

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

Page 386: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:590Free of Memory not on the Heap

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:590Free of Memory not on the Heap

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:590Free of Memory not on the Heap

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

Page 387: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:591Sensitive Data Storage in Improperly

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 388: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:591Sensitive Data Storage in Improperly

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:591Sensitive Data Storage in Improperly

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

Page 389: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:591Sensitive Data Storage in Improperly Locked Memory

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:595Comparison of Object References Instead of

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 390: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:595Comparison of Object References Instead of Object Contents

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:595Comparison of Object References Instead of

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equals closely mapped

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

closely mapped

CWE:595Comparison of Object References Instead of

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:595Comparison of Object References Instead of

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

closely mapped

CWE:595Comparison of Object References Instead of Object Contents

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 391: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:595Comparison of Object References Instead of Object Contents

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.EC_BAD_ARRAY_COMPARE

Invocation of equals() on an array, which is equivalent to ==

hierarchy descendant

CWE:595Comparison of Object References Instead of

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:595Comparison of Object References Instead of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

Page 392: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:595Comparison of Object References Instead of Object Contents

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

closely mapped

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

closely mapped

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

closely mapped

CWE:595Comparison of Object References Instead of Object Contents

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:595Comparison of Object References Instead of Object Contents

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:595Comparison of Object References Instead of Object Contents

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

Page 393: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:596Incorrect Semantic Object Comparison

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

closely mapped

CWE:596Incorrect Semantic Object Comparison

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

Page 394: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:596Incorrect Semantic Object Comparison

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

Page 395: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:596Incorrect Semantic Object Comparison

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:596Incorrect Semantic Object Comparison

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:597Use of Wrong Operator in String

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:597Use of Wrong Operator in String

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy descendant

Page 396: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

closely mapped

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

closely mapped

CWE:597Use of Wrong Operator in String

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:597Use of Wrong Operator in String

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.EC_BAD_ARRAY_COMPARE

Invocation of equals() on an array, which is equivalent to ==

hierarchy descendant

CWE:597Use of Wrong Operator in String

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

Page 397: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:597Use of Wrong Operator in String Comparison

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:597Use of Wrong Operator in String

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Strings closely mapped

CWE:597Use of Wrong Operator in String Comparison

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

Page 398: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:597Use of Wrong Operator in String Comparison

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:597Use of Wrong Operator in String Comparison

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:600Uncaught Exception in Servlet

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:600Uncaught Exception in Servlet

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:600Uncaught Exception in Servlet

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:600Uncaught Exception in Servlet

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

Page 399: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:600Uncaught Exception in Servlet

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:600Uncaught Exception in Servlet

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:600Uncaught Exception in Servlet

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:601URL Redirection to Untrusted Site ('Open Redirect')

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:601URL Redirection to Untrusted Site ('Open Redirect')

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

Page 400: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:605Multiple Binds to the Same Port

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:607Public Static Final Field References Mutable Object

FB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtable closely mapped

CWE:607Public Static Final Field References Mutable Object

FB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable array closely mapped

Page 401: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:607Public Static Final Field References Mutable Object

FB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

closely mapped

CWE:609Double-Checked Locking

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:609Double-Checked Locking

PMD.Basic.DoubleCheckedLocking

Double Checked Locking closely mapped

CWE:609Double-Checked Locking

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:609Double-Checked Locking

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:609Double-Checked Locking

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:609Double-Checked Locking

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of field closely mapped

CWE:609Double-Checked Locking

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:609Double-Checked Locking

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 402: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:609Double-Checked Locking

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:609Double-Checked Locking

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:609Double-Checked Locking

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:609Double-Checked Locking

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:610

Externally Controlled Reference to a Resource in Another Sphere

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:610

Externally Controlled Reference to a Resource in Another Sphere

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

Page 403: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:611Improper Restriction of XML External Entity Reference ('XXE')

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:611Improper Restriction of XML External Entity Reference ('XXE')

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:617 Reachable Assertion PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:617 Reachable AssertionPMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:617 Reachable AssertionPMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 404: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:617 Reachable AssertionPMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:617 Reachable Assertion FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:617 Reachable AssertionPMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:617 Reachable AssertionPMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:617 Reachable AssertionFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:617 Reachable AssertionFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:617 Reachable AssertionPMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:617 Reachable AssertionPMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 405: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:617 Reachable AssertionFB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:617 Reachable AssertionFB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:617 Reachable AssertionFB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:617 Reachable AssertionFB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:618Exposed Unsafe ActiveX Method

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:618Exposed Unsafe ActiveX Method

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

Page 406: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

Page 407: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:619Dangling Database Cursor ('Cursor Injection')

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:621Variable Extraction Error

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:621Variable Extraction Error

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:621Variable Extraction Error

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:621Variable Extraction Error

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:621Variable Extraction Error

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:623Unsafe ActiveX Control Marked Safe For Scripting

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:623Unsafe ActiveX Control Marked Safe For Scripting

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:623Unsafe ActiveX Control Marked Safe For Scripting

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:623Unsafe ActiveX Control Marked Safe For Scripting

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:624Executable Regular Expression Error

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:624Executable Regular Expression Error

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:624Executable Regular Expression Error

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

Page 408: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:624Executable Regular Expression Error

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:624Executable Regular Expression Error

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:625Permissive Regular Expression

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy descendant

CWE:625Permissive Regular Expression

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:625Permissive Regular Expression

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:625Permissive Regular Expression

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy descendant

CWE:625Permissive Regular Expression

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy descendant

CWE:625Permissive Regular Expression

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:625Permissive Regular Expression

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:625Permissive Regular Expression

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:627Dynamic Variable Evaluation

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:627Dynamic Variable Evaluation

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:627Dynamic Variable Evaluation

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:627Dynamic Variable Evaluation

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:627Dynamic Variable Evaluation

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:628Function Call with Incorrectly Specified

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for month closely mapped

CWE:628Function Call with Incorrectly Specified Arguments

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

Page 409: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

Page 410: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:628Function Call with Incorrectly Specified Arguments

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

Page 411: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:629Weaknesses in OWASP Top Ten (2007)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:630Weaknesses Examined by

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

Page 412: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:630Weaknesses Examined by

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:630Weaknesses Examined by

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:630Weaknesses Examined by

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

Page 413: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:630Weaknesses Examined by SAMATE

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

Page 414: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:631Resource-specific Weaknesses

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:631Resource-specific Weaknesses

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:631Resource-specific Weaknesses

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:632Weaknesses that Affect Files or Directories

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:632Weaknesses that Affect Files or Directories

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:634Weaknesses that Affect System Processes

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:634Weaknesses that Affect System Processes

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:634Weaknesses that Affect System

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:634Weaknesses that Affect System

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:634Weaknesses that Affect System Processes

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:634Weaknesses that Affect System Processes

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:634Weaknesses that Affect System Processes

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:634Weaknesses that Affect System Processes

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

Page 415: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:635Weaknesses Used by NVD

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:635Weaknesses Used by NVD

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:635Weaknesses Used by NVD

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:635Weaknesses Used by NVD

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

Page 416: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:635Weaknesses Used by NVD

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

Page 417: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:635Weaknesses Used by NVD

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:635Weaknesses Used by NVD

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:635Weaknesses Used by NVD

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:635Weaknesses Used by NVD

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:635Weaknesses Used by NVD

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

Page 418: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:635Weaknesses Used by NVD

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:636Not Failing Securely ('Failing Open')

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:636Not Failing Securely ('Failing Open')

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:636Not Failing Securely ('Failing Open')

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:636Not Failing Securely ('Failing Open')

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:636Not Failing Securely ('Failing Open')

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:641Improper Restriction of Names for Files and Other Resources

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:641Improper Restriction of Names for Files and Other Resources

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:641Improper Restriction of Names for Files

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:641Improper Restriction of Names for Files and Other Resources

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:641Improper Restriction of Names for Files and Other Resources

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:643

Improper Neutralization of Data within XPath Expressions ('XPath Injection')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:643

Improper Neutralization of Data within XPath Expressions ('XPath Injection')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:643Improper Neutralization of Data within XPath

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:643Improper Neutralization of Data within XPath

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:643Improper Neutralization of Data within XPath

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:644

Improper Neutralization of HTTP Headers for Scripting Syntax

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

Page 419: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:644

Improper Neutralization of HTTP Headers for Scripting Syntax

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:644Improper Neutralization of HTTP

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:644Improper Neutralization of HTTP Headers for Scripting

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:644Improper Neutralization of HTTP Headers for Scripting

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:647

Use of Non-Canonical URL Paths for Authorization Decisions

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:647

Use of Non-Canonical URL Paths for Authorization Decisions

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:647Use of Non-Canonical URL Paths for

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:647Use of Non-Canonical URL Paths for Authorization

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:647Use of Non-Canonical URL Paths for Authorization

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

Page 420: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:648Incorrect Use of Privileged APIs

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

Page 421: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:650Trusting HTTP Permission Methods on the Server Side

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:652

Improper Neutralization of Data within XQuery Expressions ('XQuery Injection')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:652

Improper Neutralization of Data within XQuery Expressions ('XQuery Injection')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:652Improper Neutralization of Data within XQuery

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:652Improper Neutralization of Data within XQuery

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:652Improper Neutralization of Data within XQuery

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:657Violation of Secure Design Principles

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:657Violation of Secure Design Principles

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:662Improper Synchronization

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:662Improper Synchronization

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:662Improper Synchronization

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

closely mapped

CWE:662Improper Synchronization

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisation closely mapped

Page 422: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronization closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:662Improper Synchronization

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisation closely mapped

CWE:662Improper Synchronization

CTS.Locking.CCE_SL_MIXED Mixed synchronisation closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet field closely mapped

CWE:662Improper Synchronization

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:662Improper Synchronization

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:662Improper Synchronization

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:662Improper Synchronization

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 423: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Boolean closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

closely mapped

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:662Improper Synchronization

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

closely mapped

CWE:663Use of a Non-reentrant Function in a Concurrent Context

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:663Use of a Non-reentrant Function in

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

Page 424: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:663Use of a Non-reentrant Function in

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:663Use of a Non-reentrant Function in

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:663Use of a Non-reentrant Function in a Concurrent Context

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

Page 425: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:664Improper Control of a Resource Through its

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:664Improper Control of a Resource Through its

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:664Improper Control of a Resource Through its

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:664Improper Control of a Resource Through its

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

Page 426: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:664Improper Control of a Resource Through its

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

Page 427: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:664Improper Control of a Resource Through its

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:664Improper Control of a Resource Through its

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:664Improper Control of a Resource Through its

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:664Improper Control of a Resource Through its

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

Page 428: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:664Improper Control of a Resource Through its Lifetime

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:664Improper Control of a Resource Through its

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

Page 429: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:664Improper Control of a Resource Through its

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

Page 430: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:664Improper Control of a Resource Through its Lifetime

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:664Improper Control of a Resource Through its Lifetime

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:665 Improper Initialization FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:665 Improper InitializationFB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:665 Improper InitializationFB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:665 Improper InitializationFB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:665 Improper InitializationFB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:667 Improper LockingCTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:667 Improper LockingPMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:667 Improper LockingCTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:667 Improper LockingCTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

Page 431: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:667 Improper LockingFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

closely mapped

CWE:667 Improper LockingFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

closely mapped

CWE:667 Improper LockingFB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify() closely mapped

CWE:667 Improper LockingFB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait() closely mapped

CWE:667 Improper Locking CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:667 Improper Locking CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:667 Improper LockingFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:667 Improper LockingFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

Page 432: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:667 Improper LockingFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:667 Improper LockingCTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:667 Improper LockingCTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:667 Improper LockingCTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:667 Improper LockingFB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:668Exposure of Resource to Wrong Sphere

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

FB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

FB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

Page 433: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:668Exposure of Resource to Wrong Sphere

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:668Exposure of Resource to Wrong Sphere

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:670Always-Incorrect Control Flow Implementation

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:670Always-Incorrect Control Flow Implementation

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:670Always-Incorrect Control Flow Implementation

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:670Always-Incorrect Control Flow Implementation

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:670Always-Incorrect Control Flow Implementation

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:670Always-Incorrect Control Flow

PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:670Always-Incorrect Control Flow Implementation

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:670Always-Incorrect Control Flow Implementation

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:670Always-Incorrect Control Flow Implementation

FB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:670Always-Incorrect Control Flow Implementation

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:671Lack of Administrator Control over Security

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:671Lack of Administrator Control over Security

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:674Uncontrolled Recursion

FB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itself closely mapped

CWE:674Uncontrolled Recursion

FB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

closely mapped

Page 434: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:674Uncontrolled Recursion

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:674Uncontrolled Recursion

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:675Duplicate Operations on Resource

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of field closely mapped

CWE:675Duplicate Operations on Resource

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

closely mapped

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

Page 435: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:675Duplicate Operations on Resource

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:675Duplicate Operations on Resource

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 436: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:676Use of Potentially Dangerous Function

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 437: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:676Use of Potentially Dangerous Function

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:676Use of Potentially Dangerous Function

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

closely mapped

CWE:681Incorrect Conversion between Numeric

PMD.Design.BadComparison Bad Comparisonhierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

closely mapped

CWE:681Incorrect Conversion between Numeric Types

PMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

Page 438: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:681Incorrect Conversion between Numeric Types

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

closely mapped

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:681Incorrect Conversion between Numeric

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:681Incorrect Conversion between Numeric Types

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

closely mapped

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

closely mapped

CWE:681Incorrect Conversion between Numeric Types

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

closely mapped

CWE:681Incorrect Conversion between Numeric Types

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

closely mapped

CWE:682 Incorrect CalculationFB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:682 Incorrect CalculationFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:682 Incorrect CalculationFB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:682 Incorrect CalculationFB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

closely mapped

CWE:682 Incorrect CalculationFB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:682 Incorrect CalculationFB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:682 Incorrect Calculation FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:682 Incorrect CalculationFB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

closely mapped

Page 439: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:682 Incorrect CalculationFB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

closely mapped

CWE:682 Incorrect CalculationFB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:682 Incorrect CalculationFB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:682 Incorrect CalculationFB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:682 Incorrect CalculationFB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:682 Incorrect CalculationFB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:682 Incorrect CalculationFB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:683Function Call With Incorrect Order of

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

Page 440: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method arguments closely mapped

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:683Function Call With Incorrect Order of Arguments

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:684Incorrect Provision of Specified

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

Page 441: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

Page 442: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

Page 443: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:684Incorrect Provision of Specified Functionality

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:684Incorrect Provision of Specified Functionality

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:685Function Call With Incorrect Number of

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

Page 444: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

closely mapped

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

closely mapped

CWE:685Function Call With Incorrect Number of Arguments

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

closely mapped

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:685Function Call With Incorrect Number of Arguments

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:686Function Call With Incorrect Argument

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy descendant

CWE:686Function Call With Incorrect Argument Type

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

closely mapped

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

Page 445: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:686Function Call With Incorrect Argument Type

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

Page 446: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:686Function Call With Incorrect Argument Type

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:687Function Call With Incorrectly Specified

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

closely mapped

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format string closely mapped

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

closely mapped

Page 447: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

closely mapped

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

closely mapped

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

closely mapped

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

closely mapped

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:687Function Call With Incorrectly Specified Argument Value

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:688Function Call With Incorrect Variable or

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 448: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:688Function Call With Incorrect Variable or Reference as

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:688Function Call With Incorrect Variable or Reference as

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:688Function Call With Incorrect Variable or Reference as

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:688Function Call With Incorrect Variable or Reference as

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:688Function Call With Incorrect Variable or Reference as

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:688

Function Call With Incorrect Variable or Reference as Argument

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

Page 449: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:690Unchecked Return Value to NULL Pointer Dereference

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:690Unchecked Return Value to NULL Pointer

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:690Unchecked Return Value to NULL Pointer Dereference

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:690Unchecked Return Value to NULL Pointer

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:690Unchecked Return Value to NULL Pointer

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:691Insufficient Control Flow Management

FB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

Page 450: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:691Insufficient Control Flow Management

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

Page 451: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

closely mapped

CWE:691Insufficient Control Flow Management

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

closely mapped

CWE:691Insufficient Control Flow Management

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

Page 452: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:691Insufficient Control Flow Management

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

Page 453: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:691Insufficient Control Flow Management

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:691Insufficient Control Flow Management

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:693Protection Mechanism Failure

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:693Protection Mechanism Failure

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

Page 454: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:693Protection Mechanism Failure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:693Protection Mechanism Failure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

Page 455: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:694Use of Multiple Resources with

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:694Use of Multiple Resources with Duplicate Identifier

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:695Use of Low-Level Functionality

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

Page 456: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:695Use of Low-Level Functionality

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:695Use of Low-Level Functionality

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:695Use of Low-Level Functionality

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:696Incorrect Behavior Order

PMD.Basic.MisplacedNullCheck Misplaced Null Check closely mapped

CWE:696Incorrect Behavior Order

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

closely mapped

CWE:696Incorrect Behavior Order

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:696Incorrect Behavior Order

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:697Insufficient Comparison

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

Page 457: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:697Insufficient Comparison

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:697Insufficient Comparison

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:697Insufficient Comparison

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:697Insufficient Comparison

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:697Insufficient Comparison

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:697Insufficient Comparison

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:697Insufficient Comparison

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:697Insufficient Comparison

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:697Insufficient Comparison

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:697Insufficient Comparison

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:697Insufficient Comparison

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:697Insufficient Comparison

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:697Insufficient Comparison

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:697Insufficient Comparison

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:697Insufficient Comparison

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:697Insufficient Comparison

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

Page 458: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:697Insufficient Comparison

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:697Insufficient Comparison

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:697Insufficient Comparison

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:698Execution After Redirect (EAR)

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:698Execution After Redirect (EAR)

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:698Execution After Redirect (EAR)

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:698Execution After Redirect (EAR)

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:698Execution After Redirect (EAR)

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:698Execution After Redirect (EAR)

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:698Execution After Redirect (EAR)

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:698Execution After Redirect (EAR)

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:698Execution After Redirect (EAR)

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:698Execution After Redirect (EAR)

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:698Execution After Redirect (EAR)

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:698Execution After Redirect (EAR)

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:699Development Concepts

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

Page 459: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:699Development Concepts

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:699Development Concepts

PMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

CWE:699Development Concepts

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:699Development Concepts

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:699Development Concepts

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:699Development Concepts

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:699Development Concepts

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy ancestor

CWE:699Development Concepts

PMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:699Development Concepts

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy ancestor

Page 460: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy ancestor

CWE:699Development Concepts

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:699Development Concepts

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:699Development Concepts

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

Page 461: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:699Development Concepts

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:699Development Concepts

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy ancestor

Page 462: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:699Development Concepts

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:699Development Concepts

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

Page 463: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:699Development Concepts

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:699Development Concepts

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:699Development Concepts

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy ancestor

CWE:699Development Concepts

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:699Development Concepts

PMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:699Development Concepts

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

Page 464: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:699Development Concepts

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:699Development Concepts

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:699Development Concepts

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:699Development Concepts

PMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

CWE:699Development Concepts

PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:699Development Concepts

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

Page 465: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:699Development Concepts

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:699Development Concepts

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

Page 466: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:699Development Concepts

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:699Development Concepts

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

Page 467: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:699Development Concepts

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy ancestor

CWE:699Development Concepts

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:699Development Concepts

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

Page 468: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

Page 469: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:699Development Concepts

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:699Development Concepts

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy ancestor

Page 470: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:699Development Concepts

PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:699Development Concepts

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:699Development Concepts

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:699Development Concepts

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:699Development Concepts

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

Page 471: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy ancestor

Page 472: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:699Development Concepts

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:699Development Concepts

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:699Development Concepts

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:699Development Concepts

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

Page 473: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy ancestor

CWE:699Development Concepts

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:699Development Concepts

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:699Development Concepts

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:699Development Concepts

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:699Development Concepts

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:699Development Concepts

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

Page 474: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:699Development Concepts

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:699Development Concepts

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy ancestor

CWE:699Development Concepts

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:699Development Concepts

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

Page 475: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:699Development Concepts

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:699Development Concepts

PMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

Page 476: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:699Development Concepts

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:699Development Concepts

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:699Development Concepts

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:699Development Concepts

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:699Development Concepts

PMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:699Development Concepts

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:699Development Concepts

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:699Development Concepts

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:699Development Concepts

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

Page 477: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy ancestor

CWE:699Development Concepts

FB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy ancestor

CWE:699Development Concepts

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

Page 478: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:699Development Concepts

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:699Development Concepts

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:699Development Concepts

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:699Development Concepts

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.VO_VOLATILE_REFERENCE_TO_ARRAY

A volatile reference to an array doesn't treat the array elements as volatile

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

Page 479: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Migration.AvoidAssertAsIdentifier

Avoid Assert As Identifierhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Migration.AvoidEnumAsIdentifier

Avoid Enum As Identifierhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

Page 480: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy ancestor

Page 481: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy ancestor

Page 482: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED

Classloaders should only be created inside doPrivileged block

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

Page 483: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

Page 484: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

Page 485: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

Page 486: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

Page 487: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

Page 488: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.DP_DO_INSIDE_DO_PRIVILEGED

Method invoked that should be only be invoked inside a doPrivileged block

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

Page 489: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

Page 490: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

Page 491: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

Page 492: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

Page 493: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

Page 494: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

Page 495: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

Page 496: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.MT_CORRECTNESS.TLW_TWO_LOCK_WAIT

Wait with two locks heldhierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

Page 497: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:700Seven Pernicious Kingdoms

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:703

Improper Check or Handling of Exceptional Conditions

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:703Improper Check or Handling of Exceptional

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

Page 498: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:703Improper Check or Handling of Exceptional

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:703

Improper Check or Handling of Exceptional Conditions

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:703Improper Check or Handling of

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:703Improper Check or Handling of

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:703

Improper Check or Handling of Exceptional Conditions

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:703Improper Check or Handling of

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:703Improper Check or Handling of Exceptional

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:703Improper Check or Handling of Exceptional

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:703

Improper Check or Handling of Exceptional Conditions

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:703

Improper Check or Handling of Exceptional Conditions

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:703

Improper Check or Handling of Exceptional Conditions

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:703Improper Check or Handling of Exceptional

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:703Improper Check or Handling of Exceptional

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:703Improper Check or Handling of Exceptional

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:703Improper Check or Handling of Exceptional

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:703Improper Check or Handling of

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:703Improper Check or Handling of

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:703Improper Check or Handling of

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:703Improper Check or Handling of

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

Page 499: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:703

Improper Check or Handling of Exceptional Conditions

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:703

Improper Check or Handling of Exceptional Conditions

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:703

Improper Check or Handling of Exceptional Conditions

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:703Improper Check or Handling of Exceptional

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

closely mapped

CWE:704Incorrect Type Conversion or Cast

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible cast closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcast closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

Page 500: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:704Incorrect Type Conversion or Cast

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed cast closely mapped

CWE:704Incorrect Type Conversion or Cast

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:704Incorrect Type Conversion or Cast

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:705Incorrect Control Flow Scoping

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:705Incorrect Control Flow Scoping

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:705Incorrect Control Flow Scoping

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:705Incorrect Control Flow Scoping

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy descendant

CWE:705Incorrect Control Flow Scoping

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:705Incorrect Control Flow Scoping

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy descendant

CWE:705Incorrect Control Flow Scoping

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:705Incorrect Control Flow Scoping

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:705Incorrect Control Flow Scoping

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:705Incorrect Control Flow Scoping

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

Page 501: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:705Incorrect Control Flow Scoping

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:705Incorrect Control Flow Scoping

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:705Incorrect Control Flow Scoping

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:705Incorrect Control Flow Scoping

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:705Incorrect Control Flow Scoping

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:705Incorrect Control Flow Scoping

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:705Incorrect Control Flow Scoping

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:705Incorrect Control Flow Scoping

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:705Incorrect Control Flow Scoping

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy descendant

CWE:705Incorrect Control Flow Scoping

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy descendant

CWE:705Incorrect Control Flow Scoping

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy descendant

CWE:707

Improper Enforcement of Message or Data Structure

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:707

Improper Enforcement of Message or Data Structure

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:707

Improper Enforcement of Message or Data Structure

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:707

Improper Enforcement of Message or Data Structure

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:707Improper Enforcement of Message or Data

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:707Improper Enforcement of Message or Data

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

Page 502: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:707

Improper Enforcement of Message or Data Structure

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:707Improper Enforcement of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:707

Improper Enforcement of Message or Data Structure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:707

Improper Enforcement of Message or Data Structure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:707Improper Enforcement of Message or Data

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:707Improper Enforcement of Message or Data

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:710Coding Standards Violation

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy ancestor

CWE:710Coding Standards Violation

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:710Coding Standards Violation

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:710Coding Standards Violation

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

Page 503: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:710Coding Standards Violation

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

Page 504: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:710Coding Standards Violation

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

Page 505: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

Page 506: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

PMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:710Coding Standards Violation

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Empty-Code.EmptySynchronizedBlock

Empty Synchronized Blockhierarchy ancestor

CWE:710Coding Standards Violation

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:710Coding Standards Violation

FB.MT_CORRECTNESS.ESync_EMPTY_SYNC

Empty synchronized blockhierarchy ancestor

CWE:710Coding Standards Violation

PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:710Coding Standards Violation

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

Page 507: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:710Coding Standards Violation

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy ancestor

Page 508: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy ancestor

CWE:710Coding Standards Violation

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy ancestor

Page 509: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:710Coding Standards Violation

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:710Coding Standards Violation

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy ancestor

Page 510: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy ancestor

CWE:710Coding Standards Violation

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on fieldhierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Design.MissingBreakInSwitch Missing Break In Switchhierarchy ancestor

CWE:710Coding Standards Violation

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

Page 511: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:710Coding Standards Violation

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:710Coding Standards Violation

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

Page 512: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy ancestor

CWE:710Coding Standards Violation

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy ancestor

CWE:710Coding Standards Violation

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

Page 513: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.STYLE.SF_SWITCH_FALLTHROUGH

Switch statement found where one case falls through to the next case

hierarchy ancestor

CWE:710Coding Standards Violation

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:710Coding Standards Violation

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:710Coding Standards Violation

PMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:710Coding Standards Violation

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:710Coding Standards Violation

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

Page 514: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy ancestor

CWE:710Coding Standards Violation

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

Page 515: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:710Coding Standards Violation

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:710Coding Standards Violation

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:710Coding Standards Violation

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:710Coding Standards Violation

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

Page 516: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

Page 517: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

Page 518: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

Page 519: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:711Weaknesses in OWASP Top Ten (2004)

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:712OWASP Top Ten 2007 Category A1 - Cross Site Scripting

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

Page 520: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:712

OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:712

OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:713OWASP Top Ten 2007 Category A2 - Injection Flaws

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:713OWASP Top Ten 2007 Category A2 - Injection Flaws

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:713OWASP Top Ten 2007 Category A2 - Injection Flaws

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:713OWASP Top Ten 2007 Category A2 - Injection Flaws

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:718OWASP Top Ten 2007 Category A7 - Broken Authentication

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:718OWASP Top Ten 2007 Category A7 - Broken Authentication

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

Page 521: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:722OWASP Top Ten 2004 Category A1 - Unvalidated Input

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:723OWASP Top Ten 2004 Category A2 - Broken Access

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:723OWASP Top Ten 2004 Category A2 - Broken Access

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:723OWASP Top Ten 2004 Category A2 - Broken Access

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:724OWASP Top Ten 2004 Category A3 - Broken Authentication

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:724OWASP Top Ten 2004 Category A3 - Broken Authentication

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:725OWASP Top Ten 2004 Category A4 - Cross-Site Scripting

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:725

OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:725

OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:727OWASP Top Ten 2004 Category A6 - Injection Flaws

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:727OWASP Top Ten 2004 Category A6 - Injection Flaws

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

Page 522: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:727OWASP Top Ten 2004 Category A6 - Injection Flaws

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:727OWASP Top Ten 2004 Category A6 - Injection Flaws

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:727OWASP Top Ten 2004 Category A6 - Injection Flaws

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:727OWASP Top Ten 2004 Category A6 - Injection Flaws

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:727OWASP Top Ten 2004 Category A6 - Injection Flaws

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 - Improper Error

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 -

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 -

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 - Improper Error

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 - Improper Error

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

Page 523: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:728OWASP Top Ten 2004 Category A7 - Improper Error

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 - Improper Error

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 - Improper Error

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 -

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 -

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 -

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:728

OWASP Top Ten 2004 Category A7 - Improper Error Handling

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:728OWASP Top Ten 2004 Category A7 - Improper Error

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 -

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 -

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 -

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

Page 524: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 -

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 -

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

Page 525: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 -

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

Page 526: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:730OWASP Top Ten 2004 Category A9 - Denial of Service

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:731OWASP Top Ten 2004 Category A10 -

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:731OWASP Top Ten 2004 Category A10 - Insecure

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:731OWASP Top Ten 2004 Category A10 - Insecure

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:731OWASP Top Ten 2004 Category A10 - Insecure

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:731

OWASP Top Ten 2004 Category A10 - Insecure Configuration Management

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:731OWASP Top Ten 2004 Category A10 - Insecure

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:731

OWASP Top Ten 2004 Category A10 - Insecure Configuration

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:731OWASP Top Ten 2004 Category A10 -

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:731OWASP Top Ten 2004 Category A10 - Insecure

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:731

OWASP Top Ten 2004 Category A10 - Insecure Configuration

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:733Compiler Optimization Removal or Modification of

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on fieldhierarchy descendant

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

Page 527: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

Page 528: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

Page 529: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734Weaknesses Addressed by the

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

Page 530: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

Page 531: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:734Weaknesses Addressed by the

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

Page 532: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

Page 533: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

Page 534: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:734Weaknesses Addressed by the

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:734Weaknesses Addressed by the

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

Page 535: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

Page 536: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

Page 537: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734Weaknesses Addressed by the CERT C Secure

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

Page 538: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:734Weaknesses Addressed by the

PMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

Page 539: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

Page 540: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:734Weaknesses Addressed by the

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:734

Weaknesses Addressed by the CERT C Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:734Weaknesses Addressed by the CERT C Secure

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.BAD_PRACTICE.DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS

Adding elements of an entry set may fail due to reuse of Entry objects

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 -

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

Page 541: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION

Cant use reflection to check for presence of annotation without runtime retention

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE

Code checks for specific values returned by compareTo

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES

Collections should not contain themselves

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS

Creation of ScheduledThreadPoolExecutor with zero core threads

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_DOHDoh! A nonsensical method invocation

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT

Double.longBitsToDouble invoked on an int

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.RV_EXCEPTION_NOT_THROWN

Exception created and dropped rather than thrown

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR

Futile attempt to change max pool size of ScheduledThreadPoolExecutor

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_INVOKING_HASHCODE_ON_ARRAY

Invocation of hashCode on an array

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ARRAY

Invocation of toString on an arrayhierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY

Invocation of toString on an unnamed array

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.STYLE.RV_CHECK_FOR_POSITIVE_INDEXOF

Method checks to see if result of String.indexOf is positive

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.STYLE.RV_DONT_JUST_NULL_CHECK_READLINE

Method discards result of readLine after checking if it is nonnull

hierarchy ancestor

Page 542: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.STYLE.DMI_NONSERIALIZABLE_OBJECT_WRITTEN

Non serializable object written to ObjectOutput

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.STYLE.DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED

Thread passed where Runnable expected

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD

Useless/vacuous call to EasyMock method

hierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_VACUOUS_SELF_COLLECTION_CALL

Vacuous call to collectionshierarchy ancestor

CWE:735CERT C Secure Coding Section 01 - Preprocessor (PRE)

FB.CORRECTNESS.DMI_CALLING_NEXT_FROM_HASNEXT

hasNext method invokes nexthierarchy ancestor

CWE:736CERT C Secure Coding Section 02 -

PMD.Basic.AvoidUsingHardCodedIP

Avoid Using Hard Coded IPhierarchy ancestor

CWE:736CERT C Secure Coding Section 02 -

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:736CERT C Secure Coding Section 02 - Declarations and

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:736CERT C Secure Coding Section 02 -

PMD.Android.DoNotHardCodeSDCard

Do Not Hard Code SD Cardhierarchy ancestor

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

Page 543: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:736CERT C Secure Coding Section 02 - Declarations and

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:736

CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:736CERT C Secure Coding Section 02 - Declarations and

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 -

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

Page 544: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 -

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

Page 545: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 -

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

Page 546: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

Page 547: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 -

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:737CERT C Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

Page 548: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

Page 549: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:738CERT C Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

Page 550: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:739CERT C Secure Coding Section 05 - Floating Point (FLP)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:740CERT C Secure Coding Section 06 - Arrays (ARR)

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:740CERT C Secure Coding Section 06 - Arrays (ARR)

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:740CERT C Secure Coding Section 06 - Arrays (ARR)

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:740CERT C Secure Coding Section 06 - Arrays (ARR)

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

Page 551: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:741CERT C Secure Coding Section 07 - Characters and

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:741CERT C Secure Coding Section 07 -

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:741CERT C Secure Coding Section 07 - Characters and

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:741

CERT C Secure Coding Section 07 - Characters and Strings (STR)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

Page 552: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 -

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:742CERT C Secure Coding Section 08 -

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:742CERT C Secure Coding Section 08 -

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:742CERT C Secure Coding Section 08 -

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

Page 553: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

Page 554: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 -

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

Page 555: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

Page 556: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:742CERT C Secure Coding Section 08 - Memory Management

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:742

CERT C Secure Coding Section 08 - Memory Management (MEM)

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:742CERT C Secure Coding Section 08 - Memory Management

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 -

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

Page 557: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 -

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 -

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 -

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:743CERT C Secure Coding Section 09 - Input Output (FIO)

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:744CERT C Secure Coding Section 10 - Environment (ENV)

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:744CERT C Secure Coding Section 10 - Environment (ENV)

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:744CERT C Secure Coding Section 10 - Environment (ENV)

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:744CERT C Secure Coding Section 10 -

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

Page 558: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:744CERT C Secure Coding Section 10 - Environment (ENV)

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:744CERT C Secure Coding Section 10 -

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:744CERT C Secure Coding Section 10 -

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:744CERT C Secure Coding Section 10 - Environment (ENV)

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:744CERT C Secure Coding Section 10 - Environment (ENV)

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 -

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 -

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 -

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

Page 559: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 -

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 -

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 -

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

Page 560: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:745CERT C Secure Coding Section 11 - Signals (SIG)

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 -

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

Page 561: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 -

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 -

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:746CERT C Secure Coding Section 12 -

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 -

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:746CERT C Secure Coding Section 12 - Error Handling (ERR)

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

Page 562: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

Page 563: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

Page 564: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

Page 565: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

PMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

Page 566: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 -

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:747CERT C Secure Coding Section 49 - Miscellaneous (MSC)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

Page 567: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:748CERT C Secure Coding Section 50 -

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:748CERT C Secure Coding Section 50 -

PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:748CERT C Secure Coding Section 50 - POSIX (POS)

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:749Exposed Dangerous Method or Function

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:749Exposed Dangerous Method or Function

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

Page 568: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

Page 569: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

Page 570: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:750Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:750

Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

Page 571: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

Page 572: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:7512009 Top 25 - Insecure Interaction Between Components

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

Page 573: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:7522009 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:7522009 Top 25 - Risky Resource Management

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

Page 574: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:7532009 Top 25 - Porous Defenses

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:7532009 Top 25 - Porous Defenses

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:7532009 Top 25 - Porous Defenses

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:754Improper Check for Unusual or Exceptional

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:754Improper Check for Unusual or

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:754Improper Check for Unusual or

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:754

Improper Check for Unusual or Exceptional Conditions

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:754Improper Check for Unusual or

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:754Improper Check for Unusual or Exceptional

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:754

Improper Check for Unusual or Exceptional Conditions

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:754

Improper Check for Unusual or Exceptional Conditions

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:754Improper Check for Unusual or Exceptional

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:754Improper Check for Unusual or Exceptional

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:754Improper Check for Unusual or Exceptional

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:754Improper Check for Unusual or Exceptional

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:754Improper Check for Unusual or

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:754Improper Check for Unusual or

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:754

Improper Check for Unusual or Exceptional Conditions

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:754Improper Check for Unusual or Exceptional

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

Page 575: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:755Improper Handling of Exceptional Conditions

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:755Improper Handling of Exceptional Conditions

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:755Improper Handling of Exceptional Conditions

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:755Improper Handling of Exceptional

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:755Improper Handling of Exceptional Conditions

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:755Improper Handling of Exceptional Conditions

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:755Improper Handling of Exceptional

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:755Improper Handling of Exceptional

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:756Missing Custom Error Page

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy descendant

CWE:756Missing Custom Error Page

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy descendant

CWE:756Missing Custom Error Page

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy descendant

CWE:756Missing Custom Error Page

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy descendant

CWE:756Missing Custom Error Page

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy descendant

CWE:758Reliance on Undefined, Unspecified, or

FB.MT_CORRECTNESS.SP_SPIN_ON_FIELD

Method spins on field closely mapped

CWE:761Free of Pointer not at Start of Buffer

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

Page 576: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:761Free of Pointer not at Start of Buffer

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

Page 577: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:761Free of Pointer not at Start of Buffer

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:761Free of Pointer not at Start of Buffer

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:762Mismatched Memory Management

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:762Mismatched Memory Management Routines

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:762Mismatched Memory Management Routines

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 578: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:762Mismatched Memory Management

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:762Mismatched Memory Management Routines

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:762Mismatched Memory Management

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:762Mismatched Memory Management Routines

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:762Mismatched Memory Management Routines

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:762Mismatched Memory Management Routines

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 579: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:762Mismatched Memory Management Routines

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:762Mismatched Memory Management Routines

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 580: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:763Release of Invalid Pointer or Reference

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:763Release of Invalid Pointer or Reference

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:763Release of Invalid Pointer or Reference

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

Page 581: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

Page 582: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

Page 583: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:764Multiple Locks of a Critical Resource

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION

Class is Externalizable but doesn't define a void constructor

hierarchy descendant

Page 584: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.SE_NO_SUITABLE_CONSTRUCTOR

Class is Serializable but its superclass doesn't define a void constructor

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.AM_CREATES_EMPTY_JAR_FILE_ENTRY

Creates an empty jar file entryhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.AM_CREATES_EMPTY_ZIP_FILE_ENTRY

Creates an empty zip file entryhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS

Fields of immutable classes should be final

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.IT_NO_SUCH_ELEMENT

Iterator next() method can't throw NoSuchElementException

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.CORRECTNESS.SE_METHOD_MUST_BE_PRIVATE

Method must be private in order for serialization to work

hierarchy descendant

Page 585: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

Page 586: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.SE_READ_RESOLVE_MUST_RETURN_OBJECT

The readResolve method must be declared with a return type of Object.

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.CORRECTNESS.SE_READ_RESOLVE_IS_STATIC

The readResolve method must not be declared as a static method.

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy descendant

CWE:765Multiple Unlocks of a Critical Resource

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy descendant

CWE:766Critical Variable Declared Public

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy descendant

CWE:766Critical Variable Declared Public

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

closely mapped

CWE:766Critical Variable Declared Public

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy descendant

CWE:766Critical Variable Declared Public

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy descendant

CWE:767Access to Critical Private Variable via Public Method

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Array closely mapped

Page 587: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:767Access to Critical Private Variable via Public Method

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

closely mapped

CWE:768Incorrect Short Circuit Evaluation

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:768Incorrect Short Circuit Evaluation

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:768Incorrect Short Circuit Evaluation

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:768Incorrect Short Circuit Evaluation

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:768Incorrect Short Circuit Evaluation

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:768Incorrect Short Circuit Evaluation

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:768Incorrect Short Circuit Evaluation

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

Page 588: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:769File Descriptor Exhaustion

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

Page 589: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:769File Descriptor Exhaustion

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:769File Descriptor Exhaustion

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:770Allocation of Resources Without

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 590: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:770Allocation of Resources Without

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:770Allocation of Resources Without

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:770Allocation of Resources Without

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

Page 591: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:770Allocation of Resources Without Limits or Throttling

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:770Allocation of Resources Without Limits or Throttling

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:771Missing Reference to Active Allocated

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:771Missing Reference to Active Allocated

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 592: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:771Missing Reference to Active Allocated Resource

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:771Missing Reference to Active Allocated

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:771Missing Reference to Active Allocated Resource

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:772Missing Release of Resource after

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

Page 593: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:772Missing Release of Resource after Effective Lifetime

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:772Missing Release of Resource after

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:772Missing Release of Resource after

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

Page 594: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:772Missing Release of Resource after Effective Lifetime

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:772Missing Release of Resource after

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:772Missing Release of Resource after Effective Lifetime

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

Page 595: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:773Missing Reference to Active File Descriptor or Handle

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

Page 596: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:773Missing Reference to Active File Descriptor or Handle

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:774Allocation of File Descriptors or

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

Page 597: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:774Allocation of File Descriptors or

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:774Allocation of File Descriptors or

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

CWE:774Allocation of File Descriptors or

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

Page 598: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:774Allocation of File Descriptors or Handles Without

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:774

Allocation of File Descriptors or Handles Without Limits or Throttling

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:774Allocation of File Descriptors or Handles Without

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:775Missing Release of File Descriptor or

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

Page 599: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:775Missing Release of File Descriptor or

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:775Missing Release of File Descriptor or

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:775Missing Release of File Descriptor or

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close stream closely mapped

CWE:775Missing Release of File Descriptor or Handle after Effective

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

closely mapped

CWE:775Missing Release of File Descriptor or Handle after Effective

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

Page 600: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:775Missing Release of File Descriptor or Handle after Effective

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:775

Missing Release of File Descriptor or Handle after Effective Lifetime

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:775Missing Release of File Descriptor or Handle after Effective

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

Page 601: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 602: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:776

Improper Restriction of Recursive Entity References in DTDs ('XML Entity

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:776Improper Restriction of Recursive Entity References in DTDs

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:777Regular Expression without Anchors

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy descendant

CWE:777Regular Expression without Anchors

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:777Regular Expression without Anchors

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:777Regular Expression without Anchors

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy descendant

CWE:777Regular Expression without Anchors

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy descendant

CWE:777Regular Expression without Anchors

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

Page 603: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:777Regular Expression without Anchors

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:777Regular Expression without Anchors

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:779Logging of Excessive Data

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:779Logging of Excessive Data

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:779Logging of Excessive Data

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:779Logging of Excessive Data

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:779Logging of Excessive Data

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:779Logging of Excessive Data

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:779Logging of Excessive Data

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:779Logging of Excessive Data

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

Page 604: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:779Logging of Excessive Data

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:779Logging of Excessive Data

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:779Logging of Excessive Data

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:779Logging of Excessive Data

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:779Logging of Excessive Data

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:779Logging of Excessive Data

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:779Logging of Excessive Data

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:779Logging of Excessive Data

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:779Logging of Excessive Data

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:782Exposed IOCTL with Insufficient Access Control

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

Page 605: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:782Exposed IOCTL with Insufficient Access Control

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

Page 606: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.STYLE.RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE

Redundant comparison of non-null value to null

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.STYLE.RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES

Redundant comparison of two null values

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of value known to be non-null

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.STYLE.RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE

Redundant nullcheck of value known to be null

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.CORRECTNESS.RpC_REPEATED_CONDITIONAL_TEST

Repeated conditional testshierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:783Operator Precedence Logic Error

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

Page 607: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:783Operator Precedence Logic Error

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:783Operator Precedence Logic Error

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:785Use of Path Manipulation Function

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:785Use of Path Manipulation Function

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

Page 608: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:785Use of Path Manipulation Function

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:785

Use of Path Manipulation Function without Maximum-sized Buffer

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:785Use of Path Manipulation Function without Maximum-

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

Page 609: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:789Uncontrolled Memory Allocation

FB.CORRECTNESS.NM_METHOD_CONSTRUCTOR_CONFUSION

Apparent method/constructor confusion

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

PMD.Naming.AvoidDollarSigns Avoid Dollar Signshierarchy descendant

CWE:789Uncontrolled Memory Allocation

PMD.Naming.AvoidFieldNameMatchingMethodName

Avoid Field Name Matching Method Name

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

PMD.Naming.AvoidFieldNameMatchingTypeName

Avoid Field Name Matching Type Name

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.CORRECTNESS.NM_BAD_EQUAL

Class defines equal(Object), should it be equals(Object)?

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.CORRECTNESS.NM_LCASE_HASHCODE

Class defines hashcode(), should it be hashCode()?

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.CORRECTNESS.NM_LCASE_TOSTRING

Class defines tostring(), should it be toString()?

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_CLASS_NOT_EXCEPTION

Class is not derived from an Exception, even though it is named as such

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_CLASS_NAMING_CONVENTION

Class names should start with an upper case letter

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_INTERFACE

Class names shouldn't shadow simple name of implemented interface

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Class names shouldn't shadow simple name of superclass

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_CONFUSING

Confusing method nameshierarchy descendant

CWE:789Uncontrolled Memory Allocation

PMD.Controversial.DoNotCallGarbageCollectionExplicitly

Do Not Call Garbage Collection Explicitly

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.PERFORMANCE.DM_GCExplicit garbage collection; extremely dubious except in benchmarking code

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_FIELD_NAMING_CONVENTION

Field names should start with a lower case letter

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy descendant

Page 610: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:789Uncontrolled Memory Allocation

PMD.Naming.MethodNamingConventions

Method Naming Conventionshierarchy descendant

CWE:789Uncontrolled Memory Allocation

PMD.Naming.MethodWithSameNameAsEnclosingClass

Method With Same Name As Enclosing Class

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.CORRECTNESS.NM_WRONG_PACKAGE

Method doesn't override method in superclass due to wrong package for parameter

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_WRONG_PACKAGE_INTENTIONAL

Method doesn't override method in superclass due to wrong package for parameter (intentional)

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_METHOD_NAMING_CONVENTION

Method names should start with a lower case letter

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

PMD.Naming.SuspiciousEqualsMethodName

Suspicious Equals Method Namehierarchy descendant

CWE:789Uncontrolled Memory Allocation

PMD.Naming.SuspiciousHashcodeMethodName

Suspicious Hashcode Method Name

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER

Use of identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER

Use of member identifier that is a keyword in later versions of Java

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.CORRECTNESS.NM_VERY_CONFUSING

Very confusing method nameshierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.BAD_PRACTICE.NM_VERY_CONFUSING_INTENTIONAL

Very confusing method names (but perhaps intentional)

hierarchy descendant

CWE:789Uncontrolled Memory Allocation

FB.STYLE.ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

Write to static field from instance method

hierarchy descendant

CWE:790Improper Filtering of Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:790Improper Filtering of Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:790Improper Filtering of Special Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:790Improper Filtering of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

Page 611: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:790Improper Filtering of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:791Incomplete Filtering of Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:791Incomplete Filtering of Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:791Incomplete Filtering of Special Elements

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:791Incomplete Filtering of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:791Incomplete Filtering of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:792

Incomplete Filtering of One or More Instances of Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:792

Incomplete Filtering of One or More Instances of Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:792Incomplete Filtering of One or More

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:792Incomplete Filtering of One or More Instances of Special

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:792Incomplete Filtering of One or More Instances of Special

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:793Only Filtering One Instance of a Special Element

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:793Only Filtering One Instance of a Special Element

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:793Only Filtering One Instance of a Special

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:793Only Filtering One Instance of a Special Element

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:793Only Filtering One Instance of a Special Element

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 612: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:794Incomplete Filtering of Multiple Instances of Special Elements

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:794Incomplete Filtering of Multiple Instances of Special Elements

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:794Incomplete Filtering of Multiple Instances of

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:794Incomplete Filtering of Multiple Instances of Special Elements

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:794Incomplete Filtering of Multiple Instances of Special Elements

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:795Only Filtering Special Elements at a Specified Location

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:795Only Filtering Special Elements at a Specified Location

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:795Only Filtering Special Elements at a

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:795Only Filtering Special Elements at a Specified Location

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:795Only Filtering Special Elements at a Specified Location

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:796Only Filtering Special Elements Relative to a Marker

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:796Only Filtering Special Elements Relative to a Marker

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:796Only Filtering Special Elements Relative to a

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:796Only Filtering Special Elements Relative to a Marker

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:796Only Filtering Special Elements Relative to a Marker

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

Page 613: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:797Only Filtering Special Elements at an Absolute Position

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:797Only Filtering Special Elements at an Absolute Position

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:797Only Filtering Special Elements at an

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:797Only Filtering Special Elements at an Absolute Position

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:797Only Filtering Special Elements at an Absolute Position

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:798Use of Hard-coded Credentials

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:798Use of Hard-coded Credentials

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:798Use of Hard-coded Credentials

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:799Improper Control of Interaction Frequency

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:799Improper Control of Interaction Frequency

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

Page 614: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

Page 615: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

Page 616: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

Page 617: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

Page 618: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:800

Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:800Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

Page 619: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:8012010 Top 25 - Insecure Interaction Between Components

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:8022010 Top 25 - Risky Resource

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

Page 620: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8022010 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:8022010 Top 25 - Risky Resource Management

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:8032010 Top 25 - Porous Defenses

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:8032010 Top 25 - Porous Defenses

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:804 Guessable CAPTCHAFB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy descendant

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

Page 621: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

Page 622: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

Page 623: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:8082010 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:809Weaknesses in OWASP Top Ten (2010)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:809Weaknesses in OWASP Top Ten (2010)

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:809Weaknesses in OWASP Top Ten (2010)

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:809Weaknesses in OWASP Top Ten (2010)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:809Weaknesses in OWASP Top Ten (2010)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:809Weaknesses in OWASP Top Ten (2010)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:809Weaknesses in OWASP Top Ten (2010)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:810OWASP Top Ten 2010 Category A1 - Injection

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

Page 624: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:810OWASP Top Ten 2010 Category A1 - Injection

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:811OWASP Top Ten 2010 Category A2 - Cross-Site Scripting

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:811

OWASP Top Ten 2010 Category A2 - Cross-Site Scripting (XSS)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:811

OWASP Top Ten 2010 Category A2 - Cross-Site Scripting (XSS)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:812OWASP Top Ten 2010 Category A3 - Broken Authentication

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:812OWASP Top Ten 2010 Category A3 - Broken Authentication

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:820Missing Synchronization

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

closely mapped

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

closely mapped

CWE:820Missing Synchronization

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:820Missing Synchronization

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

Page 625: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:820Missing Synchronization

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:820Missing Synchronization

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:820Missing Synchronization

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:820Missing Synchronization

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:820Missing Synchronization

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:820Missing Synchronization

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:820Missing Synchronization

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

Page 626: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:820Missing Synchronization

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:820Missing Synchronization

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

closely mapped

CWE:820Missing Synchronization

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:821Incorrect Synchronization

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:821Incorrect Synchronization

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:821Incorrect Synchronization

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:821Incorrect Synchronization

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:821Incorrect Synchronization

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:821Incorrect Synchronization

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:821Incorrect Synchronization

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

Page 627: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

closely mapped

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:821Incorrect Synchronization

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:828Signal Handler with Functionality that is not Asynchronous-

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:828Signal Handler with Functionality that is not Asynchronous-

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:828

Signal Handler with Functionality that is not Asynchronous-Safe

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:828Signal Handler with Functionality that is not Asynchronous-

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:828Signal Handler with Functionality that is not Asynchronous-

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:828

Signal Handler with Functionality that is not Asynchronous-Safe

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:828Signal Handler with Functionality that is not Asynchronous-

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

Page 628: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:828

Signal Handler with Functionality that is not Asynchronous-Safe

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:831Signal Handler Function Associated with Multiple Signals

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

Page 629: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:832Unlock of a Resource that is not Locked

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

Page 630: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:832Unlock of a Resource that is not Locked

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:832Unlock of a Resource that is not Locked

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:833 DeadlockCTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy descendant

CWE:833 DeadlockCTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy descendant

CWE:833 DeadlockCTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy descendant

CWE:833 Deadlock CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy descendant

CWE:833 Deadlock CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy descendant

CWE:833 DeadlockFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:833 DeadlockFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 631: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:833 DeadlockFB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy descendant

CWE:833 DeadlockCTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy descendant

CWE:833 DeadlockCTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy descendant

CWE:833 DeadlockCTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy descendant

CWE:833 DeadlockFB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy descendant

CWE:834 Excessive IterationFB.CORRECTNESS.IL_CONTAINER_ADDED_TO_ITSELF

A collection is added to itselfhierarchy ancestor

CWE:834 Excessive IterationFB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loophierarchy ancestor

CWE:834 Excessive IterationFB.CORRECTNESS.IL_INFINITE_RECURSIVE_LOOP

An apparent infinite recursive loop

hierarchy ancestor

Page 632: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:834 Excessive IterationFB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:834 Excessive IterationFB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:835Loop with Unreachable Exit

FB.CORRECTNESS.IL_INFINITE_LOOP

An apparent infinite loop closely mapped

CWE:835

Loop with Unreachable Exit Condition ('Infinite Loop')

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:835Loop with Unreachable Exit Condition ('Infinite

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:837Improper Enforcement of a Single, Unique Action

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:837Improper Enforcement of a Single, Unique Action

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

CWE:838Inappropriate Encoding for Output Context

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:838Inappropriate Encoding for Output Context

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:838Inappropriate Encoding for Output

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:838Inappropriate Encoding for Output Context

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

CWE:838Inappropriate Encoding for Output Context

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:839Numeric Range Comparison Without Minimum Check

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy descendant

CWE:839Numeric Range Comparison Without Minimum Check

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy descendant

CWE:839Numeric Range Comparison Without

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy descendant

CWE:839Numeric Range Comparison Without Minimum Check

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy descendant

Page 633: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:839Numeric Range Comparison Without Minimum Check

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy descendant

CWE:840 Business Logic Errors PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:840 Business Logic Errors PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:840 Business Logic ErrorsFB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:840 Business Logic ErrorsFB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:840 Business Logic ErrorsFB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:840 Business Logic ErrorsFB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:840 Business Logic ErrorsFB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:840 Business Logic ErrorsFB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:840 Business Logic ErrorsFB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:840 Business Logic ErrorsFB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:840 Business Logic Errors PMD.Basic.MisplacedNullCheck Misplaced Null Checkhierarchy ancestor

CWE:840 Business Logic ErrorsFB.CORRECTNESS.RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Nullcheck of value previously dereferenced

hierarchy ancestor

CWE:840 Business Logic ErrorsFB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:840 Business Logic ErrorsPMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:841Improper Enforcement of Behavioral Workflow

FB.STYLE.NS_DANGEROUS_NON_SHORT_CIRCUIT

Potentially dangerous use of non-short-circuit logic

hierarchy descendant

CWE:841Improper Enforcement of Behavioral Workflow

FB.STYLE.NS_NON_SHORT_CIRCUIT

Questionable use of non-short-circuit logic

hierarchy descendant

Page 634: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:843

Access of Resource Using Incompatible Type ('Type Confusion')

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy descendant

CWE:843Access of Resource Using Incompatible Type ('Type

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy descendant

CWE:843Access of Resource Using Incompatible Type ('Type

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy descendant

CWE:843

Access of Resource Using Incompatible Type ('Type Confusion')

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy descendant

CWE:843

Access of Resource Using Incompatible Type ('Type Confusion')

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy descendant

CWE:843Access of Resource Using Incompatible Type ('Type

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy descendant

CWE:843Access of Resource Using Incompatible Type ('Type

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy descendant

CWE:843

Access of Resource Using Incompatible Type ('Type Confusion')

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy descendant

CWE:843Access of Resource Using Incompatible

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy descendant

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directlyhierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

Page 635: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwablehierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Basic.AvoidThreadGroup Avoid Thread Grouphierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

Page 636: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loophierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.SC_START_IN_CTOR

Constructor invokes Thread.start()

hierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

Page 637: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

Page 638: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:844Weaknesses Addressed by the

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularityhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.EC_BAD_ARRAY_COMPARE

Invocation of equals() on an array, which is equivalent to ==

hierarchy ancestor

Page 639: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

Page 640: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:844Weaknesses Addressed by the

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:844Weaknesses Addressed by the

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

Page 641: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:844Weaknesses Addressed by the

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encodinghierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

Page 642: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

Page 643: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

Page 644: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

hierarchy ancestor

CWE:844Weaknesses Addressed by the

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notifyhierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loophierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

Page 645: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypeshierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:844Weaknesses Addressed by the CERT Java Secure

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:844

Weaknesses Addressed by the CERT Java Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

closely mapped

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)

FB.I18N.DM_CONVERT_CASEConsider using Locale parameterized version of invoked method

closely mapped

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

Page 646: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

FB.I18N.DM_DEFAULT_ENCODING

Reliance on default encoding closely mapped

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

PMD.Design.SimpleDateFormatNeedsLocale

Simple Date Format Needs Locale

closely mapped

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

Page 647: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:845CERT Java Secure Coding Section 00 - Input Validation and

PMD.Design.UseLocaleWithCaseConversions

Use Locale With Case Conversions

closely mapped

CWE:845

CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:846CERT Java Secure Coding Section 01 - Declarations and

FB.STYLE.IC_INIT_CIRCULARITY Initialization circularity closely mapped

CWE:846CERT Java Secure Coding Section 01 - Declarations and

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:846

CERT Java Secure Coding Section 01 - Declarations and Initialization (DCL)

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:846CERT Java Secure Coding Section 01 - Declarations and

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:846CERT Java Secure Coding Section 01 - Declarations and

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 -

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 -

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 -

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 -

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.CORRECTNESS.EC_BAD_ARRAY_COMPARE

Invocation of equals() on an array, which is equivalent to ==

closely mapped

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

Page 648: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:847CERT Java Secure Coding Section 02 - Expressions (EXP)

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:848CERT Java Secure Coding Section 03 - Numeric Types and

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:848

CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:848CERT Java Secure Coding Section 03 - Numeric Types and

PMD.Design.BadComparison Bad Comparison closely mapped

CWE:848

CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:848CERT Java Secure Coding Section 03 - Numeric Types and

PMD.Basic.DontUseFloatTypeForLoopIndices

Don't Use Float Type For Loop Indices

closely mapped

CWE:848CERT Java Secure Coding Section 03 - Numeric Types and

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaN closely mapped

CWE:848

CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

Page 649: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:848CERT Java Secure Coding Section 03 - Numeric Types and

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:848CERT Java Secure Coding Section 03 - Numeric Types and

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:848

CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:848

CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:848CERT Java Secure Coding Section 03 - Numeric Types and

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:848

CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:849CERT Java Secure Coding Section 04 - Object Orientation

PMD.Security-Code-Guidelines.ArrayIsStoredDirectly

Array Is Stored Directly closely mapped

CWE:849CERT Java Secure Coding Section 04 -

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:849

CERT Java Secure Coding Section 04 - Object Orientation (OBJ)

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:849CERT Java Secure Coding Section 04 - Object Orientation

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:849

CERT Java Secure Coding Section 04 - Object Orientation (OBJ)

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:849

CERT Java Secure Coding Section 04 - Object Orientation (OBJ)

FB.MALICIOUS_CODE.EI_EXPOSE_REP2

May expose internal representation by incorporating reference to mutable object

hierarchy ancestor

CWE:849

CERT Java Secure Coding Section 04 - Object Orientation (OBJ)

FB.MALICIOUS_CODE.EI_EXPOSE_REP

May expose internal representation by returning reference to mutable object

hierarchy ancestor

CWE:849

CERT Java Secure Coding Section 04 - Object Orientation (OBJ)

FB.MALICIOUS_CODE.EI_EXPOSE_STATIC_REP2

May expose internal static state by storing a mutable object into a static field

closely mapped

CWE:849CERT Java Secure Coding Section 04 - Object Orientation

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

Page 650: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:849CERT Java Secure Coding Section 04 -

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:849

CERT Java Secure Coding Section 04 - Object Orientation (OBJ)

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

closely mapped

CWE:850CERT Java Secure Coding Section 05 -

PMD.Finalizer.AvoidCallingFinalize Avoid Calling Finalizehierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 -

FB.CORRECTNESS.DMI_BAD_MONTH

Bad constant value for monthhierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.HE_EQUALS_USE_HASHCODE

Class defines equals() and uses Object.hashCode()

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.HE_EQUALS_NO_HASHCODE

Class defines equals() but not hashCode()

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.HE_HASHCODE_USE_OBJECT_EQUALS

Class defines hashCode() and uses Object.equals()

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.HE_HASHCODE_NO_EQUALS

Class defines hashCode() but not equals()

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.CN_IDIOMClass implements Cloneable but does not define or use clone method

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.HE_INHERITS_EQUALS_USE_HASHCODE

Class inherits equals() and uses Object.hashCode()

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.BOA_BADLY_OVERRIDDEN_ADAPTER

Class overrides a method implemented in super class Adapter wrongly

closely mapped

CWE:850CERT Java Secure Coding Section 05 -

PMD.J2EE.DoNotUseThreads Do Not Use Threadshierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.FI_EXPLICIT_INVOCATION

Explicit invocation of finalizerhierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

Page 651: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.VA_FORMAT_STRING_MISSING_ARGUMENT

Format string references missing argument

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.DM_RUN_FINALIZERS_ON_EXIT

Method invokes dangerous method runFinalizersOnExit

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.MT_CORRECTNESS.DM_MONITOR_WAIT_ON_CONDITION

Monitor wait() called on Condition

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED

More arguments are passed than are actually used in the format string

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

PMD.Basic.OverrideBothEqualsAndHashcode

Override Both Equals And Hashcode

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

Page 652: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.DMI_ARGUMENTS_WRONG_ORDER

Reversed method argumentshierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS

Signature declares use of unhashable class in hashed construct

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION

Store of non serializable object into HttpSession

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.HE_USE_OF_UNHASHABLE_CLASS

Use of class without a hashCode() method in a hashed data structure

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.BAD_PRACTICE.EQ_GETCLASS_AND_CLASS_CONSTANT

equals method fails for subtypes closely mapped

CWE:850CERT Java Secure Coding Section 05 - Methods (MET)

FB.CORRECTNESS.EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC

equals method overrides equals in superclass and may not be symmetric

closely mapped

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

PMD.Strict-Exceptions.AvoidCatchingThrowable

Avoid Catching Throwable closely mapped

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 -

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 -

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 -

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exit closely mapped

Page 653: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

PMD.Strict-Exceptions.DoNotThrowExceptionInFinally

Do Not Throw Exception In Finally

closely mapped

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 -

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...) closely mapped

CWE:851CERT Java Secure Coding Section 06 -

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 -

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exception closely mapped

CWE:851CERT Java Secure Coding Section 06 -

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:851

CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:851CERT Java Secure Coding Section 06 - Exceptional Behavior

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

Page 654: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 -

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 -

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 -

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

Page 655: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 -

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 -

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 -

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

Page 656: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:852CERT Java Secure Coding Section 07 - Visibility and

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:852

CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

CTS.Locking.CCE_LK_LOCKED_BLOCKING_CALLS

Call to blocking method whilst holding lock

closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 -

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

Page 657: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 -

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Boolean closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

CTS.Locking.CCE_CC_REUSEDOBJ_SYNC

Synchronizing on reusable objects

closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

closely mapped

CWE:853CERT Java Secure Coding Section 08 - Locking (LCK)

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

Page 658: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 -

PMD.Basic.AvoidThreadGroup Avoid Thread Group closely mapped

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

FB.MT_CORRECTNESS.WA_AWAIT_NOT_IN_LOOP

Condition.await() not in loop closely mapped

CWE:854CERT Java Secure Coding Section 09 -

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 -

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 -

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 -

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:854CERT Java Secure Coding Section 09 -

PMD.Design.UseNotifyAllInsteadOfNotify

Use Notify All Instead Of Notify closely mapped

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL

Using notify() rather than notifyAll()

closely mapped

CWE:854CERT Java Secure Coding Section 09 - Thread APIs (THI)

FB.MT_CORRECTNESS.WA_NOT_IN_LOOP

Wait not in loop closely mapped

CWE:856CERT Java Secure Coding Section 11 - Thread-Safety

FB.MT_CORRECTNESS.SC_START_IN_CTOR

Constructor invokes Thread.start()

closely mapped

CWE:857CERT Java Secure Coding Section 12 -

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:857CERT Java Secure Coding Section 12 - Input Output (FIO)

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:857CERT Java Secure Coding Section 12 - Input Output (FIO)

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:857CERT Java Secure Coding Section 12 - Input Output (FIO)

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

Page 659: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:857CERT Java Secure Coding Section 12 - Input Output (FIO)

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:857CERT Java Secure Coding Section 12 - Input Output (FIO)

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:857CERT Java Secure Coding Section 12 - Input Output (FIO)

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:857CERT Java Secure Coding Section 12 -

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:857CERT Java Secure Coding Section 12 - Input Output (FIO)

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:858CERT Java Secure Coding Section 13 -

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:858CERT Java Secure Coding Section 13 - Serialization (SER)

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:859CERT Java Secure Coding Section 14 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 - Miscellaneous (MSC)

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 - Miscellaneous (MSC)

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 - Miscellaneous (MSC)

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 -

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 -

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:861CERT Java Secure Coding Section 49 - Miscellaneous (MSC)

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:8642011 Top 25 - Insecure Interaction Between Components

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:8642011 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

Page 660: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8642011 Top 25 - Insecure Interaction Between Components

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:8642011 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:8642011 Top 25 - Insecure Interaction Between Components

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:8652011 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:8652011 Top 25 - Risky Resource Management

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:8652011 Top 25 - Risky Resource Management

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:8652011 Top 25 - Risky Resource Management

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:8652011 Top 25 - Risky Resource Management

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:8662011 Top 25 - Porous Defenses

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:8662011 Top 25 - Porous Defenses

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

Page 661: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

Page 662: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

Page 663: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

Page 664: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:8672011 Top 25 - Weaknesses On the Cusp

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.RE_POSSIBLE_UNINTENDED_PATTERN

"." used for regular expressionhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

Page 665: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN

A parameter is dead upon entry to a method but overwritten

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.VO_VOLATILE_INCREMENT

An increment to a volatile field isn't atomic

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY

Array formatted in useless way using format string

hierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Design.AssignmentToNonFinalStatic

Assignment To Non Final Statichierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

PMD.Strict-Exceptions.AvoidCatchingGenericException

Avoid Catching Generic Exception

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Strict-Exceptions.AvoidCatchingNPE

Avoid Catching NPEhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

PMD.Strict-Exceptions.AvoidThrowingRawExceptionTypes

Avoid Throwing Raw Exception Types

hierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Design.BadComparison Bad Comparisonhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE

Bad comparison of nonnegative value with negative constant

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

Page 666: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.EC_UNRELATED_INTERFACES

Call to equals() comparing different interface types

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.EC_UNRELATED_TYPES

Call to equals() comparing different types

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.EC_UNRELATED_CLASS_AND_INTERFACE

Call to equals() comparing unrelated class and interface

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.CORRECTNESS.EC_NULL_ARG

Call to equals(null)hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE

Call to static Calendarhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE

Call to static DateFormathierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Basic.CheckResultSet Check Result Sethierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Basic.CheckSkipResult Check Skip Resulthierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.CORRECTNESS.BIT_AND_ZZ Check to see if ((...) & 0) == 0hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.WS_WRITEOBJECT_SYNC

Classs writeObject() method is synchronized but nothing else is

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Design.CloseResource Close Resourcehierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Design.CompareObjectsWithEquals

Compare Objects With Equalshierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.BAD_PRACTICE.EQ_SELF_NO_OBJECT

Covariant equals() method defined

hierarchy ancestor

Page 667: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH

Dead store due to switch statement fall through

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW

Dead store due to switch statement fall through to throw

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.DLS_DEAD_STORE_OF_CLASS_LITERAL

Dead store of class literalhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.DLS_DEAD_LOCAL_STORE_OF_NULL

Dead store of null to local variable

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.STYLE.DLS_DEAD_LOCAL_STORE

Dead store to local variablehierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD

Dead store to local variable that shadows field

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.J2EE.DoNotCallSystemExit Do Not Call System Exithierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Basic.DontCallThreadRun Don't Call Thread Runhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER

Doomed test for equality to NaNhierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Basic.DoubleCheckedLocking

Double Checked Lockinghierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.SA_FIELD_DOUBLE_ASSIGNMENT

Double assignment of fieldhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.SA_LOCAL_DOUBLE_ASSIGNMENT

Double assignment of local variable

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Empty-Code.EmptyCatchBlock

Empty Catch Blockhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.SECURITY.DMI_EMPTY_DB_PASSWORD

Empty database passwordhierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Design.EqualsNull Equals Nullhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

Equals method should not assume anything about the type of its argument

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.REC_CATCH_EXCEPTION

Exception is caught when Exception is not thrown

hierarchy ancestor

Page 668: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MALICIOUS_CODE.MS_MUTABLE_HASHTABLE

Field is a mutable Hashtablehierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MALICIOUS_CODE.MS_MUTABLE_ARRAY

Field is a mutable arrayhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MALICIOUS_CODE.MS_CANNOT_BE_FINAL

Field isn't final and can't be protected from malicious code

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MALICIOUS_CODE.MS_SHOULD_BE_FINAL

Field isn't final but should behierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.IS_FIELD_NOT_GUARDED

Field not guarded against concurrent access

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

CTS.Locking.CCE_CC_FIELD_LOCK_WRITE

Field reassigned while holding a lock on its value

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MALICIOUS_CODE.MS_FINAL_PKGPROTECT

Field should be both final and package protected

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MALICIOUS_CODE.MS_OOI_PKGPROTECT

Field should be moved out of an interface and made package protected

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

File.separator used for regular expression

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Finalizer.FinalizeDoesNotCallSuperFinalize

Finalize Does Not Call Super Finalize

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.FI_MISSING_SUPER_CALL

Finalizer does not call superclass finalizer

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.FI_NULLIFY_SUPER

Finalizer nullifies superclass finalizer

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MALICIOUS_CODE.FI_PUBLIC_SHOULD_BE_PROTECTED

Finalizer should be protected, not public

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_ARGUMENT

Format string placeholder incompatible with passed argument

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

Page 669: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.SECURITY.DMI_CONSTANT_DB_PASSWORD

Hardcoded constant database password

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.VA_FORMAT_STRING_ILLEGAL

Illegal format stringhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.BC_IMPOSSIBLE_CAST

Impossible casthierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST

Impossible downcasthierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY

Impossible downcast of toArray() result

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.CORRECTNESS.BIT_IOR Incompatible bitwise-or maskshierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

CTS.Locking.CCE_SL_INCONSISTENT_COL

Inconsistent collection synchronisation

hierarchy ancestor

CWE:868Weaknesses Addressed by the

CTS.Locking.CCE_SL_INCONSISTENT

Inconsistent synchronisationhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.IS2_INCONSISTENT_SYNC

Inconsistent synchronizationhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.LI_LAZY_INIT_UPDATE_STATIC

Incorrect lazy initialization and update of static field

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.LI_LAZY_INIT_STATIC

Incorrect lazy initialization of static field

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.STYLE.INT_BAD_REM_BY_1 Integer remainder modulo 1hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION

Invalid syntax for regular expression

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.RU_INVOKE_RUN

Invokes run on a thread (did you mean to start it instead?)

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

Page 670: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED

MessageFormat supplied where printf style format expected

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Security-Code-Guidelines.MethodReturnsInternalArray

Method Returns Internal Arrayhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.SQL_BAD_PREPARED_STATEMENT_ACCESS

Method attempts to access a prepared statement parameter with index 0

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.SQL_BAD_RESULTSET_ACCESS

Method attempts to access a result set field with index 0

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.SWL_SLEEP_WITH_LOCK_HELD

Method calls Thread.sleep() with a lock held

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK_EXCEPTION_PATH

Method does not release lock on all exception paths

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.UL_UNRELEASED_LOCK

Method does not release lock on all paths

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Method ignores exceptional return value

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.RR_NOT_CHECKED

Method ignores results of InputStream.read()

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.SR_NOT_CHECKED

Method ignores results of InputStream.skip()

hierarchy ancestor

Page 671: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.RV_RETURN_VALUE_IGNORED

Method ignores return valuehierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.RV_RETURN_VALUE_IGNORED_INFERRED

Method ignores return value, is this OK?

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.BAD_PRACTICE.DM_EXIT Method invokes System.exit(...)hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION

Method may fail to clean up stream or resource

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.EXPERIMENTAL.OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

Method may fail to clean up stream or resource on checked exception

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE

Method may fail to close database resource

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH

Method may fail to close database resource on exception

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.BAD_PRACTICE.OS_OPEN_STREAM

Method may fail to close streamhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.OS_OPEN_STREAM_EXCEPTION_PATH

Method may fail to close stream on exception

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.BAD_PRACTICE.DE_MIGHT_DROP

Method might drop exceptionhierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.BAD_PRACTICE.DE_MIGHT_IGNORE

Method might ignore exceptionhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.ML_SYNC_ON_UPDATED_FIELD

Method synchronizes on an updated field

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.MWN_MISMATCHED_NOTIFY

Mismatched notify()hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.MWN_MISMATCHED_WAIT

Mismatched wait()hierarchy ancestor

CWE:868Weaknesses Addressed by the

CTS.Locking.CCE_SL_MIXED_COL Mixed collection synchronisationhierarchy ancestor

CWE:868Weaknesses Addressed by the

CTS.Locking.CCE_SL_MIXED Mixed synchronisationhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.MSF_MUTABLE_SERVLET_FIELD

Mutable servlet fieldhierarchy ancestor

Page 672: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT

No previous argument for format string

hierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Design.NonThreadSafeSingleton

Non Thread Safe Singletonhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

CTS.Collections.CCE_CC_NON_ATOMIC_CP

Non atomic Check/Put on thread-safe collection

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN

Non-Boolean argument formatted using %b format specifier

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.DLS_OVERWRITTEN_INCREMENT

Overwritten incrementhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.DC_DOUBLECHECK

Possible double check of fieldhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

Page 673: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG

Primitive array passed to function expecting a variable number of object arguments

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.PERFORMANCE.UPM_UNCALLED_PRIVATE_METHOD

Private method is never calledhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

PMD.Clone-Implementation.ProperCloneImplementation

Proper Clone Implementationhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MALICIOUS_CODE.MS_EXPOSE_REP

Public static method may expose internal representation by returning array

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.BC_BAD_CAST_TO_ABSTRACT_COLLECTION

Questionable cast to abstract collection

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.BC_BAD_CAST_TO_CONCRETE_COLLECTION

Questionable cast to concrete collection

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.DMI_RANDOM_USED_ONLY_ONCE

Random object created and used only once

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Basic.ReturnFromFinallyBlock Return From Finally Blockhierarchy ancestor

Page 674: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED

Return value of putIfAbsent ignored, value passed to putIfAbsent reused

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.SA_FIELD_SELF_COMPARISON

Self comparison of field with itself

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.SA_LOCAL_SELF_COMPARISON

Self comparison of value with itself

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION

Sequence of calls to concurrent abstraction may not be atomic

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

CTS.Collections.CCE_CC_UNSAFE_CONTENT

Shared non-thread-safe contenthierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

PMD.Type-Resolution.SignatureDeclareThrowsException

Signature Declare Throws Exception

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

PMD.Strict-Exceptions.SignatureDeclareThrowsException

Signature Declare Throws Exception (Strict-Exceptions)

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_STATIC_CALENDAR_INSTANCE

Static Calendar fieldhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE

Static DateFormathierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.J2EE.StaticEJBFieldShouldBeFinal

Static EJB Field Should Be Finalhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.RC_REF_COMPARISON

Suspicious reference comparison

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN

Suspicious reference comparison of Boolean values

hierarchy ancestor

Page 675: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.RC_REF_COMPARISON_BAD_PRACTICE

Suspicious reference comparison to constant

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Design.SwitchStmtsShouldHaveDefault

Switch Stmts Should Have Default

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.STYLE.SF_SWITCH_NO_DEFAULT

Switch statement found where default case is missing

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOOLEAN

Synchronization on Booleanhierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE

Synchronization on boxed primitive

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE

Synchronization on boxed primitive values

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD

Synchronization on field in futile attempt to guard that field

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL

Synchronization on getClass rather than class literal

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.DL_SYNCHRONIZATION_ON_SHARED_CONSTANT

Synchronization on interned String

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.JLM_JSR166_LOCK_MONITORENTER

Synchronization performed on Lock

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.JLM_JSR166_UTILCONCURRENT_MONITORENTER

Synchronization performed on util.concurrent instance

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.VA_FORMAT_STRING_BAD_CONVERSION

The type of a supplied argument doesn't match format specifier

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

CTS.Collections.CCE_CC_UNSAFE_REPLACEMENT

Thread-safe collection replaced by potentially unsafe collection

hierarchy ancestor

Page 676: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS

Uncallable method defined in anonymous class

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.STYLE.BC_UNCONFIRMED_CAST

Unchecked/unconfirmed casthierarchy ancestor

CWE:868Weaknesses Addressed by the

PMD.Basic.UnconditionalIfStatement

Unconditional If Statementhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.UR_UNINIT_READ

Uninitialized read of field in constructor

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR

Uninitialized read of field method called from constructor of superclass

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

CTS.Collections.CCE_CC_UNSAFE_ITERATION

Unsafe iteration over synchronised collection

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

CTS.Locking.CCE_CC_CALLBACK_ACCESS

Unsynchronised write to field from asynchronous callback

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.UG_SYNC_SET_UNSYNC_GET

Unsynchronized get method, synchronized set method

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Unused-Code.UnusedFormalParameter

Unused Formal Parameterhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Unused-Code.UnusedLocalVariable

Unused Local Variablehierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Unused-Code.UnusedPrivateField

Unused Private Fieldhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Unused-Code.UnusedPrivateMethod

Unused Private Methodhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.UWF_UNWRITTEN_FIELD

Unwritten fieldhierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Unwritten public or protected field

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

PMD.Unnecessary.UselessOperationOnImmutable

Useless Operation On Immutable

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.DLS_DEAD_LOCAL_STORE_IN_RETURN

Useless assignment in return statement

hierarchy ancestor

Page 677: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.MT_CORRECTNESS.JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT

Using monitor style wait methods on util.concurrent abstraction

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.EC_UNRELATED_TYPES_USING_POINTER_EQUALITY

Using pointer equality to compare different types

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.CN_IDIOM_NO_SUPER_CALL

clone method does not call super.clone()

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.EQ_ALWAYS_FALSE

equals method always returns false

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.EQ_ALWAYS_TRUE

equals method always returns true

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.EQ_COMPARING_CLASS_NAMES

equals method compares class names rather than class objects

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.EC_ARRAY_AND_NONARRAY

equals() used to compare array and nonarray

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.EC_INCOMPATIBLE_ARRAY_COMPARE

equals(...) used to compare incompatible arrays

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.CORRECTNESS.BC_IMPOSSIBLE_INSTANCEOF

instanceof will always return false

hierarchy ancestor

CWE:868Weaknesses Addressed by the

FB.STYLE.BC_VACUOUS_INSTANCEOF

instanceof will always return truehierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

Page 678: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:868

Weaknesses Addressed by the CERT C++ Secure Coding Standard

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:868Weaknesses Addressed by the CERT C++ Secure

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_INSTANCEOF

A known null value is checked to see if it is an instance of a type

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 -

PMD.Basic.BrokenNullCheck Broken Null Checkhierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_CLONE_COULD_RETURN_NULL

Clone method may return nullhierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.ES_COMPARING_STRINGS_WITH_EQ

Comparison of String objects using == or !=

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.ES_COMPARING_PARAMETER_STRING_WITH_EQ

Comparison of String parameter using == or !=

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_DEREFERENCE_OF_READLINE_VALUE

Dereference of the result of readLine() without nullcheck

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Field not initialized in constructor but dereferenced without null check

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_IMMEDIATE_DEREFERENCE_OF_READLINE

Immediate dereference of the result of readLine()

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_LOAD_OF_KNOWN_NULL_VALUE

Load of known null valuehierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT

Method assigns boolean literal in boolean expression

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS

Method call passes null for nonnull parameter (deref all)

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF

Method call passes null for nonnull parameter (deref)

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NONNULL_PARAM_VIOLATION

Method call passes null to a nonnull parameter

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_ARGUMENT_MIGHT_BE_NULL

Method does not check for null argument

hierarchy ancestor

Page 679: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NONNULL_RETURN_VIOLATION

Method may return null, but is declared @NonNull

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_BOOLEAN_RETURN_NULL

Method with Boolean return type returns explicit null

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_PARAM_DEREF_NONVIRTUAL

Non-virtual method call passes null for nonnull parameter

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 -

FB.CORRECTNESS.NP_ALWAYS_NULL

Null pointer dereferencehierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_ALWAYS_NULL_EXCEPTION

Null pointer dereference in method on exception path

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_GUARANTEED_DEREF

Null value is guaranteed to be dereferenced

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

Parameter must be nonnull but is marked as nullable

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH

Possible null pointer dereferencehierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Possible null pointer dereference due to return value of called method

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_NULL_ON_SOME_PATH_EXCEPTION

Possible null pointer dereference in method on exception path

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE

Possible null pointer dereference on branch that might be infeasible

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_UNWRITTEN_FIELD

Read of unwritten fieldhierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.STYLE.NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD

Read of unwritten public or protected field

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_STORE_INTO_NONNULL_FIELD

Store of null value into field annotated NonNull

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.MT_CORRECTNESS.NP_SYNC_AND_NULL_CHECK_FIELD

Synchronize and null check on the same field.

hierarchy ancestor

Page 680: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

PMD.String-and-StringBuffer.UseEqualsToCompareStrings

Use Equals To Compare Stringshierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH

Value is null and guaranteed to be dereferenced on exception path

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.CORRECTNESS.NP_CLOSING_NULL

close() invoked on a value that is always null

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

equals() method does not check for null argument

hierarchy ancestor

CWE:871CERT C++ Secure Coding Section 03 - Expressions (EXP)

FB.BAD_PRACTICE.NP_TOSTRING_COULD_RETURN_NULL

toString method may return nullhierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.SECURITY.SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING

A prepared statement is generated from a nonconstant String

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 -

PMD.Controversial.AvoidUsingNativeCode

Avoid Using Native Codehierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_HTTP_HEADER

HTTP Response splitting vulnerability

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.SECURITY.HRS_REQUEST_PARAMETER_TO_COOKIE

HTTP cookie formed from untrusted input

hierarchy ancestor

Page 681: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_JSP_WRITER

JSP reflected cross site scripting vulnerability

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.SECURITY.SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE

Nonconstant string passed to execute method on an SQL statement

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER

Servlet reflected cross site scripting vulnerability

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.SECURITY.XSS_REQUEST_PARAMETER_TO_SEND_ERROR

Servlet reflected cross site scripting vulnerability in error page

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:872CERT C++ Secure Coding Section 04 - Integers (INT)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

FB.CORRECTNESS.ICAST_BAD_SHIFT_AMOUNT

32 bit int shifted by an amount not in the range -31..31

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

PMD.Basic.AvoidDecimalLiteralsInBigDecimalConstructor

Avoid Decimal Literals In Big Decimal Constructor

hierarchy ancestor

Page 682: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®

CWE - Java Mapping to CodeSonar®

GrammaTech Confidential and Proprietary. CodeSonar is a registered trademark of GrammaTech, Inc.

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_HASHCODE

Bad attempt to compute absolute value of signed 32-bit hashcode

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.CORRECTNESS.RV_ABSOLUTE_VALUE_OF_RANDOM_INT

Bad attempt to compute absolute value of signed random integer

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.CORRECTNESS.DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE

BigDecimal constructed from double that isn't represented precisely

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.STYLE.IM_BAD_CHECK_FOR_ODD

Check for oddness that won't work for negative numbers

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

PMD.Basic.ClassCastExceptionWithToArray

Class Cast Exception With To Array

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

FB.STYLE.IM_AVERAGE_COMPUTATION_COULD_OVERFLOW

Computation of average could overflow

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.BAD_PRACTICE.RV_NEGATING_RESULT_OF_COMPARETO

Negating the result of compareTo()/compare()

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.CORRECTNESS.RV_01_TO_INTRandom value from 0 to 1 is coerced to the integer 0

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

FB.STYLE.RV_REM_OF_RANDOM_INT

Remainder of 32-bit signed random integer

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

FB.STYLE.RV_REM_OF_HASHCODE

Remainder of hashCode could be negative

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

FB.STYLE.ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Result of integer multiplication cast to long

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

FB.STYLE.ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT

Unsigned right shift cast to short/byte

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.CORRECTNESS.ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND

int value cast to float and then passed to Math.round

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.CORRECTNESS.ICAST_INT_2_LONG_AS_INSTANT

int value converted to long and used as absolute time

hierarchy ancestor

CWE:873CERT C++ Secure Coding Section 05 - Floating Point

FB.STYLE.ICAST_IDIV_CAST_TO_DOUBLE

integral division result cast to double or float

hierarchy ancestor

CWE:873

CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)

FB.CORRECTNESS.ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL

integral value cast to double and then passed to Math.ceil

hierarchy ancestor

Page 683: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 684: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 685: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 686: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 687: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 688: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 689: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 690: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 691: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 692: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 693: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 694: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 695: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 696: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 697: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 698: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 699: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 700: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 701: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 702: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 703: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 704: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 705: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 706: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 707: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 708: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 709: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 710: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 711: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 712: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 713: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 714: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 715: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 716: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 717: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 718: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 719: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 720: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 721: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 722: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 723: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 724: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 725: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 726: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 727: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 728: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 729: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 730: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 731: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 732: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 733: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 734: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 735: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 736: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 737: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 738: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 739: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 740: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 741: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 742: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 743: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 744: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 745: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 746: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 747: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 748: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 749: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 750: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 751: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 752: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 753: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 754: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 755: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 756: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 757: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 758: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 759: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 760: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 761: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 762: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 763: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 764: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 765: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 766: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 767: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 768: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 769: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 770: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 771: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 772: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 773: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 774: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 775: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 776: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 777: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 778: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 779: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 780: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 781: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 782: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 783: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 784: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 785: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 786: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 787: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 788: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 789: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 790: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 791: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 792: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 793: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 794: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 795: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 796: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 797: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 798: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 799: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 800: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 801: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 802: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 803: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 804: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 805: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 806: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 807: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 808: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 809: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 810: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 811: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 812: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 813: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 814: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 815: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 816: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 817: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 818: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 819: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 820: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 821: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 822: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 823: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 824: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 825: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 826: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 827: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 828: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 829: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 830: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 831: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 832: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 833: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 834: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 835: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 836: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 837: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 838: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 839: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 840: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 841: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 842: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 843: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 844: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 845: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 846: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 847: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 848: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 849: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 850: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 851: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 852: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 853: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 854: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 855: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 856: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 857: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 858: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 859: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 860: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 861: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 862: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 863: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 864: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 865: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 866: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 867: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 868: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 869: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 870: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 871: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 872: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 873: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®
Page 874: CWE - Java Mapping to CodeSonar - GrammaTechCWE - Java Mapping to CodeSonar ® ® ® ® ® ® ® ® ® Name Default ® ® ® ® ® ® ® OOP ® ® ® ® ® ® ® ® ® ® ® ®