logger.debug("Added new Threat (default) with no filter: \n"+threat.toString() );
if (logger.isDebugEnabled()) logger.debug("Added new Threat (default) with no filter: \n"+threat.toString() );
    protected Vector processElement(Element element) {                //publish to BB during execute().        //1. Create a new AssetType instance &        String threatName = element.getAttribute("name");        String assetType = element.getAttribute("affectsAssetType");        String causesEvent = element.getAttribute("causesEvent");        String defaultProbStr = element.getAttribute("defaultEventLikelihoodProb"); //string        String defaultProbInterval = element.getAttribute("probIntervalInMins"); //string        if (threatName == null || threatName.length()==0 || assetType == null || assetType.length() == 0 || causesEvent == null || causesEvent.length() == 0) {            logger.error("Threat XML Error threat ["+threatName+"]- exception parsing - threat name, assetType, or causesEvent was NULL. Ignoring.");            return threats;        }                //Convert probability String to a float.        int probInt = 0;        float fProb = 0;        if (probabilityMap != null) {            Float f = (Float) probabilityMap.get(defaultProbStr);            if (f != null) {                fProb = f.floatValue();            }                        if (fProb > 0) { //don't process if fProb = 0                try {                    probInt = Integer.parseInt(defaultProbInterval);                } catch (Exception e) {                    logger.error("Threat XML Error threat ["+threatName+"]- exception parsing default probability interval: "+defaultProbInterval+", Ignoring.", e);                    return threats;                                }            }        }                    AssetType affectsAssetType = AssetType.findAssetType(assetType);        //what to do when assetType is null? - create it, process it later?        if (affectsAssetType == null) {            logger.warn("Threat XML Error - affectsAssetType unknown: "+assetType);            return threats;        }        if (us == null) {            logger.warn("Threat XML Error - UIDService is null!");            return threats;        }                UID uid = us.nextUID();        //Create default threat        ThreatDescription threat = new ThreatDescription( threatName, affectsAssetType, causesEvent, fProb, probInt );/*                try {            double prob = threat.getEventProbability().computeIntervalProbability(System.currentTimeMillis(), System.currentTimeMillis()+600000);            if (logger.isDebugEnabled()) { logger.debug("Testing event likelihood. Prob = "+prob); }                    } catch (Exception e1) {            if (logger.isDebugEnabled()) { logger.debug("Testing event likelihood interval. EXCEPTION:"+e1); e1.printStackTrace(); }                    }*/                threats.add(threat);        Element e;        for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) {            if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equalsIgnoreCase("VulnerableAssets") ) {                e = (Element)child;                //logger.debug("calling parseVulnerableAssets...");                parseVulnerableAssets(e, threat);            } //else, likely a text element - ignore        }        logger.debug("Added new Threat (default) with no filter: \n"+threat.toString() );                    return threats;    }