Nox-Lumen MfgNox-Lumen Mfg

Java static analysis

Java L1 uses three complementary skills from style through bytecode semantics.

SkillAxisOne-liner
checkstyleStyleLayout + naming (Google Java Style / Sun)
pmdRulesSuspicious patterns (dead code, complexity, bad catches)
spotbugsBytecode bugsJVM-level defects + FindSecBugs

checkstyle

Role: Java style & convention enforcement.

AreaExamples
NamingClasses PascalCase, methods camelCase, constants UPPER_SNAKE
LayoutIndentation, whitespace, brace placement
ImportsOrder, groups, no star imports
JavadocPublic API coverage
SizeLine length ≤120, method length caps

Common configs: Google Java Style, Sun conventions, corporate custom via standards-converter.

Triggers: “Java style check”, “run checkstyle”, “Google Java Style”

pmd

Role: Suspicious constructs—not syntax failures, usually bug incubators.

ThemeExamples
Dead codeUnreachable branches, unused vars
ComplexityHigh cyclomatic depth, nesting
Exception smellsEmpty catch (Exception) blocks
Concurrency misusesLegacy Vector/Hashtable traps
Security smellsDangerous reflection, missing SecurityManager configs

Rule packs: basic, codesize, design, naming, optimizations, strictexception, …

Triggers: “code smells”, “PMD scan”, “cyclomatic complexity”

spotbugs

Role: Bytecode-level bug detection—sees what the compiler actually emits.

AreaExamples
Null derefsReachable NPE paths
Resource hygieneStreams / JDBC left open
Concurrency bugsUnsafe static mutation
Serialization pitfallsNon-serializable fields
OWASPFindSecBugs (SQLi / XSS / SSRF hints)

pmd vs spotbugs

Aspectpmdspotbugs
IRSource ASTBytecode
StrengthLint-level smellsDeeper correctness + security

Triggers: “Java defect scan”, “spotbugs”, “FindSecBugs security”

Run all three

checkstyle   → style baseline
pmd          → smell detection
spotbugs     → bytecode + security

Feeds unified CodeEvidence into code-review.

Corporate customization

Use standards-converter to turn “enterprise coding standard.md” into checkstyle.xml, pmd-ruleset.xml, spotbugs filters.

On this page