This inspection reports calls like
s.substring(0, s.indexOf(x))
replaceable with
s.substringBefore(x)
.