if (matchedLength > 0) {
if (matchedLength != -1) {
    public float score(Request request, Response response) {        float result = 0F;        if ((getRouter() != null) && (request.getResourceRef() != null)                && (getTemplate() != null)) {            String remainingPart = request.getResourceRef().getRemainingPart();            int matchedLength = getTemplate().match(remainingPart);            if (matchedLength > 0) {                float totalLength = remainingPart.length();                if (totalLength > 0.0F) {                    result = getRouter().getRequiredScore()                            + (1.0F - getRouter().getRequiredScore())                            * (((float) matchedLength) / totalLength);                } else {                    result = 1.0F;                }            }            if (getLogger().isLoggable(Level.FINER)) {                getLogger().finer(                        "Call score for the \"" + getTemplate().getPattern()                                + "\" URI pattern: " + result);            }        }        return result;    }