class PathologicalPathDecideRule extends DecideRule {
    private static final long serialVersionUID = 3L;

    {
        setMaxRepetitions(2);
    }
    public int getMaxRepetitions() {
        return (Integer) kp.get("maxRepetitions");
    }
    /**
     * Number of times the pattern should be allowed to occur. This rule returns
     * its decision (usually REJECT) if a path-segment is repeated more than
     * number of times.
     */
    public void setMaxRepetitions(int maxRepetitions) {
        kp.put("maxRepetitions", maxRepetitions);
    }
    
    /** Constructs a new PathologicalPathFilter.
     */
    public PathologicalPathDecideRule() {
    }


    @Override
    protected DecideResult innerDecide(CrawlURI uri) {<FILL_FUNCTION_BODY>}
 
    protected String constructRegex(int rep) {
        return (rep == 0) ? null : ".*?/(.*?/)\\1{" + rep + ",}.*";
    }
}

        int maxRep = getMaxRepetitions();
//        Pattern p = getPattern(maxRep);
        Matcher m = TextUtils.getMatcher(constructRegex(maxRep), uri.getUURI().toString());
        try {
            if (m.matches()) {
                return DecideResult.REJECT;
            } else {
                return DecideResult.NONE;
            }
        } finally {
            TextUtils.recycleMatcher(m);
        }
    
<methods>public void <init>() ,public boolean accepts(org.archive.modules.CrawlURI) ,public org.archive.modules.deciderules.DecideResult decisionFor(org.archive.modules.CrawlURI) ,public java.lang.String getComment() ,public boolean getEnabled() ,public org.archive.spring.KeyedProperties getKeyedProperties() ,public org.archive.modules.deciderules.DecideResult onlyDecision(org.archive.modules.CrawlURI) ,public void setComment(java.lang.String) ,public void setEnabled(boolean) <variables>protected java.lang.String comment,protected org.archive.spring.KeyedProperties kp