Data Flow Analysis in IntelliJ IDEA: How the IDE Perceives Your Code
summary
IntelliJ runs an on‑the‑fly abstract interpreter over a stack-based IR to detect constant conditions, failing casts and likely NPEs by tracking value ranges, modular remainders and type/null states. It forks and later joins execution states, uses widening for loops, and applies range and modular arithmetic plus method handlers and contracts to prove impossibilities. Lambdas and streams get rewritten by inliners desugar streams, analysis is mostly intraprocedural, and state explosion and imperfect nullness lattice cause the main false positives.
AI-written summary · about
chapters (23)
- 0:00Data flow analysis intro
- 2:45Tagir Valeev’s background and role at JetBrains
- 3:51Static analysis basics
- 5:17Constant conditions inspection
- 7:26Abstract interpretation
- 10:14Abstract values and range tracking
- 13:02Variable tracking and state splitting
- 16:36State merging and complex conditions
- 19:25Loop limitations and state explosion
- 21:11Type system and tracking
- 22:59Nullness tracking challenges
- 26:13Nullability inference
- 28:40Variable relations tracking
- 30:06Fields and side effects
- 33:32Local objects and arrays
- 36:02Special fields and contracts
- 38:32Method handlers support
- 39:14Lambdas and streams
- 41:42Inspections integration
- 43:30Quick fixes and completion
- 45:14Debugger integration
- 46:17Summary and benefits
- 47:20Q&A
related talks
17mDynamic and Static Code Analysis for Java Programs on Heterogeneous Hardware
33mKotlin: Uncovered
53mWell there's your problem! Your engine's missing! A look under Java's hood
34mUnderstand Every Line of Your Codebase
01h 00mTips and Tricks for GraalVM and Graal Languages in IntelliJ IDEA
56mJava 4..21, Kotlin, Code Coverage, bytecode: scandals, intrigues, investigations
55mCode Analysis with Zero False Positives in Java
54mWhat Lies Beneath
