//# 3 errors, 138 messages
//#
/*
    //#RSDServlet.java:1:1: class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
 * 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.servlets;

import java.io.IOException;
import java.util.HashMap;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.config.WebloggerRuntimeConfig;
import org.apache.roller.weblogger.pojos.StaticTemplate;
import org.apache.roller.weblogger.pojos.Template;
import org.apache.roller.weblogger.pojos.Weblog;
import org.apache.roller.weblogger.ui.rendering.util.WeblogRequest;
import org.apache.roller.weblogger.ui.rendering.util.ModDateHeaderUtil;
import org.apache.roller.weblogger.ui.rendering.Renderer;
import org.apache.roller.weblogger.ui.rendering.RendererManager;
import org.apache.roller.weblogger.util.cache.CachedContent;


/**
 * Generates simple rsd feed for a given weblog.
 *
 * This servlet supports 304 If-Modified-Since checking, but does not do any
 * level of content caching.
 *
 * @web.servlet name="RSDServlet" load-on-startup="7"
 * @web.servlet-mapping url-pattern="/roller-ui/rendering/rsd/*"
 */
public class RSDServlet extends HttpServlet {
    //#RSDServlet.java:51: method: void org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet()
    //#input(void org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet()): this
    //#RSDServlet.java:51: end of method: void org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet()
    
    private static Log log = LogFactory.getLog(RSDServlet.class);
    //#RSDServlet.java:53: method: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init
    //#RSDServlet.java:53: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/servlets/RSDServlet]
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): __Dispatch_Table.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): __Dispatch_Table.init(Ljavax/servlet/ServletConfig;)V
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): log
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/servlets/RSDServlet] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): __Dispatch_Table.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V == &doGet
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): __Dispatch_Table.init(Ljavax/servlet/ServletConfig;)V == &init
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init): init'ed(log)
    //#RSDServlet.java:53: end of method: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet__static_init
    
    
    /**
     * Init method for this servlet
     */
    public void init(ServletConfig servletConfig) throws ServletException {
        
        super.init(servletConfig);
    //#RSDServlet.java:61: method: void org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.init(ServletConfig)
    //#input(void init(ServletConfig)): log
    //#input(void init(ServletConfig)): servletConfig
    //#input(void init(ServletConfig)): this
    //#pre[1] (void init(ServletConfig)): log != null
        
        log.info("Initializing RSDServlet");
    //#RSDServlet.java:63: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void init(ServletConfig)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
    }
    //#RSDServlet.java:64: end of method: void org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.init(ServletConfig)
    
    
    /**
     * Handle GET requests for weblog pages.
     */
    public void doGet(HttpServletRequest request, HttpServletResponse response) 
            throws ServletException, IOException {
        
        log.debug("Entering");
    //#RSDServlet.java:73: method: void org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.doGet(HttpServletRequest, HttpServletResponse)
    //#RSDServlet.java:73: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "Error looking up weblog "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "NOT MODIFIED "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "Unable to lookup weblog: "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "handle = "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "last mod date (trucated to seconds) = "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "locale = "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "not a weblog request, "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "parsing path "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "pathInfo = "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "since date = "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): log
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.log
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogCommentRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogCommentRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogCommentRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPageRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPageRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPageRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewResourceRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewResourceRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewResourceRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogCommentRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogPageRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewResourceRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogResourceRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogSearchRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[others]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.java.lang.Boolean.TRUE
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.log
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogResourceRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogResourceRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogResourceRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogSearchRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogSearchRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogSearchRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): request
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): response
    //#pre[1] (void doGet(HttpServletRequest, HttpServletResponse)): log != null
    //#pre[2] (void doGet(HttpServletRequest, HttpServletResponse)): (soft) org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.log != null
    //#pre[3] (void doGet(HttpServletRequest, HttpServletResponse)): (soft) request != null
    //#pre[4] (void doGet(HttpServletRequest, HttpServletResponse)): (soft) response != null
    //#presumption(void doGet(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletResponse:getOutputStream(...)@157 != null
    //#presumption(void doGet(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.pojos.Weblog:getLastModified(...)@100 != null
    //#presumption(void doGet(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.ui.rendering.RendererManager:getRenderer(...)@123 != null
    //#presumption(void doGet(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.util.cache.CachedContent:getContent(...).length@156 <= 4_294_967_295
    //#presumption(void doGet(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.util.cache.CachedContent:getContent(...)@156 != null
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.util.ParsedRequest
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getPathInfo
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:endsWith
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:isDebugEnabled
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getRequestURL
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.WebloggerException
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getUserPrincipal
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.security.Principal:getName
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.business.Weblogger:getUserManager
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.business.UserManager:getWebsiteByHandle
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getDateHeader
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletResponse:setStatus
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletResponse:setDateHeader
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.pojos.Weblog:getLastModified(...)@99: Addr_Set{null}, Inverse{null}
        
        Weblog weblog = null;
    //#RSDServlet.java:75: Warning: unused assignment
    //#    unused assignment into weblog
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    Attribs:  Uncertain
        
        WeblogRequest weblogRequest = null;
    //#RSDServlet.java:77: Warning: unused assignment
    //#    unused assignment into weblogRequest
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    Attribs:  Uncertain
        try {
            weblogRequest = new WeblogRequest(request);
            
            // now make sure the specified weblog really exists
            weblog = weblogRequest.getWeblog();
    //#RSDServlet.java:82: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.getWeblog: (soft) init'ed(this.weblogHandle)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_2
    //#    assertion: (soft) init'ed(org.apache.roller.weblogger.ui.rendering.util.WeblogRequest.Param_0.weblogHandle)
    //#    callee: Weblog org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.getWeblog()
    //#    callee assertion: (soft) init'ed(this.weblogHandle)
    //#    callee file: WeblogRequest.java
    //#    callee precondition index: [8]
    //#    callee srcpos: 187
    //#    VN: org.apache.roller.weblogger.ui.rendering.util.WeblogRequest.Param_0.weblogHandle
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Soft  Bad only invalid
            if(weblog == null) {
                throw new WebloggerException("Unable to lookup weblog: "+
    //#RSDServlet.java:84: ?conditional throw
    //#    weblog != null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_2
    //#    assertion: weblog != null
    //#    VN: getWeblog(...) == null
    //#    Expected: {0}
    //#    Bad: {1}
    //#    Attribs:  Int  Exp in +/-1000  Exp singleton  Bad singleton  Bad overlaps +/-1000  Bad > Exp
                        weblogRequest.getWeblogHandle());
            }
            
        } catch(Exception e) {
            // invalid rsd request format or weblog doesn't exist
            log.debug("error creating weblog request", e);
    //#RSDServlet.java:90: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object, Throwable)
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
        
        

        // Respond with 304 Not Modified if it is not modified.
        long lastModified = System.currentTimeMillis();
        if (weblog.getLastModified() != null) {
    //#RSDServlet.java:99: Warning: method not available
    //#    -- call on Date org.apache.roller.weblogger.pojos.Weblog:getLastModified()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Date org.apache.roller.weblogger.pojos.Weblog:getLastModified()
            lastModified = weblog.getLastModified().getTime();
    //#RSDServlet.java:100: Warning: method not available
    //#    -- call on Date org.apache.roller.weblogger.pojos.Weblog:getLastModified()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Date org.apache.roller.weblogger.pojos.Weblog:getLastModified()
        }
        if (ModDateHeaderUtil.respondIfNotModified(request,response,lastModified)) {
    //#RSDServlet.java:102: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.respondIfNotModified: (soft) lastModifiedTimeMillis%1_000 - lastModifiedTimeMillis in -18_446_744_073_709_551_615..9_223_372_036_854_775_808
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_8
    //#    assertion: (soft) lastModified - lastModified%1_000 in -9_223_372_036_854_775_808..18_446_744_073_709_551_615
    //#    callee: bool org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.respondIfNotModified(HttpServletRequest, HttpServletResponse, long)
    //#    callee assertion: (soft) lastModifiedTimeMillis%1_000 - lastModifiedTimeMillis in -18_446_744_073_709_551_615..9_223_372_036_854_775_808
    //#    callee file: ModDateHeaderUtil.java
    //#    callee precondition index: [3]
    //#    callee srcpos: 53
    //#    VN: -(lastModified - lastModified%1_000)
    //#    Expected: {-18_446_744_073_709_551_615..9_223_372_036_854_775_808}
    //#    Bad: {-18_446_744_073_709_552_614..-18_446_744_073_709_551_616, 9_223_372_036_854_775_809..9_223_372_036_854_776_807}
    //#    Attribs:  Int  Soft  Bad < Exp  Bad > Exp
            return;
        }

        // set last-modified date
        ModDateHeaderUtil.setLastModifiedHeader(response,lastModified);

        // set the content type
        response.setContentType("application/rsd+xml; charset=utf-8");
        
        // populate the model
        HashMap model = new HashMap();
        model.put("website", weblog);
        model.put("absBaseURL", WebloggerRuntimeConfig.getAbsoluteContextURL());
    //#RSDServlet.java:115: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getAbsoluteContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getAbsoluteContextURL()

        
        // lookup Renderer we are going to use
        Renderer renderer = null;
    //#RSDServlet.java:119: Warning: unused assignment
    //#    unused assignment into renderer
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    Attribs:  Uncertain
        try {
            log.debug("Looking up renderer");
    //#RSDServlet.java:121: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
            Template template = new StaticTemplate("templates/weblog/rsd.vm", "velocity");
    //#RSDServlet.java:122: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.StaticTemplate(String, String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.StaticTemplate(String, String)
            renderer = RendererManager.getRenderer(template);
    //#RSDServlet.java:123: Warning: method not available
    //#    -- call on Renderer org.apache.roller.weblogger.ui.rendering.RendererManager:getRenderer(Template)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Renderer org.apache.roller.weblogger.ui.rendering.RendererManager:getRenderer(Template)
        } catch(Exception e) {
            // nobody wants to render my content :(
            log.error("Couldn't find renderer for rsd template", e);
    //#RSDServlet.java:126: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            
            if(!response.isCommitted()) response.reset();
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
        
        // render content
        CachedContent rendererOutput = new CachedContent(4096);
    //#RSDServlet.java:134: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CachedContent(int)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CachedContent(int)
        try {
            log.debug("Doing rendering");
    //#RSDServlet.java:136: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
            renderer.render(model, rendererOutput.getCachedWriter());
    //#RSDServlet.java:137: Warning: method not available
    //#    -- call on PrintWriter org.apache.roller.weblogger.util.cache.CachedContent:getCachedWriter()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: PrintWriter org.apache.roller.weblogger.util.cache.CachedContent:getCachedWriter()
    //#RSDServlet.java:137: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.rendering.Renderer:render(Map, Writer)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.rendering.Renderer:render(Map, Writer)
            
            // flush rendered output and close
            rendererOutput.flush();
    //#RSDServlet.java:140: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CachedContent:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CachedContent:flush()
            rendererOutput.close();
    //#RSDServlet.java:141: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CachedContent:close()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CachedContent:close()
        } catch(Exception e) {
            // bummer, error during rendering
            log.error("Error during rendering for rsd template", e);
    //#RSDServlet.java:144: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            
            if(!response.isCommitted()) response.reset();
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
        
        
        // post rendering process
        
        // flush rendered content to response
        log.debug("Flushing response output");
    //#RSDServlet.java:155: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
        response.setContentLength(rendererOutput.getContent().length);
    //#RSDServlet.java:156: Warning: method not available
    //#    -- call on byte[] org.apache.roller.weblogger.util.cache.CachedContent:getContent()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: byte[] org.apache.roller.weblogger.util.cache.CachedContent:getContent()
        response.getOutputStream().write(rendererOutput.getContent());
    //#RSDServlet.java:157: Warning: method not available
    //#    -- call on byte[] org.apache.roller.weblogger.util.cache.CachedContent:getContent()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: byte[] org.apache.roller.weblogger.util.cache.CachedContent:getContent()
        
        log.debug("Exiting");
    //#RSDServlet.java:159: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
    }
    //#RSDServlet.java:160: end of method: void org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet.doGet(HttpServletRequest, HttpServletResponse)
    
}
    //#RSDServlet.java:: end of class: org.apache.roller.weblogger.ui.rendering.servlets.RSDServlet
