//# 5 errors, 137 messages
//#
/*
    //#OldCommentsRequest.java:1:1: class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
 * 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.ui.rendering.velocity.deprecated;

import java.util.Enumeration;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


/**
 * Represents an *old* request for a Roller weblog comments permalink.
 * 
 * any url from ... /comments/*
 * 
 * While these urls are no longer used we do provide redirect support for them
 * for users who have upgraded from earlier versions.  We keep this class to
 * help with parsing these urls since they are fairly complex.
 */
public class OldCommentsRequest {
    
    private static Log log = LogFactory.getLog(OldCommentsRequest.class);
    //#OldCommentsRequest.java:42: method: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init
    //#OldCommentsRequest.java:42: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest]
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getContext()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getPageType()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogAnchor()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogCategory()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogDate()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogPage()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.isValidDateString(Ljava/lang/String;)Z
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): log
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getContext()Ljava/lang/String; == &getContext
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getPageType()Ljava/lang/String; == &getPageType
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogAnchor()Ljava/lang/String; == &getWeblogAnchor
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogCategory()Ljava/lang/String; == &getWeblogCategory
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogDate()Ljava/lang/String; == &getWeblogDate
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogHandle()Ljava/lang/String; == &getWeblogHandle
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.getWeblogPage()Ljava/lang/String; == &getWeblogPage
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): __Dispatch_Table.isValidDateString(Ljava/lang/String;)Z == &isValidDateString
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init): init'ed(log)
    //#OldCommentsRequest.java:42: end of method: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest__static_init
    
    // various page types
    public static final String MAIN = "main";
    public static final String PERMALINK = "permalink";
    public static final String ARCHIVE = "archive";
    
    private String context = null;
    private String pageType = null;
    private String weblogHandle = null;
    private String weblogAnchor = null;
    private String weblogPage = null;
    private String weblogCategory = null;
    private String weblogDate = null;
    
    
    /**
     * Construct the WeblogPageRequest by parsing the incoming url
     */
    public OldCommentsRequest(HttpServletRequest request) throws Exception {
    //#OldCommentsRequest.java:61: method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#input(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): "not a weblog page request, "._tainted
    //#input(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): "parsing url "._tainted
    //#input(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): log
    //#input(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): request
    //#input(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this
    //#output(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.context
    //#output(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.pageType
    //#output(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogAnchor
    //#output(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogCategory
    //#output(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogDate
    //#output(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogHandle
    //#output(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogPage
    //#pre[1] (void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): log != null
    //#pre[2] (void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): request != null
    //#presumption(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): java.lang.String:equals(...)@74 == 1
    //#presumption(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): java.lang.String:length(...)@97 >= 2
    //#presumption(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getPathInfo(...)@67 != null
    //#presumption(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getServletPath(...)@66 != null
    //#post(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.context == &"weblog"
    //#post(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.pageType in Addr_Set{null,&"permalink",&"archive"}
    //#post(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): init'ed(this.weblogAnchor)
    //#post(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): init'ed(this.weblogCategory)
    //#post(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogDate == null
    //#post(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogHandle == null
    //#post(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): this.weblogPage == null
    //#unanalyzed(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): Effects-of-calling:org.apache.commons.lang.StringUtils:isNumeric
    //#test_vector(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@161: Addr_Set{null}, Inverse{null}
    //#test_vector(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@166: Addr_Set{null}, Inverse{null}
    //#test_vector(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@171: Addr_Set{null}, Inverse{null}
        
        // parse the request object and figure out what we've got
        log.debug("parsing url "+request.getRequestURL());
    //#OldCommentsRequest.java:64: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
        
        String servlet = request.getServletPath();
        String pathInfo = request.getPathInfo();
        
        // make sure this request was destined for the comments servlet
        if(servlet != null) {
            // strip off the leading slash
            servlet = servlet.substring(1);
            
            if("comments".equals(servlet)) {
                this.context = "weblog";
            } else {
                // not a request to the page servlet
                throw new Exception("not a weblog page request, "+request.getRequestURL());
            }
        } else {
            throw new Exception("not a weblog page request, "+request.getRequestURL());
        }
        
        
        /*
         * parse path info
         *
         * we expect one of the following forms of urls ...
         *
         * [handle] - get default page for user for today's date
         * [handle]/[date] - get default page for user for specified date
         * [handle]/[pagelink] - get specified page for today's date
         * [handle]/[pagelink]/[date] - get specified page for specified date
         * [handle]/[pagelink]/[anchor] - get specified page & entry (by anchor)
         * [handle]/[pagelink]/[date]/[anchor] - get specified page & entry (by anchor)
         */
        if(pathInfo != null && pathInfo.trim().length() > 1) {
            // strip off the leading slash
            pathInfo = pathInfo.substring(1);
            String[] pathElements = pathInfo.split("/");
            
            if ( pathElements.length == 1 ) {
    //#OldCommentsRequest.java:102: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    basic block: bb_8
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#OldCommentsRequest.java:102: Warning: test always goes same way
    //#    test predetermined because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    from bb: bb_8
    //#    live edge: bb_8-->bb_10
    //#    tested vn: undefined - 1
    //#    tested vn values: {-1}
                
                // /handle
                this.weblogHandle = pathElements[0];
    //#OldCommentsRequest.java:105: Warning: dead code
    //#    dead code here because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_9
                this.weblogPage = "Weblog";
                this.pageType = MAIN;
                
            } else if ( pathElements.length == 2 ) {
    //#OldCommentsRequest.java:109: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    basic block: bb_10
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#OldCommentsRequest.java:109: Warning: test always goes same way
    //#    test predetermined because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    from bb: bb_10
    //#    live edge: bb_10-->bb_14
    //#    tested vn: undefined - 2
    //#    tested vn values: {-2}
                
                // /handle/date or /handle/page
                this.weblogHandle = pathElements[0];
    //#OldCommentsRequest.java:112: Warning: dead code
    //#    dead code here because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_11
                this.weblogPage = "Weblog";
                
                if(this.isValidDateString(pathElements[1])) {
                    this.weblogDate = pathElements[1];
    //#OldCommentsRequest.java:116: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_12
                    this.pageType = ARCHIVE;
                } else {
                    this.weblogPage = pathElements[1];
    //#OldCommentsRequest.java:119: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_13
                    this.pageType = MAIN;
                }
                
            } else if ( pathElements.length == 3 ) {
    //#OldCommentsRequest.java:123: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    basic block: bb_14
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#OldCommentsRequest.java:123: Warning: test always goes same way
    //#    test predetermined because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    from bb: bb_14
    //#    live edge: bb_14-->bb_18
    //#    tested vn: undefined - 3
    //#    tested vn values: {-3}
                
                // /handle/page/date or /handle/page/anchor
                this.weblogHandle = pathElements[0];
    //#OldCommentsRequest.java:126: Warning: dead code
    //#    dead code here because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_15
                this.weblogPage = pathElements[1];
                
                if(this.isValidDateString(pathElements[2])) {
                    this.weblogDate = pathElements[2];
    //#OldCommentsRequest.java:130: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_16
                    this.pageType = ARCHIVE;
                } else {
                    this.weblogAnchor = pathElements[2];
    //#OldCommentsRequest.java:133: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_17
                    this.pageType = PERMALINK;
                }
                
            } else if ( pathElements.length == 4 ) {
    //#OldCommentsRequest.java:137: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    basic block: bb_18
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#OldCommentsRequest.java:137: Warning: test always goes same way
    //#    test predetermined because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    from bb: bb_18
    //#    live edge: bb_18-->bb_20
    //#    tested vn: undefined - 4
    //#    tested vn values: {-4}
                
                // /handle/page/date/anchor
                this.weblogHandle = pathElements[0];
    //#OldCommentsRequest.java:140: Warning: dead code
    //#    dead code here because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    dead bb: bb_19
                this.weblogPage = pathElements[1];
                this.weblogDate = pathElements[2];
                this.weblogAnchor = pathElements[3];
                this.pageType = PERMALINK;
            }
            
        } else {
            // invalid request ... path info is empty
            throw new Exception("not a weblog page request, "+request.getRequestURL());
        }
        
        
        /*
         * parse request parameters
         *
         * the only params we currently care about are:
         *   anchor - specifies a weblog entry
         *   entry - specifies a weblog entry
         *   catname - specifies a weblog category
         */
        if(request.getParameter("anchor") != null) {
            this.weblogAnchor = request.getParameter("anchor");
            this.pageType = PERMALINK;
        }
        
        if(request.getParameter("entry") != null) {
            this.weblogAnchor = request.getParameter("entry");
            this.pageType = PERMALINK;
        }
        
        if(request.getParameter("catname") != null) {
            String cat = request.getParameter("catname");
            
            this.weblogCategory = cat;
            this.pageType = ARCHIVE;
        }

        // comments only supported permalinks, so if anchor is null then error
        if(this.weblogAnchor == null) {
    //#OldCommentsRequest.java:179: ?Exception check
    //#    this.weblogAnchor != null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    //#    basic block: bb_28
    //#    assertion: this.weblogAnchor != null
    //#    VN: this.weblogAnchor == null
    //#    Expected: {0}
    //#    Bad: {1}
    //#    Attribs:  Int  Exp in +/-1000  Exp singleton  Bad singleton  Bad overlaps +/-1000  Bad > Exp
            throw new Exception("invalid comments request, no anchor");
        }
    }
    //#OldCommentsRequest.java:182: end of method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest(HttpServletRequest)
    
    
    private boolean isValidDateString(String dateString) {
        return (dateString != null && dateString.length() > 3 && StringUtils.isNumeric(dateString));
    //#OldCommentsRequest.java:186: method: bool org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.isValidDateString(String)
    //#OldCommentsRequest.java:186: Warning: method not available
    //#    -- call on bool org.apache.commons.lang.StringUtils:isNumeric(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
    //#    method: bool isValidDateString(String)
    //#    unanalyzed callee: bool org.apache.commons.lang.StringUtils:isNumeric(String)
    //#input(bool isValidDateString(String)): dateString
    //#output(bool isValidDateString(String)): return_value
    //#post(bool isValidDateString(String)): init'ed(return_value)
    //#OldCommentsRequest.java:186: end of method: bool org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.isValidDateString(String)
    }

    public String getContext() {
        return context;
    //#OldCommentsRequest.java:190: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getContext()
    //#input(String getContext()): this
    //#input(String getContext()): this.context
    //#output(String getContext()): return_value
    //#pre[2] (String getContext()): init'ed(this.context)
    //#post(String getContext()): return_value == this.context
    //#post(String getContext()): init'ed(return_value)
    //#OldCommentsRequest.java:190: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getContext()
    }

    public String getWeblogHandle() {
        return weblogHandle;
    //#OldCommentsRequest.java:194: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogHandle()
    //#input(String getWeblogHandle()): this
    //#input(String getWeblogHandle()): this.weblogHandle
    //#output(String getWeblogHandle()): return_value
    //#pre[2] (String getWeblogHandle()): init'ed(this.weblogHandle)
    //#post(String getWeblogHandle()): return_value == this.weblogHandle
    //#post(String getWeblogHandle()): init'ed(return_value)
    //#OldCommentsRequest.java:194: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogHandle()
    }

    public String getWeblogAnchor() {
        return weblogAnchor;
    //#OldCommentsRequest.java:198: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogAnchor()
    //#input(String getWeblogAnchor()): this
    //#input(String getWeblogAnchor()): this.weblogAnchor
    //#output(String getWeblogAnchor()): return_value
    //#pre[2] (String getWeblogAnchor()): init'ed(this.weblogAnchor)
    //#post(String getWeblogAnchor()): return_value == this.weblogAnchor
    //#post(String getWeblogAnchor()): init'ed(return_value)
    //#OldCommentsRequest.java:198: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogAnchor()
    }

    public String getWeblogPage() {
        return weblogPage;
    //#OldCommentsRequest.java:202: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogPage()
    //#input(String getWeblogPage()): this
    //#input(String getWeblogPage()): this.weblogPage
    //#output(String getWeblogPage()): return_value
    //#pre[2] (String getWeblogPage()): init'ed(this.weblogPage)
    //#post(String getWeblogPage()): return_value == this.weblogPage
    //#post(String getWeblogPage()): init'ed(return_value)
    //#OldCommentsRequest.java:202: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogPage()
    }

    public String getWeblogCategory() {
        return weblogCategory;
    //#OldCommentsRequest.java:206: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogCategory()
    //#input(String getWeblogCategory()): this
    //#input(String getWeblogCategory()): this.weblogCategory
    //#output(String getWeblogCategory()): return_value
    //#pre[2] (String getWeblogCategory()): init'ed(this.weblogCategory)
    //#post(String getWeblogCategory()): return_value == this.weblogCategory
    //#post(String getWeblogCategory()): init'ed(return_value)
    //#OldCommentsRequest.java:206: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogCategory()
    }

    public String getWeblogDate() {
        return weblogDate;
    //#OldCommentsRequest.java:210: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogDate()
    //#input(String getWeblogDate()): this
    //#input(String getWeblogDate()): this.weblogDate
    //#output(String getWeblogDate()): return_value
    //#pre[2] (String getWeblogDate()): init'ed(this.weblogDate)
    //#post(String getWeblogDate()): return_value == this.weblogDate
    //#post(String getWeblogDate()): init'ed(return_value)
    //#OldCommentsRequest.java:210: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getWeblogDate()
    }

    public String getPageType() {
        return pageType;
    //#OldCommentsRequest.java:214: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getPageType()
    //#input(String getPageType()): this
    //#input(String getPageType()): this.pageType
    //#output(String getPageType()): return_value
    //#pre[2] (String getPageType()): init'ed(this.pageType)
    //#post(String getPageType()): return_value == this.pageType
    //#post(String getPageType()): init'ed(return_value)
    //#OldCommentsRequest.java:214: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest.getPageType()
    }
    
}
    //#OldCommentsRequest.java:: end of class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldCommentsRequest
