How Are Hotspots Selected for Hotspot Code Health Analysis?

CodeScene identifies hotspots by analyzing development activity, specifically how often files are changed over time.

1. Commit activity within the hotspot time span

Hotspots are determined by looking at commits within the configured Hotspot analysis time span (a sliding window, for example, the last 6 or 12 months).
Only commits that fall within this time span are considered.

From this data, CodeScene builds a change-frequency distribution, showing how frequently each file has been modified during the selected period.

2. No fixed percentile cutoff

CodeScene does not use a fixed or predefined percentile (such as “top 10% of files”) to decide which files are hotspots.

Instead, it applies an algorithm that:

  • Analyzes the slope of the change-frequency distribution

  • Identifies a natural cutoff point where change activity drops off significantly

This approach allows hotspot selection to adapt to the unique characteristics of each codebase, rather than relying on a static threshold that may not be meaningful across different systems.

3. Basis for Hotspot Code Health

The set of files identified by this algorithm becomes the hotspot set.
Only these files are then used when calculating the weighted Hotspot Code Health, combining:

  • How often the files change (development activity)

  • The Code Health of those files

This ensures that Hotspot Code Health reflects the quality of the most actively developed and risk-prone parts of the system, rather than an average across all files.