@Test public void testRefersToSameArticle2() throws MalformedURLException { URL url = new URL("https: URL referer = new URL("https: assertTrue(pageviewFilter.refersToDifferentArticle(url, referer)); }
public final boolean refersToDifferentArticle(final URL url, final URL referer) { pageviewCanonicalTitle = new PageviewCanonical(url); pageviewCanonicalReferer = new PageviewCanonical(referer); pageviewCanonicalTitle.canonicalize("default"); pageviewCanonicalReferer.canonicalize("default"); if (pageviewCanonicalTitle.getArticleTitle() == null || pageviewCanonicalReferer.getArticleTitle() == null) { return true; } else { return pageviewCanonicalTitle.getArticleTitle().equals(pageviewCanonicalReferer.getArticleTitle()) ? false : true; } }
PageviewFilter { public final boolean refersToDifferentArticle(final URL url, final URL referer) { pageviewCanonicalTitle = new PageviewCanonical(url); pageviewCanonicalReferer = new PageviewCanonical(referer); pageviewCanonicalTitle.canonicalize("default"); pageviewCanonicalReferer.canonicalize("default"); if (pageviewCanonicalTitle.getArticleTitle() == null || pageviewCanonicalReferer.getArticleTitle() == null) { return true; } else { return pageviewCanonicalTitle.getArticleTitle().equals(pageviewCanonicalReferer.getArticleTitle()) ? false : true; } } }
PageviewFilter { public final boolean refersToDifferentArticle(final URL url, final URL referer) { pageviewCanonicalTitle = new PageviewCanonical(url); pageviewCanonicalReferer = new PageviewCanonical(referer); pageviewCanonicalTitle.canonicalize("default"); pageviewCanonicalReferer.canonicalize("default"); if (pageviewCanonicalTitle.getArticleTitle() == null || pageviewCanonicalReferer.getArticleTitle() == null) { return true; } else { return pageviewCanonicalTitle.getArticleTitle().equals(pageviewCanonicalReferer.getArticleTitle()) ? false : true; } }  }
PageviewFilter { public final boolean refersToDifferentArticle(final URL url, final URL referer) { pageviewCanonicalTitle = new PageviewCanonical(url); pageviewCanonicalReferer = new PageviewCanonical(referer); pageviewCanonicalTitle.canonicalize("default"); pageviewCanonicalReferer.canonicalize("default"); if (pageviewCanonicalTitle.getArticleTitle() == null || pageviewCanonicalReferer.getArticleTitle() == null) { return true; } else { return pageviewCanonicalTitle.getArticleTitle().equals(pageviewCanonicalReferer.getArticleTitle()) ? false : true; } }  final boolean isNotBitsOrUploadDomain(final URL url); final boolean isValidUserAgent(final String userAgent); final boolean callPageviewHandler(final URL url, final URL referer); final boolean isValidRegularPageview(final URL url); final boolean isApiPageview(final URL url, final URL referer); final boolean refersToDifferentArticle(final URL url, final URL referer); final boolean isValidMimeType(final URL url, final String mimeType); final boolean isValidResponseCode(final String responseCode); final boolean isValidRequestMethod(final String requestMethod); final boolean isValidBlogPageview(final URL url); }
PageviewFilter { public final boolean refersToDifferentArticle(final URL url, final URL referer) { pageviewCanonicalTitle = new PageviewCanonical(url); pageviewCanonicalReferer = new PageviewCanonical(referer); pageviewCanonicalTitle.canonicalize("default"); pageviewCanonicalReferer.canonicalize("default"); if (pageviewCanonicalTitle.getArticleTitle() == null || pageviewCanonicalReferer.getArticleTitle() == null) { return true; } else { return pageviewCanonicalTitle.getArticleTitle().equals(pageviewCanonicalReferer.getArticleTitle()) ? false : true; } }  final boolean isNotBitsOrUploadDomain(final URL url); final boolean isValidUserAgent(final String userAgent); final boolean callPageviewHandler(final URL url, final URL referer); final boolean isValidRegularPageview(final URL url); final boolean isApiPageview(final URL url, final URL referer); final boolean refersToDifferentArticle(final URL url, final URL referer); final boolean isValidMimeType(final URL url, final String mimeType); final boolean isValidResponseCode(final String responseCode); final boolean isValidRequestMethod(final String requestMethod); final boolean isValidBlogPageview(final URL url);  }