final int active = map.get(ServiceController.Mode.ACTIVE).get();
final int passive = map.get(ServiceController.Mode.PASSIVE).get();
final int onDemand = map.get(ServiceController.Mode.ON_DEMAND).get();
final int never = map.get(ServiceController.Mode.NEVER).get();
if (failed == 0) {
log.infof("JBoss AS %s \"%s\" started in %dms - Started %d of %d services (%d services are passive or on-demand)", Version.AS_VERSION, Version.AS_RELEASE_CODENAME, Long.valueOf(elapsedTime), Integer.valueOf(started), Integer.valueOf(active + passive + onDemand + never), Integer.valueOf(onDemand + passive));
} else {
final StringBuilder b = new StringBuilder();
b.append(String.format("JBoss AS %s \"%s\" started (with errors) in %dms - Started %d of %d services (%d services failed or missing dependencies, %d services are passive or on-demand)", Version.AS_VERSION, Version.AS_RELEASE_CODENAME, Long.valueOf(elapsedTime), Integer.valueOf(started), Integer.valueOf(active + passive + onDemand + never), Integer.valueOf(failed), Integer.valueOf(onDemand + passive)));
final Set<ServiceName> set = missingDepsSet;
final Iterator<ServiceName> i = set.iterator();