That code violates Tell, Don't Ask..
You could also say it exhibits the feature envy smell.
Furthermore, "checking systems" shouldn't, necessarily, sound an alarm. The method both checks and responds to a state, and therefore has side effects. You might prefer to ONLY check the system without sounding an alarm.
(Violating Tell, Don't Ask and having feature envy are pretty much two sides of the same coin.)