Logo
1.800.487.3217
info@roguewave.com
Need Support Click here
Skip to main content
  • Home
  • Support
  • Videos

Search

  • Release notes
    • What's new in Klocwork 2019
    • Fixed issues in Klocwork 2019
    • Limitations
  • System Requirements
    • Supported platforms
    • Disk space requirements
    • Processor and RAM requirements
    • Java Virtual Machine requirements
    • Ports used by the Klocwork servers
    • Supported IDEs
    • Supported continuous integration servers
    • Supported browsers
    • Supported source code management systems for Klocwork Code Review
    • Supported Java build tools
    • C/C++ compilers supported for build integration
    • Supported C++ language specifications
    • Supported C# language specifications
    • Application servers supported by Klocwork JSP scanning
    • Supported versions of Flex Net Publisher
    • Supported versions of MariaDB
    • Supported LDAP servers
  • Install
    • About the Klocwork packages and components
      • Continuous integration (CI) components
    • Upgrading from a previous version
      • Import your existing projects into a new projects root
        • Validate your database (mandatory)
      • Migrate your projects_root directory
    • Installing Klocwork
      • Installing the Klocwork Server package on Windows
      • Installing the Klocwork Server package on Windows -- Upgrade only
      • Installing the Klocwork Server package on Linux
      • Installing the Klocwork Server package on Linux -- Upgrade only
      • Installing the Build Tools package
      • Installing the Build Tools package -- Upgrade only
      • Installing the kwciagent package
      • Klocwork Server Configuration for Mac/AIX/Solaris
      • Downloading and deploying the desktop analysis plug-ins
      • Installing a desktop analysis plug-in
        • Install your plug-in
        • Installing the Klocwork plug-in from the Eclipse update site
        • Troubleshooting
    • Running a custom installation for new or upgraded IDEs
    • After you install
      • Installing the Distributed Analysis package
      • Unattended installation on Windows
      • Testing your installation
      • Troubleshooting your installation
      • What to communicate to the team
    • Uninstalling Klocwork
  • Administer and Deploy
    • Klocwork Administration
      • Managing the Klocwork Servers
      • Moving or creating additional projects root directories
        • Moving a projects_root directory
        • Creating an additional projects_root directory
        • Licensing with multiple projects_root directories
        • Example: Setting up multiple projects_root directories
        • Special steps for Windows
        • What's next?
      • Cross-version support for builds
      • Viewing and changing Klocwork server settings
      • Optimizing server performance
      • Server log files
      • Licensing
        • Get a license
        • Changing the vendor daemon port in your license file
        • How licensing works
          • Concurrent licenses
        • Reserving licenses
        • Finding out how many licenses are in use
        • Switching the licensing debug log to reduce file size
        • Releasing stuck licenses
        • Resolving conflicts with other tools that use FlexNet Publisher licensing
        • Using your organization's FlexNet Publisher server
        • Setting up redundant license servers
      • Security and permissions
        • Setting up access control
          • Setting up single sign-on
          • Setting up LDAP access control
          • Setting up NIS access control
          • Setting up Basic access control
          • Authentication using the ltoken
        • Enabling access to Klocwork projects
        • Using a secure Klocwork Server connection
        • Setting a password for the Klocwork database
        • Permissions for Klocwork administrators and build engineers
        • Permissions for users
      • Integrating bug tracking with Klocwork Static Code Analysis
        • Creating the python script
        • Displaying links and comments from the bug tracker
      • Improving database performance
      • Backing up Klocwork data
      • Klocwork support for non-ASCII encoding
      • Configuring email notifications
      • Configuration files you can edit
    • Deployment
      • Deployment questions
      • Deployment Phase I - Deployment decisions
      • Deployment Phase I worksheet
      • Deployment Phase II - Implementation steps
      • Deployment Phase II worksheet
      • Deployment Phase III - Expanding Klocwork usage
      • Deployment Phase III worksheet
  • Checkers
    • C and C++ checker reference
      • Attempt to use Memory after Free
        • CL.FFM.ASSIGN
        • CL.FFM.COPY
        • CL.SELF-ASSIGN
        • CL.SHALLOW.ASSIGN
        • CL.SHALLOW.COPY
        • LOCRET.ARG
        • LOCRET.GLOB
        • LOCRET.RET
        • UFM.DEREF.MIGHT
        • UFM.DEREF.MUST
        • UFM.FFM.MIGHT
        • UFM.FFM.MUST
        • UFM.RETURN.MIGHT
        • UFM.RETURN.MUST
        • UFM.USE.MIGHT
        • UFM.USE.MUST
      • Banned recommended APIs
        • SV.BANNED.RECOMMENDED.ALLOCA
        • SV.BANNED.RECOMMENDED.NUMERIC
        • SV.BANNED.RECOMMENDED.OEM
        • SV.BANNED.RECOMMENDED.PATH
        • SV.BANNED.RECOMMENDED.SCANF
        • SV.BANNED.RECOMMENDED.SPRINTF
        • SV.BANNED.RECOMMENDED.STRLEN
        • SV.BANNED.RECOMMENDED.TOKEN
        • SV.BANNED.RECOMMENDED.WINDOW
      • Banned required APIs
        • SV.BANNED.REQUIRED.CONCAT
        • SV.BANNED.REQUIRED.COPY
        • SV.BANNED.REQUIRED.GETS
        • SV.BANNED.REQUIRED.ISBAD
        • SV.BANNED.REQUIRED.SPRINTF
      • Buffer overflow
        • ABV.ANY_SIZE_ARRAY
        • ABV.GENERAL
        • ABV.ITERATOR
        • ABV.MEMBER
        • ABV.STACK
        • ABV.TAINTED
        • ABV.UNICODE.BOUND_MAP
        • ABV.UNICODE.FAILED_MAP
        • ABV.UNICODE.NNTS_MAP
        • ABV.UNICODE.SELF_MAP
        • ABV.UNKNOWN_SIZE
        • NNTS.MIGHT
        • NNTS.MUST
        • NNTS.TAINTED
        • RABV.CHECK
        • RN.INDEX
        • SV.FMT_STR.BAD_SCAN_FORMAT
        • SV.STRBO.BOUND_COPY.OVERFLOW
        • SV.STRBO.BOUND_COPY.UNTERM
        • SV.STRBO.BOUND_SPRINTF
        • SV.STRBO.UNBOUND_COPY
        • SV.STRBO.UNBOUND_SPRINTF
        • SV.UNBOUND_STRING_INPUT.CIN
        • SV.UNBOUND_STRING_INPUT.FUNC
      • C/C++ Warnings
        • CWARN.ALIGNMENT
        • CWARN.BITOP.SIZE
        • CWARN.COPY.NOASSIGN
        • CWARN.DTOR.NONVIRT.DELETE
        • CWARN.DTOR.NONVIRT.NOTEMPTY
        • CWARN.INCL.ABSOLUTE
        • CWARN.INCL.NO_INTERFACE
        • CWARN.MEM.NONPOD
        • CWARN.MEMBER.INIT.ORDER
        • CWARN.NOEFFECT.OUTOFRANGE
        • CWARN.NOEFFECT.SELF_ASSIGN
        • CWARN.NOEFFECT.UCMP.GE.MACRO
        • CWARN.NOEFFECT.UCMP.GE
        • CWARN.NOEFFECT.UCMP.LT.MACRO
        • CWARN.NOEFFECT.UCMP.LT
        • CWARN.NULLCHECK.FUNCNAME
        • CWARN.OVERRIDE.CONST
        • CWARN.PASSBYVALUE.ARG
        • CWARN.PASSBYVALUE.EXC
      • COM defects
        • BSTR.CAST.C
        • BSTR.CAST.CPP
        • BSTR.FUNC.ALLOC
        • BSTR.FUNC.FREE
        • BSTR.FUNC.LEN
        • BSTR.FUNC.REALLOC
        • BSTR.IA.ASSIGN
        • BSTR.IA.INIT
        • BSTR.OPS.ARITHM
        • BSTR.OPS.COMP
        • BSTR.OPS.EQS
      • Calculated values never used
        • VA_UNUSED.GEN
        • VA_UNUSED.INIT
      • Concurrency
        • CONC.DL
        • CONC.NO_UNLOCK
        • CONC.SLEEP
      • DNS spoofing
        • SV.BFC.USING_STRUCT
        • SV.USAGERULES.SPOOFING
      • Hard-coded credentials
        • HCC
        • HCC.PWD
        • HCC.USER
      • Ignored return values
        • SV.RVT.RETVAL_NOTTESTED
      • Improper memory deallocation
        • CL.FMM
        • FMM.MIGHT
        • FMM.MUST
        • FNH.MIGHT
        • FNH.MUST
        • FUM.GEN.MIGHT
        • FUM.GEN.MUST
      • Inappropriate iterator usage
        • ITER.CONTAINER.MODIFIED
        • ITER.END.DEREF.MIGHT
        • ITER.END.DEREF.MUST
        • ITER.INAPPROPRIATE.MULTIPLE
        • ITER.INAPPROPRIATE
      • Invalid Arithmetic Operations
        • DBZ.CONST
        • DBZ.CONST.CALL
        • DBZ.GENERAL
        • DBZ.ITERATOR
      • Localized string
        • LS.CALL
        • LS.CALL.STRING
      • Lowest possible privilege
        • SV.LPP.CONST
        • SV.LPP.VAR
        • SV.SIP.CONST
        • SV.SIP.VAR
      • Memory leaks
        • CL.MLK.VIRTUAL
        • CL.MLK.ASSIGN
        • CL.MLK
        • FREE.INCONSISTENT
        • MLK.MIGHT
        • MLK.MUST
        • MLK.RET.MIGHT
        • MLK.RET.MUST
      • Mismatched return types
        • CL.ASSIGN.NON_CONST_ARG
        • CL.ASSIGN.RETURN_CONST
        • CL.ASSIGN.VOID
        • FUNCRET.GEN
        • FUNCRET.IMPLICIT
        • RETVOID.GEN
        • RETVOID.IMPLICIT
        • VOIDRET
      • Null pointer dereference
        • NPD.CHECK.CALL.MIGHT
        • NPD.CHECK.CALL.MUST
        • NPD.CHECK.MIGHT
        • NPD.CHECK.MUST
        • NPD.CONST.CALL
        • NPD.CONST.DEREF
        • NPD.FUNC.CALL.MIGHT
        • NPD.FUNC.CALL.MUST
        • NPD.FUNC.MIGHT
        • NPD.FUNC.MUST
        • NPD.GEN.CALL.MIGHT
        • NPD.GEN.CALL.MUST
        • NPD.GEN.MIGHT
        • NPD.GEN.MUST
        • RNPD.CALL
        • RNPD.DEREF
      • Parse warning defects
        • CWARN.BAD.PTR.ARITH
        • CWARN.BOOLOP.INC
        • CWARN.CAST.VIRTUAL_INHERITANCE
        • CWARN.CMPCHR.EOF
        • CWARN.CONSTCOND.DO
        • CWARN.CONSTCOND.IF
        • CWARN.CONSTCOND.SWITCH
        • CWARN.CONSTCOND.TERNARY
        • CWARN.CONSTCOND.WHILE
        • CWARN.EMPTY.LABEL
        • CWARN.EMPTY.TYPEDEF
        • CWARN.FUNCADDR
        • CWARN.HIDDEN.PARAM
        • CWARN.IMPLICITINT
        • CWARN.INLINE.NONFUNC
        • CWARN.MEMSET.SIZEOF.PTR
        • CWARN.PACKED.TYPEDEF
        • CWARN.RET.MAIN
        • CWARN.SIGNEDBIT
      • Pipe hijacking
        • SV.PIPE.CONST
        • SV.PIPE.VAR
      • Porting issues
        • PORTING.BITFIELDS
        • PORTING.BSWAP.MACRO
        • PORTING.BYTEORDER.SIZE
        • PORTING.CAST.FLTPNT
        • PORTING.CAST.PTR.FLTPNT
        • PORTING.CAST.PTR.SIZE
        • PORTING.CAST.PTR
        • PORTING.CAST.SIZE
        • PORTING.CMPSPEC.EFFECTS.ASSIGNMENT
        • PORTING.CMPSPEC.TYPE.BOOL
        • PORTING.CMPSPEC.TYPE.LONGLONG
        • PORTING.MACRO.NUMTYPE
        • PORTING.OPTS
        • PORTING.PRAGMA.ALIGN
        • PORTING.PRAGMA.PACK
        • PORTING.SIGNED.CHAR
        • PORTING.STORAGE.STRUCT
        • PORTING.STRUCT.BOOL
        • PORTING.UNIONS
        • PORTING.UNSIGNEDCHAR.OVERFLOW.FALSE
        • PORTING.UNSIGNEDCHAR.OVERFLOW.TRUE
        • PORTING.UNSIGNEDCHAR.RELOP
        • PORTING.VAR.EFFECTS
      • Possible DLL hijacks
        • SV.DLLPRELOAD.NONABSOLUTE.DLL
        • SV.DLLPRELOAD.NONABSOLUTE.EXE
        • SV.DLLPRELOAD.SEARCHPATH
      • Print functions format
        • SV.FMT_STR.PRINT_FORMAT_MISMATCH.BAD
        • SV.FMT_STR.PRINT_FORMAT_MISMATCH.UNDESIRED
        • SV.FMT_STR.PRINT_IMPROP_LENGTH
        • SV.FMT_STR.PRINT_PARAMS_WRONGNUM.FEW
        • SV.FMT_STR.PRINT_PARAMS_WRONGNUM.MANY
        • SV.FMT_STR.UNKWN_FORMAT
      • Registry manipulation
        • SV.BRM.HKEY_LOCAL_MACHINE
      • Resource handling issues
        • RH.LEAK
        • SV.INCORRECT_RESOURCE_HANDLING.URH
        • SV.INCORRECT_RESOURCE_HANDLING.WRONG_STATUS
      • Scan functions format
        • SV.FMT_STR.SCAN_FORMAT_MISMATCH.BAD
        • SV.FMT_STR.SCAN_FORMAT_MISMATCH.UNDESIRED
        • SV.FMT_STR.SCAN_IMPROP_LENGTH
        • SV.FMT_STR.SCAN_PARAMS_WRONGNUM.FEW
        • SV.FMT_STR.SCAN_PARAMS_WRONGNUM.MANY
        • SV.FMT_STR.UNKWN_FORMAT.SCAN
      • Speculative execution issues
        • SPECTRE.VARIANT1
      • Strong type checkers
        • STRONG.TYPE.ASSIGN
        • STRONG.TYPE.ASSIGN.ARG
        • STRONG.TYPE.ASSIGN.CONST
        • STRONG.TYPE.ASSIGN.INIT
        • STRONG.TYPE.ASSIGN.RETURN
        • STRONG.TYPE.ASSIGN.ZERO
        • STRONG.TYPE.EXTRACT
        • STRONG.TYPE.JOIN.CMP
        • STRONG.TYPE.JOIN.CONST
        • STRONG.TYPE.JOIN.EQ
        • STRONG.TYPE.JOIN.OTHER
        • STRONG.TYPE.JOIN.ZERO
      • Suspicious code practices
        • ASSIGCOND.CALL
        • ASSIGCOND.GEN
        • BYTEORDER.HTON.SEND
        • BYTEORDER.HTON.WRITE
        • BYTEORDER.NTOH.READ
        • BYTEORDER.NTOH.RECV
        • EFFECT
        • INCONSISTENT.LABEL
        • INCORRECT.ALLOC_SIZE
        • LA_UNUSED
        • NUM.OVERFLOW
        • PRECISION.LOSS.CALL
        • PRECISION.LOSS
        • SEMICOL
        • SV.CODE_INJECTION.SHELL_EXEC
        • SV.FIU.PROCESS_VARIANTS
        • SV.FMTSTR.GENERIC
        • SV.TOCTOU.FILE_ACCESS
        • SV.USAGERULES.PERMISSIONS
        • SV.USAGERULES.PROCESS_VARIANTS
        • UNUSED.FUNC.WARN
      • Unnecessary or missing includes
        • HA.DUPLICATE
        • HA.OPTIMIZE
        • HA.UNUSED
      • Unreachable code
        • INFINITE_LOOP.GLOBAL
        • INFINITE_LOOP.LOCAL
        • INFINITE_LOOP.MACRO
        • INVARIANT_CONDITION.GEN
        • INVARIANT_CONDITION.UNREACH
        • UNREACH.GEN
        • UNREACH.SIZEOF
        • UNUSED.FUNC.GEN
        • UNREACH.RETURN
      • Unused local variables
        • LV_UNUSED.GEN
      • Unvalidated user input
        • SV.STR_PAR.UNDESIRED_STRING_PARAMETER
        • SV.TAINTED.ALLOC_SIZE
        • SV.TAINTED.BINOP
        • SV.TAINTED.CALL.BINOP
        • SV.TAINTED.CALL.DEREF
        • SV.TAINTED.CALL.INDEX_ACCESS
        • SV.TAINTED.CALL.LOOP_BOUND
        • SV.TAINTED.DEREF
        • SV.TAINTED.FMTSTR
        • SV.TAINTED.INDEX_ACCESS
        • SV.TAINTED.INJECTION
        • SV.TAINTED.LOOP_BOUND
        • SV.TAINTED.PATH_TRAVERSAL
        • SV.TAINTED.SECURITY_DECISION
      • Use of uninitialized data
        • UNINIT.CTOR.MIGHT
        • UNINIT.CTOR.MUST
        • UNINIT.HEAP.MIGHT
        • UNINIT.HEAP.MUST
        • UNINIT.STACK.ARRAY.MIGHT
        • UNINIT.STACK.ARRAY.MUST
        • UNINIT.STACK.ARRAY.PARTIAL.MUST
        • UNINIT.STACK.MIGHT
        • UNINIT.STACK.MUST
      • Weak encryption
        • RCA
        • RCA.HASH.SALT.EMPTY
        • SV.PCC.CONST
        • SV.PCC.INVALID_TEMP_PATH
        • SV.PCC.MISSING_TEMP_CALLS.MUST
        • SV.PCC.MISSING_TEMP_FILENAME
        • SV.PCC.MODIFIED_BEFORE_CREATE
        • SV.WEAK_CRYPTO.WEAK_HASH
    • C# checker reference
      • CS.ASSIGN.SELF
      • CS.CMP.VAL.NULL
      • CS.CONSTCOND.DO
      • CS.CONSTCOND.IF
      • CS.CONSTCOND.SWITCH
      • CS.CONSTCOND.TERNARY
      • CS.CONSTCOND.WHILE
      • CS.CTOR.VIRTUAL
      • CS.EMPTY.CATCH
      • CS.FLOAT.EQCHECK
      • CS.FRACTION.LOSS
      • CS.HIDDEN.MEMBER.LOCAL.CLASS
      • CS.HIDDEN.MEMBER.LOCAL.STRUCT
      • CS.HIDDEN.MEMBER.PARAM.CLASS
      • CS.HIDDEN.MEMBER.PARAM.STRUCT
      • CS.IFACE.EMPTY
      • CS.LOOP.STR.CONCAT
      • CS.NPS
      • CS.NRE.CHECK.CALL.MIGHT
      • CS.NRE.CHECK.CALL.MUST
      • CS.NRE.CHECK.MIGHT
      • CS.NRE.CHECK.MUST
      • CS.NRE.CONST.CALL
      • CS.NRE.CONST.DEREF
      • CS.NRE.FUNC.CALL.MIGHT
      • CS.NRE.FUNC.CALL.MUST
      • CS.NRE.FUNC.MIGHT
      • CS.NRE.FUNC.MUST
      • CS.NRE.GEN.CALL.MIGHT
      • CS.NRE.GEN.CALL.MUST
      • CS.NRE.GEN.MIGHT
      • CS.NRE.GEN.MUST
      • CS.OVRD.EQUALS
      • CS.RCA
      • CS.RLK
      • CS.RNRE
      • CS.SQL.INJECT.LOCAL
      • CS.UNCHECKED.CAST
      • CS.UNCHECKED.LOOPITER.CAST
      • CS.WRONG.CAST
      • CS.WRONG.CAST.MIGHT
      • CS.WRONGSIG.CMPTO
      • CS.WRONGUSE.REFEQ
    • Java checker reference
      • ANDROID.LIFECYCLE.SV.FRAGMENTINJ
      • ANDROID.LIFECYCLE.SV.GETEXTRA
      • ANDROID.NPE
      • ANDROID.RLK.MEDIAPLAYER
      • ANDROID.RLK.MEDIARECORDER
      • ANDROID.RLK.SQLCON
      • ANDROID.RLK.SQLOBJ
      • ANDROID.UF.BITMAP
      • ANDROID.UF.CAMERA
      • ANDROID.UF.MEDIAPLAYER
      • ANDROID.UF.MEDIARECORDER
      • CMP.CLASS
      • CMPF.FLOAT
      • CMP.OBJ
      • CMP.STR
      • COV.CMP
      • ECC.EMPTY
      • EHC.EQ
      • EHC.HASH
      • ESCMP.EMPTYSTR
      • EXC.BROADTHROWS
      • FIN.EMPTY
      • FIN.NOSUPER
      • FSC.PRT
      • FSC.PRV
      • FSC.PUB
      • JD.BITCMP
      • JD.BITMASK
      • JD.BITR
      • JD.CALL.WRONGSTATIC
      • JD.CAST.COL
      • JD.CAST.KEY
      • JD.CAST.SUSP
      • JD.CAST.UPCAST
      • JD.CATCH
      • JD.CONCUR
      • JD.EQ.ARR
      • JD.EQ.UTA
      • JD.EQ.UTC
      • JD.FINRET
      • JD.IFBAD
      • JD.IFEMPTY
      • JD.INF.AREC
      • JD.INST.TRUE
      • JD.LIST.ADD
      • JD.LOCK
      • JD.LOCK.NOTIFY
      • JD.LOCK.SLEEP
      • JD.LOCK.WAIT
      • JD.METHOD.CBS
      • JD.NEXT
      • JD.OVER
      • JD.RC.EXPR.CHECK
      • JD.RC.EXPR.DEAD
      • JD.ST.POS
      • JD.SYNC.DCL
      • JD.SYNC.IN
      • JD.THREAD.RUN
      • JD.UMC.FINALIZE
      • JD.UMC.RUNFIN
      • JD.UMC.WAIT
      • JD.UNCAUGHT
      • JD.UN.MET
      • JD.UNMOD
      • JD.UN.PMET
      • JD.VNU
      • JD.VNU.NULL
      • MNA.CAP
      • MNA.CNS
      • MNA.SUS
      • NPE.COND
      • NPE.CONST
      • NPE.RET
      • NPE.RET.UTIL
      • NPE.STAT
      • REDUN.DEF
      • REDUN.EQ
      • REDUN.EQNULL
      • REDUN.FINAL
      • REDUN.NULL
      • REDUN.OP
      • RI.IGNOREDCALL
      • RI.IGNOREDNEW
      • RLK.AWT
      • RLK.FIELD
      • RLK.HIBERNATE
      • RLK.IMAGEIO
      • RLK.IN
      • RLK.JNDI
      • RLK.MAIL
      • RLK.MICRO
      • RLK.NIO
      • RLK.OUT
      • RLK.SOCK
      • RLK.SQLCON
      • RLK.SQLOBJ
      • RLK.SWT
      • RLK.ZIP
      • RNU.THIS
      • RR.IGNORED
      • RTC.CALL
      • STRCON.LOOP
      • SV.CLASSDEF.INJ
      • SV.CLASSLOADER.INJ
      • SV.CLEXT.CLLOADER
      • SV.CLEXT.POLICY
      • SV.CLLOADER
      • SV.CLONE.SUP
      • SV.CSRF.GET
      • SV.CSRF.ORIGIN
      • SV.CSRF.TOKEN
      • SV.DATA.BOUND
      • SV.DATA.DB
      • SV.DOS.ARRINDEX
      • SV.DOS.ARRSIZE
      • SV.DOS.TMPFILEDEL
      • SV.DOS.TMPFILEEXIT
      • SV.ECV
      • SV.EMAIL
      • SV.EXEC
      • SV.EXEC.DIR
      • SV.EXEC.ENV
      • SV.EXEC.LOCAL
      • SV.EXPOSE.FIELD
      • SV.EXPOSE.FIN
      • SV.EXPOSE.IFIELD
      • SV.EXPOSE.MUTABLEFIELD
      • SV.EXPOSE.RET
      • SV.EXPOSE.STORE
      • SV.HASH.NO_SALT
      • SV.HTTP_SPLIT
      • SV.IL.DEV
      • SV.IL.FILE
      • SV.INT_OVF
      • SV.LDAP
      • SV.LOG_FORGING
      • SV.PASSWD.HC
      • SV.PASSWD.HC.EMPTY
      • SV.PASSWD.PLAIN
      • SV.PATH
      • SV.PATH.INJ
      • SV.RANDOM
      • SV.SCRIPT
      • SV.SENSITIVE.DATA
      • SV.SENSITIVE.OBJ
      • SV.SERIAL.INON
      • SV.SERIAL.NON
      • SV.SERIAL.NOREAD
      • SV.SERIAL.NOWRITE
      • SV.SERIAL.SIG
      • SV.SHARED.VAR
      • SV.SOCKETS
      • SV.SQL
      • SV.SQL.DBSOURCE
      • SV.STRBUF.CLEAN
      • SV.STRUTS.NOTRESET
      • SV.STRUTS.NOTVALID
      • SV.STRUTS.PRIVATE
      • SV.STRUTS.RESETMET
      • SV.STRUTS.STATIC
      • SV.STRUTS.VALIDMET
      • SV.TAINT
      • SV.TAINT_NATIVE
      • SV.TMPFILE
      • SV.UMC.EXIT
      • SV.UMC.JDBC
      • SV.UMC.THREADS
      • SV.UMD.MAIN
      • SV.USE.POLICY
      • SV.WEAK.CRYPT
      • SV.XPATH
      • SV.XSS.DB
      • SV.XSS.REF
      • SYNCH.NESTED
      • SYNCH.NESTEDS
      • UC.BOOLB
      • UC.BOOLS
      • UC.STRS
      • UC.STRV
      • UF.IMAGEIO
      • UF.IN
      • UF.JNDI
      • UF.MAIL
      • UF.MICRO
      • UF.NIO
      • UF.OUT
      • UF.SOCK
      • UF.SQLCON
      • UF.SQLOBJ
      • UF.ZIP
      • UMC.EXIT
      • UMC.GC
      • UMC.SYSERR
      • UMC.SYSOUT
      • UMC.TOSTRING
      • Conventions used in reported Java issue messages
    • MISRA-C 2012 with Amendment 1 checker reference
    • MISRA-C 2012 checker reference
    • MISRA-C++ 2008 checker reference
    • MISRA-C 2004 checker reference
    • Coding standards mapped to Klocwork checkers
      • 2010 CWE-SANS Top 25 Most Dangerous Software Errors mapped to Klocwork checkers
      • 2011 CWE-SANS Top 25 Most Dangerous Software Errors mapped to Klocwork checkers
      • Java coding standards
        • CWE IDs mapped to Klocwork Java checkers
        • DISA STIG version 3 IDs mapped to Klocwork Java checkers
        • DISA STIG version 4 IDs mapped to Klocwork Java checkers
        • Klocwork Quality Standard mapped to Klocwork Java checkers
        • OWASP Top 10 Security Risks for 2013 mapped to Klocwork Java checkers
      • C/C++ coding standards
        • AUTOSAR 17-10 Standard mapped to Klocwork C/C++ checkers
        • AUTOSAR 18-03 Standard mapped to Klocwork C/C++ checkers
        • CERT C and C++ Secure Coding Standard IDs mapped to Klocwork C and C++ checkers
        • CWE IDs mapped to Klocwork C and C++ checkers
        • DISA STIG version 3 IDs mapped to Klocwork C and C++ checkers
        • DISA STIG version 4 IDs mapped to Klocwork C and C++ checkers
        • Klocwork Quality Standard mapped to Klocwork C/C++ checkers
        • MISRA-C 2012 with Amendment 1 rules mapped to Klocwork checkers
        • MISRA-C 2012 rules mapped to Klocwork checkers
        • MISRA-C++ 2008 rules mapped to Klocwork checkers
        • MISRA-C 2004 rules mapped to Klocwork checkers
        • NASA: Ten Rules for Safety Critical Coding mapped to Klocwork checkers
      • C# coding standards
        • CWE IDs mapped to Klocwork C# checkers
        • Klocwork Quality Standard mapped to Klocwork C# checkers
    • Writing and deploying new checkers
      • Writing custom C/C++ checkers
        • Which type of checker to create: KAST or Path?
        • Important changes to the Path API in version 11.2
        • Important changes to the KAST API in version 10.0
        • C/C++ KAST checkers
          • Creating C/C++ KAST checkers
          • C/C++ KAST syntax reference
          • C/C++ KAST examples
          • Tutorial 1 - Creating a C/C++ KAST checker
          • Tutorial 2 - Creating a C/C++ KAST checker with built-in functions
          • Tutorial 3 - Creating a C/C++ KAST checker with custom functions
          • Creating and testing C/C++ KAST custom functions
            • Understanding the workflow
            • Example 1: 'Hello world'
            • Example 2: Modifying error messages
            • Example 3: Listing classes and members
            • Example 4: Accessing inheritance information
            • Example 5: Traversing the AST tree
            • Example 6: Emulating simple KAST expressions in a custom function
            • Example 7: Using node traversal in a custom function
            • Example 8: Designing a 'descendent::' search
        • Creating C/C++ Path checkers
      • Writing custom C# checkers
        • Tutorial - Creating a C# KAST checker
        • Creating C# KAST checkers
      • Writing custom Java checkers
        • Java KAST checkers
          • Creating Java KAST checkers
          • Anatomy of a Java KAST checker
            • help.xml: Defining help for your checker
            • checkers.xml: Java KAST configuration
            • Testcase.java: Using a test case
            • MyFunc.java: Using custom functions
            • plugin_functions.xml: Using custom functions
          • Java KAST examples
          • Java KAST syntax reference
            • Syntax
            • Qualifiers
            • Conditions
            • Variables
            • Other extensions
            • Built-in functions
            • Java custom functions
            • Checker performance
          • Java KAST workflow diagram
          • Tutorial - Creating a Java KAST checker
        • Java Path checkers
          • Anatomy of a Java Path checker
            • Knowledge base entries
            • checkers.xml: Defining the category, severity, and error message
            • help.xml: Defining help for your checker
          • Java knowledge base reference
          • Creating Java Path checkers
            • Types of Java Path checkers
            • Java Path checker creation process
          • Java Path workflow diagram
          • Tutorial - Creating a Java Path checker
      • Deploying custom checkers
        • Deploying the checker package to the Server and build machines
        • Deploying the checker package to your desktop
        • Uninstalling checkers from the Server and build machines
        • Uninstalling checkers from your desktop
  • Configure
    • Build configuration
      • Continuous integration and Klocwork analysis
        • Installing and configuring Klocwork for the TeamCity plugin
          • TeamCity quick start guide
        • Installing Klocwork for the Jenkins plugin
          • Jenkins quick start
        • Installing and integrating Klocwork CI for the command-line
        • CI Licensing
        • Importing your build tables for use with Continuous Integration
      • Alternate build integration methods for Visual Studio C/C++ projects
      • Build properties displayed by kwadmin
      • Tuning C/C++ analysis
        • C/C++ knowledge base reference
      • Tuning Java analysis
        • Creating a JKB file
        • Editing a JKB file
        • Tuning Java analysis through knowledge bases
        • Tuning Java analysis in Eclipse
          • Create a Java Knowledge Base file in Eclipse
          • Example: Tuning in Eclipse
        • Tuning Java analysis in IntelliJ IDEA
          • Walk-through: Handling an NPE.RET false positive
          • Troubleshooting JKB annotation errors
        • Tutorials - Tuning Java analysis
          • Java tuning tutorials 1 and 2 - Tuning SV.XSS.REF to reduce false positives
          • Java tuning tutorial 3 - Tuning NPE.RET to reduce false positives
          • Java tuning tutorial 4 - Tuning NPE.RET to detect additional issues (Advanced)
      • Adding an unsupported C/C++ compiler
    • Project configuration
      • Configuring checkers for the integration build analysis
        • Opening the Configuration Editor in Klocwork Static Code Analysis
        • Configuring taxonomies and categories
        • Configuring industry-specific coding standards and checkers
        • Opening the standalone Configuration Editor
        • Applying a global checker configuration to all new projects
        • Copying the checker configuration to an existing project
        • When do your changes take effect?
        • Installing the MISRA checkers
        • Tutorial - Creating a taxonomy and viewing the results
      • Changing the thresholds for reported metrics
      • Setup integration project C-sharp flowchart
      • Setup integration project C/C++ flowchart
      • Setup integration project Java flowchart
      • Reference for integration project and build properties
      • Localization details
      • Import your projects and server settings
  • Analyze
    • Creating a build specification
      • Desktop analysis
      • Build specification file format
        • Format of the build specification file for C/C++ projects
        • Format of the build specification file for Java projects
        • Format of the build specification file for .jsp files
        • Format of the build specification file for C# projects
      • Creating a C/C++ build specification
      • Creating a Java build specification
      • Creating a C-sharp build specification
      • Analyzing mixed C/C++ and C-sharp projects
      • Using kwwrap plus kwinject to generate a build specification
      • Using a build trace to troubleshoot build specification problems
        • Troubleshooting an incomplete kwinject build specification
        • Build trace file format
          • Example
        • Compiler mapping file format (kwfilter.conf)
          • Filter binding lines
          • Attach and detach keywords (Windows only)
          • Deploying kwfilter.conf
    • Running the C and C++ integration build analysis
      • Running your first integration build analysis
      • Running your next integration build analysis
      • What's next?
      • C/C++ integration build analysis - Cheat sheet
    • Running the Java integration build analysis
      • Running your first integration build analysis
      • Running your next integration build analysis
      • What's next?
      • Java integration build analysis - Cheat sheet
    • Running the C-sharp integration build analysis
      • Running your first integration build analysis
      • Running your next integration build analysis
      • What's next?
      • C-sharp integration build analysis - Cheat sheet
    • Running a distributed Klocwork C/C++ analysis
      • How distributed analysis works
      • Running a distributed analysis
    • Tracking issues by owner
    • Managing project branches
      • Synchronizing status changes and comments across projects
      • Matching issues across projects
    • Speeding up the analysis
      • Running Klocwork in an IncrediBuild environment
    • Integrating Klocwork with Electric Cloud
      • Deployment considerations
      • Generate a build specification for Electric Cloud
      • Run a distributed Klocwork analysis in Electric Cloud
    • Replacing the path to your source files
    • Viewing integration build log files
    • C/C++ Path Analysis errors in build log
  • Desktop Analysis Tools
    • Using Klocwork Desktop
      • Klocwork Desktop for C/C++ project setup overview
      • Detect issues while you code
      • Filtering issues on the desktop
      • Providing a build specification template for your developers
        • Example: Creating and using a build specification template
        • Creating a build specification template for C/C++ projects
        • Creating a build specification template for Java projects
        • Using a build specification template with kwcheck
        • Using a build specification template with kwbuildproject
    • Klocwork Refactoring
      • Using Klocwork Refactoring in your coding environment
      • Header Analysis
      • Header analysis in Visual Studio
      • Removing unused functions in Visual Studio
      • Refactoring shortcuts in Visual Studio
      • Header analysis in Eclipse
      • Refactoring shortcuts in Eclipse
      • Klocwork Refactoring in Vim
    • Getting started with Klocwork Desktop Plug-in for Visual Studio
      • Tips and tricks for Klocwork Desktop Plug-in for Visual Studio
        • Locate system issues - Visual Studio addin
      • Visual Studio dialogs
        • Authentication dialog in Visual Studio
        • General Options dialog
          • Analysis and Appearance tabs
          • Data tab
          • Logging tab
        • Klocwork Solution Properties dialog in Visual Studio
    • Getting started with the Klocwork Desktop C/C++ plugin for Eclipse
    • Getting started with Klocwork Desktop Java Plug-in for Eclipse
    • Tips and tricks for Klocwork Desktop Plug-in for Eclipse
      • Customize the analysis
    • Getting started with Klocwork Desktop Java Plug-in for IntelliJ IDEA
      • Tips and tricks for Klocwork Desktop Java Plug-in for IntelliJ IDEA
    • Configure build specification variables - Klocwork Desktop
    • Connected desktop and synchronization
      • How connected desktop works
    • Customizing your desktop analysis
    • Klocwork Desktop command line
      • Getting started with kwcheck for C/C++
      • Getting started with kwcheck for Java
    • Klocwork Desktop GUI
      • Getting started with Klocwork Desktop for Java
      • Getting started with Klocwork Desktop for C/C++
      • Getting started with Klocwork Desktop in remote mode
        • Before you begin
        • Create a remote configuration file
          • Remote configuration file format
          • Format of the configuration file using port forwarding
        • Open the remote project
        • Investigate issues
        • Fix defects and ignore the rest
        • Monitor new issues
        • Troubleshooting
      • Tips and tricks for Klocwork Desktop
        • Start and connect to your remote project in one step
        • Locate system issues
    • Integrating Klocwork with Wind River Workbench
    • Capturing your build settings for QNX Momentics
  • Measure and Manage
    • Accessing Klocwork Static Code Analysis
    • Reporting and metrics
      • Getting started with reports in Klocwork Static Code Analysis
        • Viewing reports
        • Filtering reports
        • Available fields
        • Creating a report
        • Report types
        • Editing reports
        • Sharing reports
        • What's next?
      • Advanced reporting for the integration build
        • Adding external documents to Klocwork Static Code Analysis
      • About Builds/Dates
      • The reporting timeline
      • Default reports in Klocwork Static Code Analysis
      • Customizing metrics reports in Klocwork Static Code Analysis
        • The metrics.xml file
        • Simple walk-through: Customizing the default Size and Complexity reports
        • Walk-through: Adding custom reports based on Klocwork metrics
        • Adding custom reports based on metrics you define
        • Supported entity types
    • Searching in Klocwork Static Code Analysis
    • Comparing two builds in Klocwork Static Code Analysis
    • Investigating and citing issues in the integration build
      • Viewing a list of issues in your integration build
      • Handling a long list of issues
      • Using SmartRank to prioritize issues
      • Investigating issues
      • Reporting false positives
      • Changing an issue's status to show how it should be handled
      • Assigning ownership
      • Viewing the history of an issue
      • Getting email notification of new issues
      • What's next?
    • How issues are mapped between versions and builds
    • Source Cross-Referencing
      • Searching in source cross-reference
      • Accessing the issue list for a selected entity
      • Using annotations
      • Viewing source code
      • Using the source viewer in Klocwork Static Code Analysis
    • Managing integration projects and builds
    • Managing configuration files for integration projects
    • Customizing your view of the integration build analysis
      • All about views
      • The default view
      • Public and shared views
      • Supported keywords
      • Tutorial 1: Creating a view for a group of developers
      • Tutorial 2: Excluding issues in test code from view
      • Organizing your code into modules
    • Tracking projects with the Cross-Project Report
  • Code Review
    • What is Klocwork Code Review?
    • Code Review administration guide
      • Configuring permission policies
      • Import code reviews from an existing Code Review Server
      • Configuring live links in Klocwork reviews
      • Cleaning up stalled code reviews
    • Working with Klocwork Code Review
      • Submitting your review
        • Setting up a pre-checkin code review
          • Pre-checkin code review: administrator setup
          • Creating a code review from your IDE
          • Creating a code review on the command line
          • Viewing a diff of your file in Visual Studio
          • Changing your Klocwork Server settings
          • Configuring your SCM
          • Fixing and re-submitting your code review
        • Setting up a post-checkin code review
          • Integrating a project with your SCM
          • Creating a code review on the command line
          • Loading new revisions from your SCM
      • Hanging out in Code Review
        • Your feed page
          • Getting notified of changes
        • Searching in Code Review
          • Using Keywords to filter search results
      • Creating reports in Code Review
        • Creating a new report
        • Editing reports
        • Accessing reports in Code Review
        • Filtering your reports
        • Pre-defined reports in Code Review
      • Participating in code reviews
        • As a committer
        • As a reviewer
      • Viewing the Code Review Action and Revision Status reports
        • Getting more data from the reports
      • Viewing the User Activity report
      • Select Server Project dialog in Eclipse
    • Reference
    • Troubleshooting
      • Troubleshooting code review setup
      • Can't create a new user message
      • Cannot run program git
      • Failed to create code review
      • Prompted to download a file
      • Upload failed - Unknown username error
      • No data is available for selected feed
      • Project not available when trying to set up a Klocwork feed
      • Insufficient permissions
      • Code Review encoding error
      • Can't see Klocwork issues in my code review
      • No source code management system is detected
      • Error 1723: There is a problem with this Windows installer package
      • Error occurred during SSL handshake
      • Diffs are incorrect or unavailable, and reviews appear out of order
    • Limitations for Code Review
  • Reference
    • Command Reference
      • Kwadmin
      • Kwagent
      • Kwant
      • Kwauth
      • Kwbuildproject
        • Linker options for kwbuildproject
        • Compiler options for kwbuildproject
          • Verbosity options
          • Options to control compiler and semantic analyzer behavior
          • Options to control output files and mode
          • Compatibility options
        • Kwbuildproject throws java.lang.ExceptionInInitializerError
      • Kwchangestatus
      • Kwcheck
        • Kwcheck output reference
        • Kwcheck tips and tricks
          • Adding compiler options to kwcheck
          • Connect to a different server project
          • Switch between standalone and connected desktop
          • Delete a local project
          • Enable and disable checkers
          • Change project settings
          • Override incremental analysis
          • Filter issues in the list
          • Locate and fix 'System' issues
      • Kwciagent
      • Kwcodereview
      • Kwcollect
      • kwconan
      • Kwconv
      • Kwcreatechecker
        • Example help.xml file for custom checkers
      • Kwcscollect
      • Kwcsprojparser
      • Kwdefectimport
        • Import external defects with kwdefectimport
      • Kwdeploy
      • Kwdiscover
      • Kwdist
      • Kwdistadmin
      • Kwdtagent
      • Kwecbuild
      • Kwgcheck
      • Kwgradle
      • Kwgradlew
      • Kwinject
        • How kwinject works
          • Interception
          • Filtering
          • How kwinject handles a command line from your build
          • Determining which build commands should be intercepted by Klocwork
          • Environment variables used by kwinject
          • Example: Caching temporary source files
      • Kwjava
      • Kwlogparser
      • Kwmatch
      • Kwmaven
      • Kwprojcopy
      • Kwscm
      • Kwservice
      • Kwshell
      • Kwstruct101
        • Integrating with Structure101
          • How Structure101 licensing works
      • Kwupdate
      • Kwuser
      • Kwvcprojparser
        • Kwvcprojparser message Project file is not found. Skipping
      • Kwwebappscan
      • Kwwrap
      • Kwxsync
        • Renaming a project URL in a kwxsync storage file
        • Remove a project from kwxsync storage
    • Concepts
      • Abstract syntax tree (AST)
      • Analysis profile
      • Build specification
      • Build specification template
      • Build trace
      • Code problem certainty
      • Complexity Index Metric
      • Configuration Editor
      • Continuous analysis
      • Distributed analysis
      • Entity
      • Header analysis
      • Incremental analysis
      • Integration build analysis
        • How to run the analysis
      • Issue category
      • Issue citing
      • Issue code
      • Issue grouping
      • Issue ID
      • Issue severity
      • Issue states
      • Issue statuses
      • Java knowledge base (JKB)
      • Klocwork administrator
      • Klocwork Product Portal
      • Klocwork Servers
      • Knowledge base
      • Local project directory (.kwlp)
      • McCabe Cyclomatic Complexity
      • Migration
      • MIR
      • Model (user and system)
      • Module
      • Origin (local or system)
      • Owner
      • Parallel analysis
      • Projects_root directory
      • Propagation
      • Reference (taxonomy)
      • SmartRank
      • Source ownership file (.sow)
      • Standalone desktop
      • Tables directory
      • Taxonomy
      • Taxonomy Editor
      • Traceback information
        • C/C++ traceback example in Klocwork Static Code Analysis
        • C/C++ traceback example in Eclipse
        • C/C++ traceback example in Visual Studio
      • Tuning
      • User profile
      • Using tags
      • View
      • Working sets
    • Klocwork Web API cookbook
      • Reference information
      • Formatting requests to the API
      • Understanding the API response
      • Specifying drilldown for the report action
      • Access control API examples
      • Issue and metric API examples
    • Klocwork Code Review Web API cookbook
      • Reference information
      • Formatting requests to the API
      • Using the search API
    • Metrics reference
      • File-level metrics
      • Class-level metrics
      • Function- and method-level metrics
    • Legal information
      • FOSS
      • JDOM license
      • License Agreement for Sun JIMI Software Development Kit
        • Sun Microsystems, Inc. Binary Code License Agreement
        • JIMI SDK, Version 2.0 SUPPLEMENTAL LICENSE TERMS
      • SUN license for JavaHelp
      • Third-party copyright notices
      • Voluntary Product Accessibility Template (VPAT)
  • Troubleshoot
    • General troubleshooting issues
      • Accessing your desktop build.log and parse errors.log
      • Can't change issue status on desktop
      • Cannot display the web page error when clicking some links in plug-in help
      • Cannot display the web page or Failed to Connect messages
      • Cannot run two sets of the Klocwork Servers as Windows Services
      • Error indicating that a previous version of the Klocwork user package is installed
      • Error reading setup initialization file during installation
      • Errors printed in the Output window of Checker Studio
      • Failed to connect to server due to missing PKI certificate
      • Failed to lock file or directory: No locks available
      • Import fails when importing projects with a large number of builds
      • Installation fails when path contains multibyte characters
      • Java memory problems when running Klocwork applications
      • java.util.concurrent.RejectedExecutionException
      • Klocwork clients cannot access servers after disconnecting Windows computer from network
      • Klocwork buttons or menu items grayed out in IDE plug-ins
        • Managed C++
        • Supported configuration types
        • Continuous analysis is enabled
      • Klocwork clients cannot connect to Klocwork Server
      • Kwinject error - Compiler can't be configured
      • Offline product documentation not loaded properly
      • Remote clients cannot connect
      • Remote host closed connection during handshake
      • Unable to restart Klocwork Servers
      • Unable to run MariaDB as root user
      • Unable to start Klocwork Servers following Windows installation
      • Unable to start or check the Klocwork Servers because of LDAP error
      • Unable to start the Database Server because the path to the socket file is too long
      • Unable to stop Klocwork Servers
      • We hit StackOverflowError in MySQL driver
    • Authentication issues
      • Authentication unstable when switching between 32-bit and 64-bit Java
      • Cannot use the Remember me option on a server with multiple server instances
      • LDAP server not detected
      • Simple bind failed error when trying to connect to Active Directory
    • Build issues
      • Analysis fails with exited and exception messages
      • Authentication failed message
      • Kwadmin load of build fails; portal shows status as in progress
      • kwant: ERROR: Cannot retrieve main class 'com/klocwork/kwant/KWAnt'
      • kwcsprojparser generates error(s) when folder names use special characters
      • kwgradle fails to generate a build specification
      • kwinject fails to work with processes spawned under sudo
      • Kwinject will not produce a build specification when run in a 4NT shell
      • Local build processes failing in kwinject-enabled builds
      • Message about UnsupportedClassVersionError
      • Missing temporary files cause errors during Klocwork analysis
      • SemaRuntimeExceptions when running java analysis with Android Lollipop
      • Tables fail to load when Windows Indexer or antivirus program accesses temporary MariaDB files
      • Tables fail to load when there are more than 5000 of the same defect in a file
      • Troubleshooting include errors in the integration build log
    • Custom checkers issues
      • Help for my custom C# checker doesn't display in Klocwork Desktop help
    • Database issues
      • Database connection error
      • Database loading and propagation errors
      • Database loading stage failed
      • Lost connection to MySQL server at 'XXX', system error
      • Migration error: Database server fails to start
    • Desktop synchronization troubleshooting
      • Cannot connect to server - server is not available
      • Cannot connect to server - Unable to get Klocwork Server - Incompatible client version
      • Cannot perform project synchronization - Failed to read the buildspec file - Variable is not defined
      • Cannot perform project synchronization - Failed to synchronize - No files found
      • Cannot perform project synchronization - No common files with a project on the Klocwork Server
      • Cannot perform project synchronization - No system builds exist for the project
      • Desktop and server file mapping
      • Recreate your build specification
    • Eclipse troubleshooting
      • Eclipse 3.6.0 with LDAP crashes if Reviewers field is clicked after selecting a reviewer name
      • Eclipse hangs when trying to install Klocwork plug-in on machine with no internet access
      • Eclipse plug-in requires the MSVC redistributable package
      • Eclipse update site fails when downloading from a secure server
      • Installing the Eclipse update site after upgrading Eclipse
      • Path to installation is not set - Eclipse
      • Toolbar on views does not display properly on 64-bit Ubuntu
    • IntelliJ IDEA troubleshooting
      • Cannot access issue help from IntelliJ IDEA 11.1.1 or 11.1.2
      • Cannot find Japanese version of IntelliJ IDEA plug-in
      • Cannot start analysis - the JDK is not specified for selected modules (IntelliJ IDEA)
      • Help links for detected issues don't work in IntelliJ IDEA 11.1
      • Klocwork icons may not appear on menu bars in IntelliJ IDEA 12
      • PDF links don't work in the help for IntelliJ IDEA
      • Server settings are not specified error message in IntelliJ IDEA
      • URLs to external sites don't work in the help for IntelliJ IDEA
    • Klocwork Desktop issues
      • Failed to start agent on port
      • Project name not saved when using non-default location
      • Why are my files grayed out in the Project Navigator?
      • Why can't I analyze my files or project in Klocwork Desktop?
    • Licensing issues
      • Can't connect to License Server
      • Desktop licensing problems
      • kwlef error states license is not valid
      • License Server error when shutting down host Windows machine
      • Why can't I get a license?
    • Continuous integration issues
      • Continuous integration analysis fails due to missing files
      • Java installation cannot be found in Jenkins or TeamCity CI integration
      • Error occurred during build: Authentication failed
      • Error occurred during build: License server system does not support this feature
      • No build specifications are available for Klocwork analysis
      • No output after continuous integration build
    • Static Code Analysis issues
      • Cannot edit custom folder names for reports
      • Cannot search for severities in Klocwork Static Code Analysis
      • Empty report or issue list in Klocwork Static Code Analysis
      • Internet Explorer does not list project names if Server host name contains underscore
      • No legend printed with Klocwork Static Code Analysis reports
      • Slow performance in Klocwork Static Code Analysis
      • Unable to log in to Klocwork Static Code Analysis after setting up basic access control
    • Visual Studio troubleshooting
      • Cannot access issue help with F1 in Visual Studio
      • Cannot access Klocwork Properties in Visual Studio
      • Cannot connect to the Klocwork server and host name contains multi-byte characters
      • Cannot create a file when that file already exists
      • Cannot see Klocwork windows in Visual Studio
      • Klocwork Help registration could not acquire the location of the Help Viewer
      • Kwvcprojparser message Project file is not found. Skipping
      • Package Load Failure occurs in Visual Studio after I install patch
      • This project item is not a candidate for analysis

   EN   JP   CN

Import external defects with kwdefectimport

In this topic:
  • Working with source defect files
  • Create a taxonomy
  • Create your .pconf file
  • Create a defect parser
  • Sample parser
  • Import the defects
  • Run kwdefectimport on the command line
  • Running kwdefectimport as part of an automated build

Import external defects with kwdefectimport

You can use Kwdefectimport to import a list of external defects into Klocwork. These are defects that were discovered by an external tool or process, independent of Klocwork.

You run Kwdefectimport on the command line at build time after Kwbuildproject and before kwadmin -load. When run, it uses the data in the artifacts (tables and files) that are created by kwbuildproject, then creates new problem data for kwadmin to load.



Importing external defects into Klocwork involves the following steps:

  1. Creating or obtaining a listing of defects. Depending on your implementation, this list can be any format such as a file, a stream, or a port.
  2. Creating a .pconf checker configuration file onto which the defects are mapped to checkers.
  3. Creating a defect parser that implements the interface com.klocwork.defectimport.IDefectParser to parse the defect listing file.
  4. Running kwdefectimport as part of your analysis, after kwbuildproject but before kwadmin -load.
Parent topic: Kwdefectimport

Working with source defect files

While the exact format of your defect source can vary, the data must be valid and it must contain at least the following four elements per defect:

ElementDescription
Defect codeA string representing the high-level category of the defect. In the example below, the defect code is represented by the element <ErrorId>.
File name

The absolute path and file name or a relative path and file name of the source file that contains the current defect. If you specify the --working-directory argument to kwdefectimport, the file name is considered a relative link (relative to the value specified in the argument). If you don't specify a working directory, the file name must be an absolute path.

In the example below, the file name is represented by the F attribute.

Line number

The line number (in the source file) that contains the defect.

In the example below, the file name is represented by the L attribute.

MessageOptional. The message explaining the defect. The message is displayed within Klocwork and provides context to the user.

The following listing shows a typical defect source file.

<ErrorId Id="ERR_TYP_TIMER_NOT_ACTIVE" NumberOfEntries="4">
  <Msg F="czagenmx.sdl" L="2786" S="C">timer t_wf_czg not activated in any path</Msg>
  <Msg F="czahanmx.sdl" L="5051" S="C">timer t_wf_czg_sup_ack not activated in any path</Msg>
  <Msg F="czahanmx.sdl" L="5074" S="C">timer t_wf_czg_sup_ack not activated in any path</Msg>
  <Msg F="czahanmx.sdl" L="5092" S="C">timer t_wf_czg_sup_ack not activated in any path</Msg>
</ErrorId>  
Note: The sample also contains the S attribute which represents the severity level of each defect. Since the severity level of each defect is defined in the taxonomy, this attribute can be ignored by the parser.

Create a taxonomy

Before you can import defects, you must define the defect taxonomies, categories, and defect types with which the external defects will be associated. This is done by creating a .pconf file, which is an XML file that defines the categories and severity types of the defect, and contains the error message that is displayed to the user.

The following example shows a snippet from a .pconf file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<checkers version="1.4">
    <severitytable max="10" warningStart="3" locale="en">
        <severity name="Critical" number="1"/>
         ...
    </severitytable>
    <categories name="TN SDL SDT" locale="en">
        <category name="Err.Lex.Tn">
            <error id="ERR_LEX_COM_IN_COM"/>
            <error id="ERR_LEX_LONG_ID"/>
			<error id="ERR_LEX_RESERVED"/>
        </category>  
        ...
    </categories>
    <checkergroup api="none" id="TN.DEFAULT.CHECKERGROUP" language="SDL/SDT">
        <checker id="ERR.LEX.TN">
            <error autogroupby="0" enabled="true" id="ERR_LEX_LONG_ID" severity="3">
                <title locale="en" text="ID longer than 31 characters"/>
                <title locale="ja" text="ID longer than 31 characters"/>
                <message locale="en" text="{0}"/>
                <message locale="ja" text="{0}"/>
            </error>
            <error autogroupby="0" enabled="true" id="ERR_LEX_RESERVED" severity="3">
                <title locale="en" text="ID is reserved in ANSI C"/>
                <title locale="ja" text="ID is reserved in ANSI C"/>
                <message locale="en" text="{0}"/>
                <message locale="ja" text="{0}"/>
            </error>
            <error autogroupby="0" enabled="true" id="ERR_LEX_COM_IN_COM" severity="3">
                <title locale="en" text="Missing close comment"/>
                <title locale="ja" text="Missing close comment"/>
                <message locale="en" text="{0}"/>
                <message locale="ja" text="{0}"/>
            </error>			
        </checker> 
        ...           
    </checkergroup>
</checkers>  
The .pconf file contains three child elements that you must define and configure:
ElementDescription
<severitytable>Defines the severity hierarchy.
<categories>Defines a set of checker categories, where each category contains a set of related checkers. Typically categories are used to organize checkers by function. For example, "Precision loss" or "Dangerous Type casts". These are typically user-defined.
<checkergroup>Defines a group of related checkers. For example, "builtin C# path checkers". These are typically user-defined.

Create your .pconf file

Follow the walk-through below to create and import your .pconf file.

  1. Create an XML file to contain the checker configuration information. You can start with an existing configuration file and a text editor, or you can use the Klocwork configuration editor to create your .pconf file.

    For more information about creating and modifying a taxonomy, see Configuring checkers for the integration build analysis.

  2. Add the <severitytable> element to your .pconf file. This is the first child of the root element. You can leave this section as is since the severity levels may be arbitrary depending on your workflow.
    <severitytable max="10" warningStart="3" locale="en">
      <severity name="Critical" number="1"/>
      <severity name="Error" number="2"/>
      <severity name="Warning" number="3"/>
      <severity name="Review" number="4"/>
      <severity name="Severity 5" number="5"/>
      <severity name="Severity 6" number="6"/>
      <severity name="Severity 7" number="7"/>
      <severity name="Severity 8" number="8"/>
      <severity name="Severity 9" number="9"/>
      <severity name="Severity 10" number="10"/>
    </severitytable>  
  3. Add the <categories> element to your .pconf file:
    <categories name="TN SDL SDT" locale="en">  
      <category name="Err.Sym.Tn">
        <error id="ERR_SYM_NO_TERMINATOR"/>
        <error id="ERR_SYM_EXP_UNCHANGED"/>
        <error id="ERR_SYM_ENUM_LACK_ANSWER"/>
        <error id="ERR_SYM_UNREACHABLE_STATEMENT"/>
      </category>
    </categories>   
    • The <categories> element contains <category> elements that define the actual checker categories. The name attribute of both the <categories> and <category> element and is user-defined. You should specify a name for the <category> that represents the defect types it will contain.
    • The id attribute of the <error> element is a direct mapping to the <ErrorID> specified in the external defect listing.
  4. Add the <checkergroup> element to your .pconf file:
    <checkergroup api="none" id="TN.DEFAULT.CHECKERGROUP" language="SDL/SDT">
      <checker id="ERR.LEX.TN">
       <error autogroupby="0" enabled="true" id="ERR_LEX_LONG_ID" severity="3">
         <title locale="en" text="ID longer than 31 characters"/>
         <title locale="ja" text="ID longer than 31 characters"/>
         <message locale="en" text="{0}"/>
         <message locale="ja" text="{0}"/>
       </error>
       <error autogroupby="0" enabled="true" id="ERR_LEX_RESERVED" severity="3">
         <title locale="en" text="ID is reserved in ANSI C"/>
         <title locale="ja" text="ID is reserved in ANSI C"/>
         <message locale="en" text="{0}"/>
         <message locale="ja" text="{0}"/>
        </error>
      </checker>  
    The elements in <checkergroup> are described in the tables below:
    ElementAttributes
    <checkergroup>
    api
    specify "none" to indicate that no checker should be executed.
    id
    user-defined
    language
    user-defined, typically represents the programming language of the source code.
    <checker>
    id
    user-defined, but typically represents the name of the group of defect types it encapsulates.
    <error>
    autogroupby
    set to 0.
    enabled
    set to true.
    id
    the id attribute of the <error> element is a direct mapping to the <ErrorID> specified in the external defect listing.
    severity
    a value based on the interpretation of the severity levels defined in the defects listing file.
    <title>
    locale
    the locale code of the title string. For example, "en" or "ja".
    text
    a string that provides a simple overview of the defect.
    <message>
    locale
    the locale code of the title string. For example, "en" or "ja".
    text
    A string that provides a simple overview of the defect or {0} to pass the message specified in the defect listing. Since the defect messages have already been generated and the objective is just to associate the text of the message with lines in source files, the message is simply passed as a variable.
  5. Save your XML file and copy it to the /plugins directory in your Klocwork install path.
Related concepts
Configuring checkers for the integration build analysis

Create a defect parser

To import defects into Klocwork, you must write a Java class that implements the interface com.klocwork.defectimport.IDefectParser. In addition, this implementation must have a public single argument constructor that accepts a String. This String represents the resource that contains the listing of external defects to be imported into Klocwork. This resource can be a file, a stream, a port or any other user-defined source. In the example below, it represents the full path to the file that contains the defects. Note also that there is no public method that can be explicitly called from within Kwdefectimport that will create an Iterator to satisfy the following interface method:
Iterator<SourceDefect> getDefects();  
Therefore, the parser must prepare this Iterator from within its constructor. In the example below, see the call to the implementation-specific method, parse(), from within the constructor.

Sample parser

In this complete example of a parser, the defects are exported as XML. The implementation of IDefectParser extends SAX's DefaultHandler:

package com.thirdparty.defectexport.parser;

import com.klocwork.defectimport.IDefectParser;
import com.klocwork.defectimport.SourceDefect;
import org.jetbrains.annotations.NonNls;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.File;
import java.io.IOException;
import java.util.*;

public class ThirdPartyKlocworkDefectParser extends DefaultHandler implements IDefectParser {
    //where the listing of the source defects resides (file, stream?, port?, etc)
    private final String defectsSource;
    //list of items discovered at the defectsSource, each of which having been converted to a SourceDefect
    private final List<SourceDefect> sourceDefects = new ArrayList<SourceDefect>();

    private SourceDefect sourceDefect;
    private boolean inByErrorId;
    private boolean inMsg;
    private String currentErrorId = "";
    StringBuilder buffer = new StringBuilder(1024);

    public ThirdPartyKlocworkDefectParser (final String defectsSource) throws ParserConfigurationException, SAXException, IOException {
        this.defectsSource = defectsSource;
        parse();
    }

    @Override
    public void startElement(final String uri, final String localName, final String qName, final Attributes atts) throws SAXException
    {
        buffer.setLength(0);

        if(localName.equals(ELEM_BY_ERROR_ID)){
            inByErrorId = true;
        }

        if(inByErrorId && localName.equals(ELEM_ERROR_ID)){
            final String attributeId = atts.getValue(ATTR_ID);
            if(!attributeId.equals(currentErrorId)){
                currentErrorId = attributeId;
            }
        }

        if(inByErrorId && localName.equals(ELEM_MSG)){
            inMsg = true;
            sourceDefect = new SourceDefect();
            sourceDefect.setErrorId(currentErrorId);
            final String fileName = atts.getValue(ATTR_FILE);
            sourceDefect.setFileName(fileName);
            sourceDefect.setLineNumber(Integer.valueOf(atts.getValue(ATTR_LINE)));
            sourceDefect.setMessage(qName);
        }
    }

    @Override
    public void endElement (final String uri, final String localName, final String qName)
            throws SAXException
    {
        if(inByErrorId && localName.equals(ELEM_MSG)){
            sourceDefect.setMessage(buffer.toString());
            sourceDefects.add(sourceDefect);
            inMsg = false;
        }
    }

    @Override
    public void characters(final char[] ch, final int start, final int length) throws SAXException {
        if(inByErrorId && inMsg){
            buffer.append(ch, start, length);
        }
    }

    @Override
    public Iterator<SourceDefect> getDefects() {

        return Collections.unmodifiableCollection(sourceDefects).iterator();
    }

    private void parse() throws ParserConfigurationException, SAXException, IOException {
        final SAXParserFactory spf = SAXParserFactory.newInstance();
        spf.setNamespaceAware(true);

        final SAXParser parser = spf.newSAXParser();
        final XMLReader reader = parser.getXMLReader();
        reader.setContentHandler(this);
        reader.parse(new File(defectsSource).toURI().toURL().toString());
    }

    @Override
    public void close() {
        //not required for this implementation
    }

    @SuppressWarnings("HardCodedStringLiteral")
    @NonNls
    private static final String ELEM_BY_ERROR_ID = "ByErrorId";

    @SuppressWarnings("HardCodedStringLiteral")
    @NonNls
    private static final String ELEM_ERROR_ID = "ErrorId";

    @SuppressWarnings("HardCodedStringLiteral")
    @NonNls
    private static final String ATTR_ID  = "Id";

    @SuppressWarnings("HardCodedStringLiteral")
    @NonNls
    private static final String ELEM_MSG = "Msg";

    @SuppressWarnings("HardCodedStringLiteral")
    @NonNls
    private static final String ATTR_FILE  = "F";

    @SuppressWarnings("HardCodedStringLiteral")
    @NonNls
    private static final String ATTR_LINE  = "L";

}  

Import the defects

Once you've defined your external defects file, you've mapped those defects to a checker configuration, and you've written your parser, you can run kwdefectimport to import the external defects into Klocwork. You run Kwdefectimport from the command line, after running Kwbuildproject, but before running kwadmin -load:

At runtime, kwdefectimport opens the source defects listing file, reads the defect types and maps them to the appropriate source file and line of code. In the tables directory the files file.dat, and entity.dat are modified. Defects are written to a new file called problem_ext.pbf which is then loaded by kwadmin -load.

Run kwdefectimport on the command line

The following example shows kwdefectimport run from the command line:

kwdefectimport --tables-directory "C:/Klocwork/Server XY.Z/projects_root/projects/abc_main" 
--working-directory "C:/_workspaces/ABC_Main/src" --parser-class com.klocwork.defectimport.parser.TNSDLDefectParser 
--rejected-defects C:/tables/rejecteddefects.json --ext-libs "C:/Klocwork/lib/kwdefectimport.jar" 
--ext-libs "C:/Klocwork/lib/another_required_library.jar" "C:\already_analyzed_defects_in_proprietary_format\defects_01.xml" "C:\already_analyzed_defects_in_proprietary_format\defects_02.xml

For more information about running kwdefectimport and for a complete description of the options, see Kwdefectimport.

Running kwdefectimport as part of an automated build

If you include kwdefectimport as a regular part of your automated Klocwork tool chain (between kwbuildproject and kwadmin -load), you will require kwdefectimport's exit code to determine whether to continue. See Kwdefectimport for a complete list of error codes.

The following example uses a DOS batch script to demonstrate how to use the exit code to determine the action to take based on the exit code. In this example, there are 2 batch files: caller.bat and run_kwdefectimport.bat The file caller.bat is responsible for executing kwdefectimport and returning its exit code to the caller. The file run_kwdefectimport.bat calls caller.bat and then makes execution decisions based on thecaller.bat's exit code.

run_kwdefectimport.bat

@echo off
set errorlevel=
"C:\Klocwork\Server 12.0\bin\kwdefectimport.exe" --tables-directory C:\tables\20131024 --working-directory "C:/_workspaces/Main/REP/sources/kwdefectimport/test_resources/source_dir" --parser-class com.klocwork.defectimport.parser.TNSDLDefectParser --rejected-defects C:/tables/rejecteddefects.json "C:/_workspaces/Main/REP/sources/kwdefectimport/test_resources/sdl_defects/tncheck.xml"
exit /b %errorlevel%

caller.bat

caller.bat
@echo off
call run_kwdefectimport.bat
echo Exit Code is %errorlevel%
set atemp=%errorlevel%
echo atemp is %atemp%

set BUILD_FAILED_EXIT_CODE=1
set DEFECT_TYPES_NOT_REGISTERED_EXIT_CODE=16
set DUPLICATE_DEFECTS_FOUND_EXIT_CODE=32
set SOURCE_FILES_NOT_FOUND_EXIT_CODE=64
set SOURCE_FILES_NOT_REFERENCED_EXIT_CODE=128

set /A critical="%atemp%&%BUILD_FAILED_EXIT_CODE%"
set /A dnr="%atemp%&%DEFECT_TYPES_NOT_REGISTERED_EXIT_CODE%"
set /A dup="%atemp%&%DUPLICATE_DEFECTS_FOUND_EXIT_CODE%"
set /A snf="%atemp%&%SOURCE_FILES_NOT_FOUND_EXIT_CODE%"
set /A snr="%atemp%&%SOURCE_FILES_NOT_REFERENCED_EXIT_CODE%"

echo dnr %dnr%
echo dup %dup%
echo snf %snf%
echo snr %snr%

if "%dnr%" == "%DEFECT_TYPES_NOT_REGISTERED_EXIT_CODE%" echo Defect type(s) not registered
rem if "%dnr%" == 16 goto whatever_you_want_to_do_with_this_case
if "%dup%" == "%DUPLICATE_DEFECTS_FOUND_EXIT_CODE%" echo Duplicate defect(s) found
rem as above
if "%snf%" == "%SOURCE_FILES_NOT_FOUND_EXIT_CODE%" echo Source file(s) not found
rem as above
if "%snr%" == "%SOURCE_FILES_NOT_REFERENCED_EXIT_CODE%" echo Source file(s) not referenced
rem as above
if "%critical%" == "1" echo BUILD FAILED
rem You probably don't want to continue
REM place actions to take here

pause
rem Pause would _not_ be used in a production environment
Related reference
Kwdefectimport

Company

  • Visit Rogue Wave.com
  • Company News
  • Privacy
  • FAQ
  • Contact Rogue Wave Support
  • For problems with this website contact support@roguewave.com
  • Phone support: 1.303.545.3205
  • US and Canada: 1.800.404.4767
  • Japan: +81 (0) 3 5211 7761

© Rogue Wave Software, Inc. All rights reserved.