//# 0 errors, 137 messages
//#
/*
    //#feedaction.java:1:1: class: net.sourceforge.pebble.web.action.FeedAction
    //#feedaction.java:1:1: method: net.sourceforge.pebble.web.action.FeedAction.net.sourceforge.pebble.web.action.FeedAction__static_init
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.web.action;

import net.sourceforge.pebble.Constants;
import net.sourceforge.pebble.comparator.BlogEntryComparator;
import net.sourceforge.pebble.domain.*;
import net.sourceforge.pebble.web.view.NotModifiedView;
import net.sourceforge.pebble.web.view.View;
import net.sourceforge.pebble.web.view.impl.AtomView;
import net.sourceforge.pebble.web.view.impl.RdfView;
import net.sourceforge.pebble.web.view.impl.RssView;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * Gets the RSS for a blog.
 *
 * @author    Simon Brown
 */
public class FeedAction extends Action {
    //#feedaction.java:54: method: void net.sourceforge.pebble.web.action.FeedAction.net.sourceforge.pebble.web.action.FeedAction()
    //#input(void net.sourceforge.pebble.web.action.FeedAction()): this
    //#feedaction.java:54: end of method: void net.sourceforge.pebble.web.action.FeedAction.net.sourceforge.pebble.web.action.FeedAction()

  /**
   * Peforms the processing associated with this action.
   *
   * @param request  the HttpServletRequest instance
   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
    //#feedaction.java:64: method: View net.sourceforge.pebble.web.action.FeedAction.process(HttpServletRequest, HttpServletResponse)
    //#input(View process(HttpServletRequest, HttpServletResponse)): __Descendant_Table[net/sourceforge/pebble/web/action/FeedAction]
    //#input(View process(HttpServletRequest, HttpServletResponse)): __Descendant_Table[others]
    //#input(View process(HttpServletRequest, HttpServletResponse)): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(View process(HttpServletRequest, HttpServletResponse)): java.util.Locale.ENGLISH
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[net/sourceforge/pebble/web/model/Model]
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[others]
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.get(Ljava/lang/String;)Ljava/lang/Object;
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.put(Ljava/lang/String;Ljava/lang/Object;)V
    //#input(View process(HttpServletRequest, HttpServletResponse)): request
    //#input(View process(HttpServletRequest, HttpServletResponse)): response
    //#input(View process(HttpServletRequest, HttpServletResponse)): this
    //#input(View process(HttpServletRequest, HttpServletResponse)): this.__Tag
    //#input(View process(HttpServletRequest, HttpServletResponse)): this.model
    //#input(View process(HttpServletRequest, HttpServletResponse)): this.model.__Tag
    //#input(View process(HttpServletRequest, HttpServletResponse)): this.model.data
    //#output(View process(HttpServletRequest, HttpServletResponse)): new AtomView(process#10) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new AtomView(process#10).__Tag
    //#output(View process(HttpServletRequest, HttpServletResponse)): new NotModifiedView(process#5) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new NotModifiedView(process#7) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new RdfView(process#11) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new RssView(process#12) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): return_value
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new AtomView(process#10)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new NotModifiedView(process#5)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new NotModifiedView(process#7)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new RdfView(process#11)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new RssView(process#12)
    //#pre[1] (View process(HttpServletRequest, HttpServletResponse)): request != null
    //#pre[2] (View process(HttpServletRequest, HttpServletResponse)): response != null
    //#pre[4] (View process(HttpServletRequest, HttpServletResponse)): this.__Tag == net/sourceforge/pebble/web/action/FeedAction
    //#pre[5] (View process(HttpServletRequest, HttpServletResponse)): this.model != null
    //#pre[6] (View process(HttpServletRequest, HttpServletResponse)): this.model.__Tag == net/sourceforge/pebble/web/model/Model
    //#pre[7] (View process(HttpServletRequest, HttpServletResponse)): this.model.data != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): java.util.HashMap:get(...)@63 != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): java.util.Iterator:next(...)@116 != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): init'ed(java.util.Locale.ENGLISH)
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): net.sourceforge.pebble.domain.AbstractBlog:getLastModified(...)@79 != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): net.sourceforge.pebble.domain.AbstractBlog:getRecentBlogEntries(...)@110 != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(...)@101 != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(...)@104 != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(...)@107 != null
    //#presumption(View process(HttpServletRequest, HttpServletResponse)): net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(...)@98 != null
    //#post(View process(HttpServletRequest, HttpServletResponse)): return_value in Addr_Set{&new NotModifiedView(process#5),&new NotModifiedView(process#7),&new AtomView(process#10),&new RdfView(process#11),&new RssView(process#12)}
    //#post(View process(HttpServletRequest, HttpServletResponse)): new AtomView(process#10) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new AtomView(process#10).__Tag == net/sourceforge/pebble/web/view/impl/AtomView
    //#post(View process(HttpServletRequest, HttpServletResponse)): new NotModifiedView(process#5) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new NotModifiedView(process#7) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new RdfView(process#11) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new RssView(process#12) num objects <= 1
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.Tag
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:getCategory
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.HashMap:get
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.HashMap:put
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.web.view.impl.AbstractFeedView
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.web.view.View
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@83: {0}, {1}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@85: {0}, {1}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.lang.String:equalsIgnoreCase(...)@135: {0}, {1}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.lang.String:equalsIgnoreCase(...)@137: {0}, {1}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.lang.String:equalsIgnoreCase(...)@73: {0}, {1}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.util.Iterator:hasNext(...)@115: {1}, {0}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletRequest:getHeader(...)@70: Addr_Set{null}, Inverse{null}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletRequest:getHeader(...)@71: Addr_Set{null}, Inverse{null}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletRequest:getParameter(...)@186: Addr_Set{null}, Inverse{null}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletRequest:getParameter(...)@65: Addr_Set{null}, Inverse{null}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): net.sourceforge.pebble.domain.BlogEntry:isAggregated(...)@118: {0}, {1}
    String flavor = request.getParameter("flavor");

    SimpleDateFormat httpFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z");
    httpFormat.setTimeZone(TimeZone.getTimeZone("GMT"));

    String ifModifiedSince = request.getHeader("If-Modified-Since");
    String ifNoneMatch = request.getHeader("If-None-Match");

    if (flavor != null && flavor.equalsIgnoreCase("atom")) {
      response.setContentType("application/atom+xml; charset=" + blog.getCharacterEncoding());
    //#feedaction.java:74: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.AbstractBlog:getCharacterEncoding()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.AbstractBlog:getCharacterEncoding()
    } else {
      response.setContentType("application/xml; charset=" + blog.getCharacterEncoding());
    //#feedaction.java:76: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.AbstractBlog:getCharacterEncoding()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.AbstractBlog:getCharacterEncoding()
    }

    Date lastModified = blog.getLastModified();
    //#feedaction.java:79: Warning: method not available
    //#    -- call on Date net.sourceforge.pebble.domain.AbstractBlog:getLastModified()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Date net.sourceforge.pebble.domain.AbstractBlog:getLastModified()
    response.setDateHeader("Last-Modified", lastModified.getTime());
    response.setHeader("ETag", "\"" + httpFormat.format(lastModified) + "\"");

    if (ifModifiedSince != null && ifModifiedSince.equals(httpFormat.format(lastModified))) {
      return new NotModifiedView();
    //#feedaction.java:84: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.NotModifiedView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.NotModifiedView()
    } else if (ifNoneMatch != null && ifNoneMatch.equals("\"" + httpFormat.format(lastModified) + "\"")) {
      return new NotModifiedView();
    //#feedaction.java:86: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.NotModifiedView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.NotModifiedView()
    } else {
      List blogEntries;
      String s = request.getParameter("includeAggregatedContent");
      boolean includeAggregatedContent = (s == null || s.equalsIgnoreCase("true"));

      if (blog instanceof Blog) {
        Tag tag = getTag((Blog)blog, request);
        Category category = getCategory((Blog)blog, request);
        String author = getAuthor(request);

        if (tag != null) {
          blogEntries = ((Blog)blog).getRecentPublishedBlogEntries(tag);
    //#feedaction.java:98: Warning: method not available
    //#    -- call on List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(Tag)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(Tag)
          getModel().put("tag", tag);
        } else if (category != null) {
          blogEntries = ((Blog)blog).getRecentPublishedBlogEntries(category);
    //#feedaction.java:101: Warning: method not available
    //#    -- call on List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(Category)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(Category)
          getModel().put("category", category);
        } else if (author != null) {
          blogEntries = ((Blog)blog).getRecentPublishedBlogEntries(author);
    //#feedaction.java:104: Warning: method not available
    //#    -- call on List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries(String)
          getModel().put("author", author);
        } else {
          blogEntries = ((Blog)blog).getRecentPublishedBlogEntries();
    //#feedaction.java:107: Warning: method not available
    //#    -- call on List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: List net.sourceforge.pebble.domain.Blog:getRecentPublishedBlogEntries()
        }
      } else {
        blogEntries = blog.getRecentBlogEntries();
    //#feedaction.java:110: Warning: method not available
    //#    -- call on List net.sourceforge.pebble.domain.AbstractBlog:getRecentBlogEntries()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: List net.sourceforge.pebble.domain.AbstractBlog:getRecentBlogEntries()
      }

      List blogEntriesForFeed = new ArrayList();
      Iterator it = blogEntries.iterator();
      while (it.hasNext()) {
        BlogEntry entry = (BlogEntry)it.next();

        if (!includeAggregatedContent && entry.isAggregated()) {
    //#feedaction.java:118: Warning: method not available
    //#    -- call on bool net.sourceforge.pebble.domain.BlogEntry:isAggregated()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: bool net.sourceforge.pebble.domain.BlogEntry:isAggregated()
          continue;
        } else {
          blogEntriesForFeed.add(entry);
        }
      }

      Collections.sort(blogEntriesForFeed, new BlogEntryComparator());
    //#feedaction.java:125: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.comparator.BlogEntryComparator()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void net.sourceforge.pebble.comparator.BlogEntryComparator()

      getModel().put(Constants.BLOG_ENTRIES, blogEntriesForFeed);

      // set the locale of this feed request to be English
      javax.servlet.jsp.jstl.core.Config.set(
          request,
          javax.servlet.jsp.jstl.core.Config.FMT_LOCALE,
          Locale.ENGLISH);

      if (flavor != null && flavor.equalsIgnoreCase("atom")) {
        return new AtomView();
      } else if (flavor != null && flavor.equalsIgnoreCase("rdf")) {
        return new RdfView();
    //#feedaction.java:138: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.impl.RdfView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.impl.RdfView()
      } else {
        return new RssView();
    //#feedaction.java:140: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.impl.RssView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: View process(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.impl.RssView()
    //#feedaction.java:140: end of method: View net.sourceforge.pebble.web.action.FeedAction.process(HttpServletRequest, HttpServletResponse)
      }
    }
  }

  /**
   * Helper method to find a named tag from a request parameter.
   *
   * @param blog      the blog for which the feed is for
   * @param request   the HTTP request containing the tag parameter
   * @return  a Tag instance, or null if the tag isn't
   *          specified or can't be found
   */
  private Tag getTag(Blog blog, HttpServletRequest request) {
    String tag = request.getParameter("tag");
    //#feedaction.java:154: method: Tag net.sourceforge.pebble.web.action.FeedAction.getTag(Blog, HttpServletRequest)
    //#input(Tag getTag(Blog, HttpServletRequest)): blog
    //#input(Tag getTag(Blog, HttpServletRequest)): request
    //#output(Tag getTag(Blog, HttpServletRequest)): new Tag(getTag#1) num objects
    //#output(Tag getTag(Blog, HttpServletRequest)): return_value
    //#new obj(Tag getTag(Blog, HttpServletRequest)): new Tag(getTag#1)
    //#pre[2] (Tag getTag(Blog, HttpServletRequest)): request != null
    //#post(Tag getTag(Blog, HttpServletRequest)): return_value == One-of{&new Tag(getTag#1), null}
    //#post(Tag getTag(Blog, HttpServletRequest)): return_value in Addr_Set{null,&new Tag(getTag#1)}
    //#post(Tag getTag(Blog, HttpServletRequest)): new Tag(getTag#1) num objects <= 1
    //#test_vector(Tag getTag(Blog, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@154: Addr_Set{null}, Inverse{null}
    if (tag != null) {
      return new Tag(tag, blog);
    //#feedaction.java:156: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Tag(String, Blog)
    //#    severity: SUPPRESSED
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: Tag getTag(Blog, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Tag(String, Blog)
    } else {
      return null;
    //#feedaction.java:158: end of method: Tag net.sourceforge.pebble.web.action.FeedAction.getTag(Blog, HttpServletRequest)
    }
  }

  /**
   * Helper method to find a named category from a request parameter.
   *
   * @param blog      the blog for which the feed is for
   * @param request   the HTTP request containing the category parameter
   * @return  a Category instance, or null if the category isn't
   *          specified or can't be found
   */
  private Category getCategory(Blog blog, HttpServletRequest request) {
    String categoryId = request.getParameter("category");
    //#feedaction.java:171: method: Category net.sourceforge.pebble.web.action.FeedAction.getCategory(Blog, HttpServletRequest)
    //#input(Category getCategory(Blog, HttpServletRequest)): blog
    //#input(Category getCategory(Blog, HttpServletRequest)): request
    //#output(Category getCategory(Blog, HttpServletRequest)): return_value
    //#pre[2] (Category getCategory(Blog, HttpServletRequest)): request != null
    //#pre[1] (Category getCategory(Blog, HttpServletRequest)): (soft) blog != null
    //#post(Category getCategory(Blog, HttpServletRequest)): init'ed(return_value)
    //#test_vector(Category getCategory(Blog, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@171: Addr_Set{null}, Inverse{null}
    if (categoryId != null) {
      return blog.getCategory(categoryId);
    //#feedaction.java:173: Warning: method not available
    //#    -- call on Category net.sourceforge.pebble.domain.Blog:getCategory(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.FeedAction
    //#    method: Category getCategory(Blog, HttpServletRequest)
    //#    unanalyzed callee: Category net.sourceforge.pebble.domain.Blog:getCategory(String)
    } else {
      return null;
    //#feedaction.java:175: end of method: Category net.sourceforge.pebble.web.action.FeedAction.getCategory(Blog, HttpServletRequest)
    }
  }

  /**
   * Helper method to find a named author from a request parameter.
   *
   * @param request   the HTTP request containing the tag parameter
   * @return  a String username, or null if the author isn't specified
   */
  private String getAuthor(HttpServletRequest request) {
    return request.getParameter("author");
    //#feedaction.java:186: method: String net.sourceforge.pebble.web.action.FeedAction.getAuthor(HttpServletRequest)
    //#input(String getAuthor(HttpServletRequest)): request
    //#output(String getAuthor(HttpServletRequest)): return_value
    //#pre[1] (String getAuthor(HttpServletRequest)): request != null
    //#post(String getAuthor(HttpServletRequest)): init'ed(return_value)
    //#feedaction.java:186: end of method: String net.sourceforge.pebble.web.action.FeedAction.getAuthor(HttpServletRequest)
  }

}
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Descendant_Table[net/sourceforge/pebble/web/action/FeedAction]
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getAuthor(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getCategory(Lnet/sourceforge/pebble/domain/Blog;Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/Category;
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getLocalizedString(Ljava/lang/String;)Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getTag(Lnet/sourceforge/pebble/domain/Blog;Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/Tag;
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lnet/sourceforge/pebble/web/view/View;
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.setModel(Lnet/sourceforge/pebble/web/model/Model;)V
    //#output(net.sourceforge.pebble.web.action.FeedAction__static_init): net/sourceforge/pebble/web/action/Action.__Descendant_Table[net/sourceforge/pebble/web/action/FeedAction]
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Descendant_Table[net/sourceforge/pebble/web/action/FeedAction] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): net/sourceforge/pebble/web/action/Action.__Descendant_Table[net/sourceforge/pebble/web/action/FeedAction] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getAuthor(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &getAuthor
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getCategory(Lnet/sourceforge/pebble/domain/Blog;Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/Category; == &getCategory
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getLocalizedString(Ljava/lang/String;)Ljava/lang/String; == &net/sourceforge/pebble/web/action/Action.getLocalizedString
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model; == &net/sourceforge/pebble/web/action/Action.getModel
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.getTag(Lnet/sourceforge/pebble/domain/Blog;Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/Tag; == &getTag
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lnet/sourceforge/pebble/web/view/View; == &process
    //#post(net.sourceforge.pebble.web.action.FeedAction__static_init): __Dispatch_Table.setModel(Lnet/sourceforge/pebble/web/model/Model;)V == &net/sourceforge/pebble/web/action/Action.setModel
    //#feedaction.java:: end of method: net.sourceforge.pebble.web.action.FeedAction.net.sourceforge.pebble.web.action.FeedAction__static_init
    //#feedaction.java:: end of class: net.sourceforge.pebble.web.action.FeedAction
