CodeQL library for Java/Kotlin
codeql/java-all 0.11.0 (changelog, source)

Member predicate MetricPackage::getInstability

Instability metric.

Instability is a measure of how likely a package is to be influenced by changes to other packages. If this metric value is high, it is easily influenced, if it is low, the impact is likely to be minimal. Instability is estimated as the number of outgoing dependencies relative to the total number of dependencies.

A paradigmatic stable package is java.lang: A lot of other packages depend on it, but it does not itself depend on many other packages. Changing other parts of a program is thus highly unlikely to affect java.lang.

float getInstability()