logger.debug("Creating interval EventProbabilityInterval");
if (logger.isDebugEnabled()) logger.debug("Creating interval EventProbabilityInterval");
    protected static EventProbabilityInterval parseInterval(Element element, Hashtable map) {                logger.debug("Creating interval EventProbabilityInterval");                    //Read the map value        String start = element.getAttribute("intervalStart");        String dur = element.getAttribute("durationHrs");        String probStr    = element.getAttribute("probability");        String probInterval = element.getAttribute("probIntervalInMins"); //string        if (start== null || start.length()==0 || dur == null || dur.length() == 0 || probStr == null || probStr.length() == 0 || probInterval == null || probInterval.length() == 0) {            logger.error("intervalStart, durationHrs, probability OR probIntervalInMins was missing or empty in ClockInterval element. Returning null EventProbabilityInterval.");            return null;        }                       //Map probability String to a float.        float fProb = 0;        if (map != null) {            Float f = (Float) map.get(probStr);            if (f != null) {                fProb = f.floatValue();            } else {                logger.warn("Could not find probability map entry for "+probStr+". Setting value to 0.");            }        }        int probInt = 0;        try {            probInt = Integer.parseInt(probInterval);        } catch (Exception e) {            logger.error("ThreatVulnerabilityLoader -- exception parsing default probability interval: "+probInterval+", Ignoring.", e);            return null;                        }                int startHrs = 0;        int durHrs = 0;        int startMin = 0;                        try {                        if (start.length() <= 2) {                startHrs = 0;                startMin = Integer.parseInt(start);            } else            if (start.length() == 3) {                startHrs = Integer.parseInt(start.substring(0,1) );                startMin = Integer.parseInt(start.substring(1,3) );            } else            if (start.length() == 4) {                startHrs = Integer.parseInt(start.substring(0,2) );                startMin = Integer.parseInt(start.substring(2,4) );            } else {                logger.error("intervalStart too large ["+start+"]in ClockInterval element. Must be between 0000-2359. Returning null EventProbabilityInterval.");                            return null;            }            if (startHrs > 23 ) {                logger.error("intervalStart hrs too large ["+start+"]in ClockInterval element. Must be between 0-23. Returning null EventProbabilityInterval.");                            return null;            }            if (startMin > 59) {                logger.error("intervalStart min too large ["+start+"]in ClockInterval element. Must be between 0-59. Returning null EventProbabilityInterval.");                            return null;            }                        durHrs = Integer.parseInt(dur);                    } catch (Exception e) {            logger.error("Parsing error. Integer conversion error for intervalStart["+start+"] or durationHrs["+dur+"]");                        return null;        }        logger.debug("Read in start time = "+start+", starthr="+startHrs+", startMin="+startMin);                            EventProbabilityInterval pi = new EventProbabilityInterval( startHrs, startMin, durHrs, fProb, probInt );        return pi;            }    