//# 0 errors, 234 messages
//#
/*
    //#BlacklistChecker.java:1:1: class: org.apache.roller.weblogger.util.BlacklistChecker
* Licensed to the Apache Software Foundation (ASF) under one or more
*  contributor license agreements.  The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.  For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/
package org.apache.roller.weblogger.util;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.config.WebloggerConfig;
import org.apache.roller.weblogger.config.WebloggerRuntimeConfig;
import org.apache.roller.weblogger.pojos.WeblogEntryComment;
import org.apache.roller.weblogger.pojos.Weblog;

/**
 * Checks comment, trackbacks and referrers for spam.
 * @author Lance Lavandowska
 * @author Dave Johnson
 */
public class BlacklistChecker { 
    //#BlacklistChecker.java:36: method: void org.apache.roller.weblogger.util.BlacklistChecker.org.apache.roller.weblogger.util.BlacklistChecker()
    //#BlacklistChecker.java:36: end of method: void org.apache.roller.weblogger.util.BlacklistChecker.org.apache.roller.weblogger.util.BlacklistChecker()
    private static Log mLogger = LogFactory.getLog(BlacklistChecker.class);
    //#BlacklistChecker.java:37: method: org.apache.roller.weblogger.util.BlacklistChecker.org.apache.roller.weblogger.util.BlacklistChecker__static_init
    //#BlacklistChecker.java:37: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: org.apache.roller.weblogger.util.BlacklistChecker__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.util.BlacklistChecker__static_init): __Descendant_Table[org/apache/roller/weblogger/util/BlacklistChecker]
    //#output(org.apache.roller.weblogger.util.BlacklistChecker__static_init): mLogger
    //#post(org.apache.roller.weblogger.util.BlacklistChecker__static_init): __Descendant_Table[org/apache/roller/weblogger/util/BlacklistChecker] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.util.BlacklistChecker__static_init): init'ed(mLogger)
    //#BlacklistChecker.java:37: end of method: org.apache.roller.weblogger.util.BlacklistChecker.org.apache.roller.weblogger.util.BlacklistChecker__static_init
    
    /** 
     * Test comment, applying all blacklists, if configured 
     * @return True if comment matches blacklist term
     */
    public static boolean checkComment(WeblogEntryComment comment) {
        if (WebloggerConfig.getBooleanProperty("site.blacklist.enable.comments")) {
    //#BlacklistChecker.java:44: method: bool org.apache.roller.weblogger.util.BlacklistChecker.checkComment(WeblogEntryComment)
    //#BlacklistChecker.java:44: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool checkComment(WeblogEntryComment)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#input(bool checkComment(WeblogEntryComment)): " matched by "._tainted
    //#input(bool checkComment(WeblogEntryComment)): ""._tainted
    //#input(bool checkComment(WeblogEntryComment)): ")\b"._tainted
    //#input(bool checkComment(WeblogEntryComment)): ":"._tainted
    //#input(bool checkComment(WeblogEntryComment)): "\b("._tainted
    //#input(bool checkComment(WeblogEntryComment)): "matched:"._tainted
    //#input(bool checkComment(WeblogEntryComment)): comment
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Descendant_Table[org/apache/roller/weblogger/util/Blacklist]
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Descendant_Table[others]
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Dispatch_Table.isBlacklisted(Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Z
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.__Tag
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistRegex
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistStr
    //#input(bool checkComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.mLogger
    //#output(bool checkComment(WeblogEntryComment)): return_value
    //#pre[1] (bool checkComment(WeblogEntryComment)): (soft) comment != null
    //#pre[2] (bool checkComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist != null
    //#pre[3] (bool checkComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.__Tag == org/apache/roller/weblogger/util/Blacklist
    //#pre[4] (bool checkComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistRegex != null
    //#pre[5] (bool checkComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistStr != null
    //#pre[6] (bool checkComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.mLogger != null
    //#post(bool checkComment(WeblogEntryComment)): init'ed(return_value)
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getWeblogEntry
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntry:getWebsite
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.Weblog:getBlacklist
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:compile
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.List:add
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer:hasMoreTokens
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer:nextToken
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getUrl
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.commons.logging.Log:isDebugEnabled
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:matcher
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Matcher:find
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Matcher:group
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:pattern
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.lang.String:contains
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.commons.lang.StringUtils:isEmpty
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.List:size
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getEmail
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getName
    //#unanalyzed(bool checkComment(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getContent
    //#test_vector(bool checkComment(WeblogEntryComment)): org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(...)@44: {0}, {1}
            return testComment(comment);
        }
        return false;
    //#BlacklistChecker.java:47: end of method: bool org.apache.roller.weblogger.util.BlacklistChecker.checkComment(WeblogEntryComment)
    }
    
    /** 
     * Test trackback comment, applying all blacklists, if configured 
     * @return True if comment matches blacklist term
     */
    public static boolean checkTrackback(WeblogEntryComment comment) {
        if (WebloggerConfig.getBooleanProperty("site.blacklist.enable.trackbacks")) {
    //#BlacklistChecker.java:55: method: bool org.apache.roller.weblogger.util.BlacklistChecker.checkTrackback(WeblogEntryComment)
    //#BlacklistChecker.java:55: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool checkTrackback(WeblogEntryComment)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#input(bool checkTrackback(WeblogEntryComment)): " matched by "._tainted
    //#input(bool checkTrackback(WeblogEntryComment)): ""._tainted
    //#input(bool checkTrackback(WeblogEntryComment)): ")\b"._tainted
    //#input(bool checkTrackback(WeblogEntryComment)): ":"._tainted
    //#input(bool checkTrackback(WeblogEntryComment)): "\b("._tainted
    //#input(bool checkTrackback(WeblogEntryComment)): "matched:"._tainted
    //#input(bool checkTrackback(WeblogEntryComment)): comment
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Descendant_Table[org/apache/roller/weblogger/util/Blacklist]
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Descendant_Table[others]
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Dispatch_Table.isBlacklisted(Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Z
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.__Tag
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistRegex
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistStr
    //#input(bool checkTrackback(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.mLogger
    //#output(bool checkTrackback(WeblogEntryComment)): return_value
    //#pre[1] (bool checkTrackback(WeblogEntryComment)): (soft) comment != null
    //#pre[2] (bool checkTrackback(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist != null
    //#pre[3] (bool checkTrackback(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.__Tag == org/apache/roller/weblogger/util/Blacklist
    //#pre[4] (bool checkTrackback(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistRegex != null
    //#pre[5] (bool checkTrackback(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistStr != null
    //#pre[6] (bool checkTrackback(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.mLogger != null
    //#post(bool checkTrackback(WeblogEntryComment)): init'ed(return_value)
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getWeblogEntry
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntry:getWebsite
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.Weblog:getBlacklist
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:compile
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.List:add
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer:hasMoreTokens
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer:nextToken
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getUrl
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.commons.logging.Log:isDebugEnabled
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:matcher
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.regex.Matcher:find
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.regex.Matcher:group
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:pattern
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.lang.String:contains
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.commons.lang.StringUtils:isEmpty
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.List:size
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getEmail
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getName
    //#unanalyzed(bool checkTrackback(WeblogEntryComment)): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogEntryComment:getContent
    //#test_vector(bool checkTrackback(WeblogEntryComment)): org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(...)@55: {0}, {1}
            return testComment(comment);
        }
        return false;
    //#BlacklistChecker.java:58: end of method: bool org.apache.roller.weblogger.util.BlacklistChecker.checkTrackback(WeblogEntryComment)
    }

    /** 
     * Test referrer URL, applying blacklist and website blacklist only if configured 
     * @return True if comment matches blacklist term
     */
    public static boolean checkReferrer(Weblog website, String referrerURL) {
        if (WebloggerConfig.getBooleanProperty("site.blacklist.enable.referrers")) {
    //#BlacklistChecker.java:66: method: bool org.apache.roller.weblogger.util.BlacklistChecker.checkReferrer(Weblog, String)
    //#BlacklistChecker.java:66: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool checkReferrer(Weblog, String)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#input(bool checkReferrer(Weblog, String)): " matched by "._tainted
    //#input(bool checkReferrer(Weblog, String)): ""._tainted
    //#input(bool checkReferrer(Weblog, String)): ")\b"._tainted
    //#input(bool checkReferrer(Weblog, String)): ":"._tainted
    //#input(bool checkReferrer(Weblog, String)): "\b("._tainted
    //#input(bool checkReferrer(Weblog, String)): "matched:"._tainted
    //#input(bool checkReferrer(Weblog, String)): org/apache/roller/weblogger/util/Blacklist.mLogger
    //#input(bool checkReferrer(Weblog, String)): referrerURL
    //#input(bool checkReferrer(Weblog, String)): website
    //#output(bool checkReferrer(Weblog, String)): return_value
    //#pre[1] (bool checkReferrer(Weblog, String)): (soft) org/apache/roller/weblogger/util/Blacklist.mLogger != null
    //#pre[2] (bool checkReferrer(Weblog, String)): (soft) referrerURL != null
    //#pre[3] (bool checkReferrer(Weblog, String)): (soft) website != null
    //#post(bool checkReferrer(Weblog, String)): init'ed(return_value)
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.regex.Pattern:compile
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.List:add
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.StringTokenizer
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.StringTokenizer:hasMoreTokens
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.StringTokenizer:nextToken
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:org.apache.commons.logging.Log:isDebugEnabled
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.regex.Pattern:matcher
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.regex.Matcher:find
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.regex.Matcher:group
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.util.regex.Pattern:pattern
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool checkReferrer(Weblog, String)): Effects-of-calling:java.lang.String:contains
    //#test_vector(bool checkReferrer(Weblog, String)): org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(...)@66: {0}, {1}
    //#test_vector(bool checkReferrer(Weblog, String)): org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(...)@71: Addr_Set{null}, Inverse{null}
            List stringRules = new ArrayList();
            List regexRules = new ArrayList();
            Blacklist.populateSpamRules(
    //#BlacklistChecker.java:69: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.Weblog:getBlacklist()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool checkReferrer(Weblog, String)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.Weblog:getBlacklist()
                website.getBlacklist(), stringRules, regexRules, null);
            if (WebloggerRuntimeConfig.getProperty("spam.blacklist") != null) {
    //#BlacklistChecker.java:71: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool checkReferrer(Weblog, String)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
                Blacklist.populateSpamRules(
    //#BlacklistChecker.java:72: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool checkReferrer(Weblog, String)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
                    WebloggerRuntimeConfig.getProperty("spam.blacklist"), stringRules, regexRules, null);
            }
            return Blacklist.matchesRulesOnly(referrerURL, stringRules, regexRules);
        }
        return false;
    //#BlacklistChecker.java:77: end of method: bool org.apache.roller.weblogger.util.BlacklistChecker.checkReferrer(Weblog, String)
    }

    /** 
     * Test comment against built in blacklist, site blacklist and website blacklist 
     * @return True if comment matches blacklist term
     */
    private static boolean testComment(WeblogEntryComment c) {
        boolean ret = false;
    //#BlacklistChecker.java:85: method: bool org.apache.roller.weblogger.util.BlacklistChecker.testComment(WeblogEntryComment)
    //#input(bool testComment(WeblogEntryComment)): " matched by "._tainted
    //#input(bool testComment(WeblogEntryComment)): ""._tainted
    //#input(bool testComment(WeblogEntryComment)): ")\b"._tainted
    //#input(bool testComment(WeblogEntryComment)): ":"._tainted
    //#input(bool testComment(WeblogEntryComment)): "\b("._tainted
    //#input(bool testComment(WeblogEntryComment)): "matched:"._tainted
    //#input(bool testComment(WeblogEntryComment)): c
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Descendant_Table[org/apache/roller/weblogger/util/Blacklist]
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Descendant_Table[others]
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.__Dispatch_Table.isBlacklisted(Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Z
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.__Tag
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistRegex
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistStr
    //#input(bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.mLogger
    //#output(bool testComment(WeblogEntryComment)): return_value
    //#pre[1] (bool testComment(WeblogEntryComment)): c != null
    //#pre[2] (bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist != null
    //#pre[3] (bool testComment(WeblogEntryComment)): org/apache/roller/weblogger/util/Blacklist.blacklist.__Tag == org/apache/roller/weblogger/util/Blacklist
    //#pre[4] (bool testComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistRegex != null
    //#pre[5] (bool testComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.blacklist.blacklistStr != null
    //#pre[6] (bool testComment(WeblogEntryComment)): (soft) org/apache/roller/weblogger/util/Blacklist.mLogger != null
    //#presumption(bool testComment(WeblogEntryComment)): org.apache.roller.weblogger.pojos.WeblogEntry:getWebsite(...)@88 != null
    //#presumption(bool testComment(WeblogEntryComment)): org.apache.roller.weblogger.pojos.WeblogEntryComment:getWeblogEntry(...)@88 != null
    //#post(bool testComment(WeblogEntryComment)): init'ed(return_value)
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:compile
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.List:add
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer:hasMoreTokens
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.StringTokenizer:nextToken
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:org.apache.commons.logging.Log:isDebugEnabled
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:matcher
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Matcher:find
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Matcher:group
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.regex.Pattern:pattern
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.lang.String:contains
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:org.apache.commons.lang.StringUtils:isEmpty
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.List:size
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(bool testComment(WeblogEntryComment)): Effects-of-calling:java.util.List:addAll
        List stringRules = new ArrayList();
        List regexRules = new ArrayList();
        Weblog website = c.getWeblogEntry().getWebsite();
    //#BlacklistChecker.java:88: Warning: method not available
    //#    -- call on WeblogEntry org.apache.roller.weblogger.pojos.WeblogEntryComment:getWeblogEntry()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: WeblogEntry org.apache.roller.weblogger.pojos.WeblogEntryComment:getWeblogEntry()
    //#BlacklistChecker.java:88: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.pojos.WeblogEntry:getWebsite()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.pojos.WeblogEntry:getWebsite()
        Blacklist.populateSpamRules(
    //#BlacklistChecker.java:89: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.Weblog:getBlacklist()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.Weblog:getBlacklist()
    //#BlacklistChecker.java:89: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
            website.getBlacklist(), stringRules, regexRules, 
            WebloggerRuntimeConfig.getProperty("spam.blacklist"));
        Blacklist blacklist = Blacklist.getBlacklist();
        if (   blacklist.isBlacklisted(c.getUrl(),     stringRules, regexRules)
    //#BlacklistChecker.java:93: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.WeblogEntryComment:getUrl()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.WeblogEntryComment:getUrl()
    //#BlacklistChecker.java:93: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.WeblogEntryComment:getEmail()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.WeblogEntryComment:getEmail()
    //#BlacklistChecker.java:93: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.WeblogEntryComment:getName()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.WeblogEntryComment:getName()
    //#BlacklistChecker.java:93: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.WeblogEntryComment:getContent()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.util.BlacklistChecker
    //#    method: bool testComment(WeblogEntryComment)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.WeblogEntryComment:getContent()
            || blacklist.isBlacklisted(c.getEmail(),   stringRules, regexRules)
            || blacklist.isBlacklisted(c.getName(),    stringRules, regexRules)
            || blacklist.isBlacklisted(c.getContent(), stringRules, regexRules)) {
            ret = true;
        }
        return ret;
    //#BlacklistChecker.java:99: end of method: bool org.apache.roller.weblogger.util.BlacklistChecker.testComment(WeblogEntryComment)
    }        
}

    //#BlacklistChecker.java:: end of class: org.apache.roller.weblogger.util.BlacklistChecker
