StateValue startState = assetStateName.findStateValue(start); StateValue endState = assetStateName.findStateValue(end);
AssetState startState = assetStateName.findAssetState(start); AssetState endState = assetStateName.findAssetState(end);
    public void handle_Transition(final Attributes meta) throws SAXException {        if (DEBUG) System.err.println("handle_Transition()");        if (assetStateName == null) {           logger.warn("*** Cannot process -- ThreatModel XML [handle_Transition()] assetStateName is null");           ERROR= true;           return;        }                if (meta == null) {           logger.warn("*** Cannot process -- ThreatModel XML [handle_Transition()]: meta is null");           ERROR= true;           return;        }        if (!ERROR) {                        String prob = null;            try {                String start = meta.getValue("startState");                String end = meta.getValue("endState");                prob = meta.getValue("probability");                if (start != null && end != null && prob != null) {                    StateValue startState = assetStateName.findStateValue(start);                    StateValue endState = assetStateName.findStateValue(end);                    if (startState != null && endState != null ) {                                            double probability = Double.parseDouble(prob);                        DamageDistribution dd = new DamageDistribution(assetStateName, startState, endState, probability );                        threatModel.addDistribution(dd);                        return;                    } else {                        ERROR = true;                        if (startState == null) {                            logger.warn("*** Cannot process -- ThreatModel XML [handle_Transition()] - Could not find StateValue for startState: "+start+"="+startState);                        } else {                            logger.warn("*** Cannot process -- ThreatModel XML [handle_Transition()] - Could not find StateValue for endState: "+end+"="+endState);                        }                        return;                    }                } else {                    ERROR = true;                    logger.warn("*** Cannot process -- ThreatModel XML [handle_Transition()] - null values seen: startState="+start+" , endState="+end+" , probability="+prob);                    return;                }                            } catch (NumberFormatException nfe) {                ERROR = true;                logger.warn("*** Cannot process -- ThreatModel XML [handle_Transition()] - exception converting probability to a double. probability =" + prob);                        } catch (Exception e) {                ERROR = true;                logger.warn("*** Cannot process -- ThreatModel XML [handle_Transition()] - unknown exception.", e);                        }        }    }