DemandHunt Demand signals from global communities
EN
Dev Tools & Micro-SaaS Stack Exchange · 2024-08-09

Find Java dead code at runtime — static analysis flags too much

运行时才能真正发现 Java 死代码,静态分析误报太多

At a glance · 30-second read
  • WhoStack Exchange · 2024-08-09 · 2 upvotes · 1 replies
  • The askFind Java dead code at runtime — static analysis flags too much
  • The openingAn instrumentation agent recording class/method hits in staging or production to produce a never-executed report with deletion suggestions.

What was actually said

“Reflection, Spring injection and dynamic proxies make static analysis mark live code as dead. I want coverage-based dead-code reports from real execution paths.”

— Stack Exchange · 2024-08-09 · softwarerecs.stackexchange.com/questions/90971/softw…

Background and pain

The pain

When cleaning legacy Java services, static-tool false positives make teams afraid to delete anything; only runtime evidence gives confidence.

A buildable angle

The opening

An instrumentation agent recording class/method hits in staging or production to produce a never-executed report with deletion suggestions.

How to validate it

  1. Read the whole thread and note the recurring scenarios — repetition is the density of the need.
  2. Search existing tools around "java / dead code" and check which single step they actually cover.
  3. Put up a one-line landing page, share it back to Stack Exchange, and see whether anyone asks about pricing.

Existing options

JaCoCo静态工具

From the thread · top comments

https://github.com/naver/scavenger is the project built on the idea of codekvast. Please check it out.

— JunHo Yoon · ▲ 1
Open the source thread

More threads on this pain

Related opportunities