class HopCrossesAssignmentLevelDomainDecideRule extends PredicatedDecideRule {
    private static final long serialVersionUID = 1L;

    private static final Logger LOGGER = Logger
            .getLogger(HopCrossesAssignmentLevelDomainDecideRule.class.getName());
    
    public HopCrossesAssignmentLevelDomainDecideRule() {
    }

    protected boolean evaluate(CrawlURI uri) {<FILL_FUNCTION_BODY>}
    
    private String getAssignmentLevelSurt(UURI uuri){
        String surt = uuri.getSurtForm().replaceFirst(".*://\\((.*?)\\).*", "$1");
        return PublicSuffixes.reduceSurtToAssignmentLevel(surt);
        
    }
}

        UURI via = uri.getVia();
        if (via == null) {
            return false;
        }
        try {
            // determine if this hop crosses assignment-level-domain borders
            String ald = getAssignmentLevelSurt(uri.getUURI());
            String viaAld = getAssignmentLevelSurt(via);
            if (ald != null && !ald.equals(viaAld)) {
                if(LOGGER.isLoggable(Level.FINE)) {
                    LOGGER.fine("rule matched for \"" + ald+"\" vs. \""+viaAld+"\"");
                }
                return true;
            }
        } catch (Exception e) {
            LOGGER.log(Level.WARNING,"uri="+uri+" via="+via, e);
            // Return false since we could not get hostname or something else
            // went wrong
        }
        return false;
    
<methods>public void <init>() ,public org.archive.modules.deciderules.DecideResult getDecision() ,public org.archive.modules.deciderules.DecideResult onlyDecision(org.archive.modules.CrawlURI) ,public void setDecision(org.archive.modules.deciderules.DecideResult) <variables>private static final long serialVersionUID