Statistics for Anomaly Detection and Fault Localization Using Runtime State Models