//# 1 errors, 293 messages
//#
package net.sourceforge.pebble.web.action;
    //#abstractcommentaction.java:1:1: class: net.sourceforge.pebble.web.action.AbstractCommentAction

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sourceforge.pebble.domain.Blog;
import net.sourceforge.pebble.domain.BlogEntry;
import net.sourceforge.pebble.domain.BlogService;
import net.sourceforge.pebble.domain.BlogServiceException;
import net.sourceforge.pebble.domain.Comment;
import net.sourceforge.pebble.security.PebbleUserDetails;
import net.sourceforge.pebble.util.CookieUtils;
import net.sourceforge.pebble.util.MailUtils;
import net.sourceforge.pebble.util.SecurityUtils;
import net.sourceforge.pebble.util.StringUtils;
import net.sourceforge.pebble.web.validation.ValidationContext;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Adds a comment to an existing blog entry.
 *
 * @author    Simon Brown
 */
public abstract class AbstractCommentAction extends Action {
    //#abstractcommentaction.java:31: method: void net.sourceforge.pebble.web.action.AbstractCommentAction.net.sourceforge.pebble.web.action.AbstractCommentAction()
    //#input(void net.sourceforge.pebble.web.action.AbstractCommentAction()): this
    //#abstractcommentaction.java:31: end of method: void net.sourceforge.pebble.web.action.AbstractCommentAction.net.sourceforge.pebble.web.action.AbstractCommentAction()

  private static final Log log = LogFactory.getLog(AbstractCommentAction.class);
    //#abstractcommentaction.java:33: method: net.sourceforge.pebble.web.action.AbstractCommentAction.net.sourceforge.pebble.web.action.AbstractCommentAction__static_init
    //#abstractcommentaction.java:33: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: net.sourceforge.pebble.web.action.AbstractCommentAction__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Descendant_Table[net/sourceforge/pebble/web/action/AbstractCommentAction]
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.createBlankComment(Lnet/sourceforge/pebble/domain/Blog;Lnet/sourceforge/pebble/domain/BlogEntry;Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/Comment;
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.createComment(Ljavax/servlet/http/HttpServletRequest;Lnet/sourceforge/pebble/domain/BlogEntry;)Lnet/sourceforge/pebble/domain/Comment;
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.getLocalizedString(Ljava/lang/String;)Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__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.AbstractCommentAction__static_init): __Dispatch_Table.saveComment(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lnet/sourceforge/pebble/domain/BlogEntry;Lnet/sourceforge/pebble/domain/Comment;)V
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.setModel(Lnet/sourceforge/pebble/web/model/Model;)V
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.validateComment(Lnet/sourceforge/pebble/domain/Comment;)Lnet/sourceforge/pebble/web/validation/ValidationContext;
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): log
    //#output(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): net/sourceforge/pebble/web/action/Action.__Descendant_Table[net/sourceforge/pebble/web/action/AbstractCommentAction]
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Descendant_Table[net/sourceforge/pebble/web/action/AbstractCommentAction] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): net/sourceforge/pebble/web/action/Action.__Descendant_Table[net/sourceforge/pebble/web/action/AbstractCommentAction] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.createBlankComment(Lnet/sourceforge/pebble/domain/Blog;Lnet/sourceforge/pebble/domain/BlogEntry;Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/Comment; == &createBlankComment
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.createComment(Ljavax/servlet/http/HttpServletRequest;Lnet/sourceforge/pebble/domain/BlogEntry;)Lnet/sourceforge/pebble/domain/Comment; == &createComment
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; == &encode
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.getLocalizedString(Ljava/lang/String;)Ljava/lang/String; == &net/sourceforge/pebble/web/action/Action.getLocalizedString
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model; == &net/sourceforge/pebble/web/action/Action.getModel
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lnet/sourceforge/pebble/web/view/View; == &net/sourceforge/pebble/web/action/Action.process
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.saveComment(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lnet/sourceforge/pebble/domain/BlogEntry;Lnet/sourceforge/pebble/domain/Comment;)V == &saveComment
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.setModel(Lnet/sourceforge/pebble/web/model/Model;)V == &net/sourceforge/pebble/web/action/Action.setModel
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): __Dispatch_Table.validateComment(Lnet/sourceforge/pebble/domain/Comment;)Lnet/sourceforge/pebble/web/validation/ValidationContext; == &validateComment
    //#post(net.sourceforge.pebble.web.action.AbstractCommentAction__static_init): init'ed(log)
    //#abstractcommentaction.java:33: end of method: net.sourceforge.pebble.web.action.AbstractCommentAction.net.sourceforge.pebble.web.action.AbstractCommentAction__static_init

  protected Comment createComment(HttpServletRequest request, BlogEntry blogEntry) {
    String author = StringUtils.transformHTML(request.getParameter("author"));
    //#abstractcommentaction.java:36: method: Comment net.sourceforge.pebble.web.action.AbstractCommentAction.createComment(HttpServletRequest, BlogEntry)
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): blogEntry
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).__Tag
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).configuration
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/PebbleContext.__Descendant_Table[net/sourceforge/pebble/PebbleContext]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/PebbleContext.__Dispatch_Table.getConfiguration()Lnet/sourceforge/pebble/Configuration;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/PebbleContext.instance
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Descendant_Table[net/sourceforge/pebble/security/DefaultSecurityRealm]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Descendant_Table[others]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Dispatch_Table.getFileForRealm()Ljava/io/File;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Dispatch_Table.getFileForUser(Ljava/lang/String;)Ljava/io/File;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Dispatch_Table.getUser(Ljava/lang/String;)Lnet/sourceforge/pebble/security/PebbleUserDetails;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/PebbleUserDetails.__Descendant_Table[net/sourceforge/pebble/security/PebbleUserDetails]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/PebbleUserDetails.__Descendant_Table[others]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getEmailAddress()Ljava/lang/String;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getUsername()Ljava/lang/String;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getWebsite()Ljava/lang/String;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/SecurityRealm.__Descendant_Table[net/sourceforge/pebble/security/DefaultSecurityRealm]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/SecurityRealm.__Descendant_Table[net/sourceforge/pebble/security/SecurityRealm]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/SecurityRealm.__Descendant_Table[others]
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/security/SecurityRealm.__Dispatch_Table.getUser(Ljava/lang/String;)Lnet/sourceforge/pebble/security/PebbleUserDetails;
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): net/sourceforge/pebble/util/SecurityUtils.log
    //#input(Comment createComment(HttpServletRequest, BlogEntry)): request
    //#output(Comment createComment(HttpServletRequest, BlogEntry)): return_value
    //#pre[1] (Comment createComment(HttpServletRequest, BlogEntry)): blogEntry != null
    //#pre[3] (Comment createComment(HttpServletRequest, BlogEntry)): request != null
    //#pre[2] (Comment createComment(HttpServletRequest, BlogEntry)): (soft) net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).configuration != null
    //#presumption(Comment createComment(HttpServletRequest, BlogEntry)): net.sourceforge.pebble.domain.BlogEntry:createComment(...)@43 != null
    //#presumption(Comment createComment(HttpServletRequest, BlogEntry)): net.sourceforge.pebble.domain.BlogEntry:getBlog(...)@54 != null
    //#post(Comment createComment(HttpServletRequest, BlogEntry)): (soft) return_value != null
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:org.acegisecurity.context.SecurityContextHolder:getContext
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:org.acegisecurity.context.SecurityContext:getAuthentication
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:org.acegisecurity.Authentication:getName
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:net.sourceforge.pebble.Configuration:getSecurityRealm
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:getUser
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:net.sourceforge.pebble.Configuration:getDataDirectory
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.io.File
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:getFileForUser
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Properties
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Properties:load
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.io.FileInputStream:close
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Properties:getProperty
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Properties:keySet
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Set:iterator
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.HashSet
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:org.acegisecurity.GrantedAuthorityImpl
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Set:add
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.util.Set:toArray
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:net.sourceforge.pebble.PebbleException
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:valueOf
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(Comment createComment(HttpServletRequest, BlogEntry)): Effects-of-calling:java.lang.StringBuffer:toString
    //#test_vector(Comment createComment(HttpServletRequest, BlogEntry)): java.lang.String:equals(...)@51: {1}, {0}
    //#test_vector(Comment createComment(HttpServletRequest, BlogEntry)): java.lang.String:length(...)@62: {0}, {1..4_294_967_295}
    //#test_vector(Comment createComment(HttpServletRequest, BlogEntry)): javax.servlet.http.HttpServletRequest:getParameter(...)@61: Addr_Set{null}, Inverse{null}
    //#test_vector(Comment createComment(HttpServletRequest, BlogEntry)): net.sourceforge.pebble.domain.BlogEntry:getComment(...)@64: Addr_Set{null}, Inverse{null}
    //#test_vector(Comment createComment(HttpServletRequest, BlogEntry)): user.website: Addr_Set{null}, Inverse{null}
    String email = request.getParameter("email");
    String website = request.getParameter("website");
    String ipAddress = request.getRemoteAddr();
    String title = StringUtils.transformHTML(request.getParameter("title"));
    String body = request.getParameter("commentBody");

    Comment comment = blogEntry.createComment(title, body, author, email, website, ipAddress);
    //#abstractcommentaction.java:43: Warning: method not available
    //#    -- call on Comment net.sourceforge.pebble.domain.BlogEntry:createComment(String, String, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: Comment net.sourceforge.pebble.domain.BlogEntry:createComment(String, String, String, String, String, String)

    // if the user is authenticated, overwrite the author information
    if (SecurityUtils.isUserAuthenticated()) {
      PebbleUserDetails user = SecurityUtils.getUserDetails();
      if (user != null) {
        comment.setAuthor(user.getName());
    //#abstractcommentaction.java:49: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setAuthor(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setAuthor(String)
        comment.setEmail(user.getEmailAddress());
    //#abstractcommentaction.java:50: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setEmail(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setEmail(String)
        if (user.getWebsite() != null && !user.getWebsite().equals("")) {
          comment.setWebsite(user.getWebsite());
    //#abstractcommentaction.java:52: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setWebsite(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setWebsite(String)
        } else {
          comment.setWebsite(blogEntry.getBlog().getUrl() + "authors/" + user.getUsername() + "/");
    //#abstractcommentaction.java:54: Warning: method not available
    //#    -- call on Blog net.sourceforge.pebble.domain.BlogEntry:getBlog()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: Blog net.sourceforge.pebble.domain.BlogEntry:getBlog()
    //#abstractcommentaction.java:54: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Blog:getUrl()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Blog:getUrl()
    //#abstractcommentaction.java:54: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setWebsite(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setWebsite(String)
        }
        comment.setAuthenticated(true);
    //#abstractcommentaction.java:56: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setAuthenticated(bool)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setAuthenticated(bool)
      }
    }

    // are we replying to an existing comment?
    String parentCommentId = request.getParameter("comment");
    if (parentCommentId != null && parentCommentId.length() > 0) {
      long parent = Long.parseLong(parentCommentId);
      Comment parentComment = blogEntry.getComment(parent);
    //#abstractcommentaction.java:64: Warning: method not available
    //#    -- call on Comment net.sourceforge.pebble.domain.BlogEntry:getComment(long)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: Comment net.sourceforge.pebble.domain.BlogEntry:getComment(long)
      if (parentComment != null) {
        comment.setParent(parentComment);
    //#abstractcommentaction.java:66: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setParent(Comment)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createComment(HttpServletRequest, BlogEntry)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setParent(Comment)
      }
    }

    return comment;
    //#abstractcommentaction.java:70: end of method: Comment net.sourceforge.pebble.web.action.AbstractCommentAction.createComment(HttpServletRequest, BlogEntry)
  }

  protected Comment createBlankComment(Blog blog, BlogEntry blogEntry, HttpServletRequest request) {
    Comment comment = blogEntry.createComment("", "", "", "", "", request.getRemoteAddr());
    //#abstractcommentaction.java:74: method: Comment net.sourceforge.pebble.web.action.AbstractCommentAction.createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#abstractcommentaction.java:74: Warning: method not available
    //#    -- call on Comment net.sourceforge.pebble.domain.BlogEntry:createComment(String, String, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: Comment net.sourceforge.pebble.domain.BlogEntry:createComment(String, String, String, String, String, String)
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): blog
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): blogEntry
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): log
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).__Tag
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).configuration
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/PebbleContext.__Descendant_Table[net/sourceforge/pebble/PebbleContext]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/PebbleContext.__Dispatch_Table.getConfiguration()Lnet/sourceforge/pebble/Configuration;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/PebbleContext.instance
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Descendant_Table[net/sourceforge/pebble/security/DefaultSecurityRealm]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Descendant_Table[others]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Dispatch_Table.getFileForRealm()Ljava/io/File;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Dispatch_Table.getFileForUser(Ljava/lang/String;)Ljava/io/File;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/DefaultSecurityRealm.__Dispatch_Table.getUser(Ljava/lang/String;)Lnet/sourceforge/pebble/security/PebbleUserDetails;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/PebbleUserDetails.__Descendant_Table[net/sourceforge/pebble/security/PebbleUserDetails]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/PebbleUserDetails.__Descendant_Table[others]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getEmailAddress()Ljava/lang/String;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getUsername()Ljava/lang/String;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/PebbleUserDetails.__Dispatch_Table.getWebsite()Ljava/lang/String;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/SecurityRealm.__Descendant_Table[net/sourceforge/pebble/security/DefaultSecurityRealm]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/SecurityRealm.__Descendant_Table[net/sourceforge/pebble/security/SecurityRealm]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/SecurityRealm.__Descendant_Table[others]
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/security/SecurityRealm.__Dispatch_Table.getUser(Ljava/lang/String;)Lnet/sourceforge/pebble/security/PebbleUserDetails;
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net/sourceforge/pebble/util/SecurityUtils.log
    //#input(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): request
    //#output(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): return_value
    //#pre[2] (Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): blogEntry != null
    //#pre[4] (Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): request != null
    //#pre[1] (Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): (soft) blog != null
    //#pre[3] (Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): (soft) net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).configuration != null
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...).length@103 <= 4_294_967_295
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...).length@108 <= 4_294_967_295
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...).length@94 <= 4_294_967_295
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...).length@98 <= 4_294_967_295
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...)[0..4_294_967_295]@103 != null
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...)[0..4_294_967_295]@108 != null
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...)[0..4_294_967_295]@94 != null
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getCookies(...)[0..4_294_967_295]@98 != null
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net.sourceforge.pebble.domain.BlogEntry:createComment(...)@74 != null
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net.sourceforge.pebble.domain.BlogEntry:getBlog(...)@87 != null
    //#presumption(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): org.apache.commons.logging.LogFactory:getLog(...)@33 != null
    //#post(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): (soft) return_value != null
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContextHolder:getContext
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContext:getAuthentication
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:org.acegisecurity.Authentication:getName
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.Configuration:getSecurityRealm
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:getUser
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.Configuration:getDataDirectory
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.io.File
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:getFileForUser
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Properties
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Properties:load
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.io.FileInputStream:close
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Properties:getProperty
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Properties:keySet
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Set:iterator
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.HashSet
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:org.acegisecurity.GrantedAuthorityImpl
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Set:add
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.util.Set:toArray
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.PebbleException
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:valueOf
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:javax.servlet.http.Cookie:getName
    //#unanalyzed(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): Effects-of-calling:java.lang.String:equals
    //#test_vector(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): java.lang.String:equals(...)@84: {1}, {0}
    //#test_vector(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): java.lang.String:length(...)@120: {0}, {1..4_294_967_295}
    //#test_vector(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@119: Addr_Set{null}, Inverse{null}
    //#test_vector(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): net.sourceforge.pebble.domain.BlogEntry:getComment(...)@122: Addr_Set{null}, Inverse{null}
    //#test_vector(Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)): user.website: Addr_Set{null}, Inverse{null}

    // populate the author, email and website from one of :
    // - the logged in user details
    // - the "remember me" cookie
    if (SecurityUtils.isUserAuthenticated()) {
      PebbleUserDetails user = SecurityUtils.getUserDetails();
      if (user != null) {
        comment.setAuthor(user.getName());
    //#abstractcommentaction.java:82: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setAuthor(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setAuthor(String)
        comment.setEmail(user.getEmailAddress());
    //#abstractcommentaction.java:83: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setEmail(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setEmail(String)
        if (user.getWebsite() != null && !user.getWebsite().equals("")) {
          comment.setWebsite(user.getWebsite());
    //#abstractcommentaction.java:85: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setWebsite(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setWebsite(String)
        } else {
          comment.setWebsite(blogEntry.getBlog().getUrl() + "authors/" + user.getUsername() + "/");
    //#abstractcommentaction.java:87: Warning: method not available
    //#    -- call on Blog net.sourceforge.pebble.domain.BlogEntry:getBlog()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: Blog net.sourceforge.pebble.domain.BlogEntry:getBlog()
    //#abstractcommentaction.java:87: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Blog:getUrl()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Blog:getUrl()
    //#abstractcommentaction.java:87: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setWebsite(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setWebsite(String)
        }
        comment.setAuthenticated(true);
    //#abstractcommentaction.java:89: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setAuthenticated(bool)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setAuthenticated(bool)
      }
    } else {
      try {
        // is "remember me" set?
        Cookie rememberMe = CookieUtils.getCookie(request.getCookies(), "rememberMe");
        if (rememberMe != null) {
          // remember me has been checked and we're not already previewing a comment
          // so create a new comment as this will populate the author/email/website
          Cookie author = CookieUtils.getCookie(request.getCookies(), "rememberMe.author");
          if (author != null) {
            comment.setAuthor(URLDecoder.decode(author.getValue(), blog.getCharacterEncoding()));
    //#abstractcommentaction.java:100: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Blog:getCharacterEncoding()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Blog:getCharacterEncoding()
    //#abstractcommentaction.java:100: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setAuthor(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setAuthor(String)
          }

          Cookie email = CookieUtils.getCookie(request.getCookies(), "rememberMe.email");
          if (email != null) {
            comment.setEmail(URLDecoder.decode(email.getValue(), blog.getCharacterEncoding()));
    //#abstractcommentaction.java:105: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Blog:getCharacterEncoding()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Blog:getCharacterEncoding()
    //#abstractcommentaction.java:105: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setEmail(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setEmail(String)
          }

          Cookie website = CookieUtils.getCookie(request.getCookies(), "rememberMe.website");
          if (website != null) {
            comment.setWebsite(URLDecoder.decode(website.getValue(), blog.getCharacterEncoding()));
    //#abstractcommentaction.java:110: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Blog:getCharacterEncoding()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Blog:getCharacterEncoding()
    //#abstractcommentaction.java:110: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setWebsite(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setWebsite(String)
          }
        }
      } catch (UnsupportedEncodingException e) {
        log.error("Exception encountered", e);
    //#abstractcommentaction.java:114: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
      }
    }

    // are we replying to an existing comment?
    String parentCommentId = request.getParameter("comment");
    if (parentCommentId != null && parentCommentId.length() > 0) {
      long parent = Long.parseLong(parentCommentId);
      Comment parentComment = blogEntry.getComment(parent);
    //#abstractcommentaction.java:122: Warning: method not available
    //#    -- call on Comment net.sourceforge.pebble.domain.BlogEntry:getComment(long)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: Comment net.sourceforge.pebble.domain.BlogEntry:getComment(long)
      if (parentComment != null) {
        comment.setParent(parentComment);
    //#abstractcommentaction.java:124: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setParent(Comment)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setParent(Comment)
        comment.setTitle(parentComment.getTitle());
    //#abstractcommentaction.java:125: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Comment:getTitle()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Comment:getTitle()
    //#abstractcommentaction.java:125: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Comment:setTitle(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: Comment createBlankComment(Blog, BlogEntry, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Comment:setTitle(String)
      }
    }

    return comment;
    //#abstractcommentaction.java:129: end of method: Comment net.sourceforge.pebble.web.action.AbstractCommentAction.createBlankComment(Blog, BlogEntry, HttpServletRequest)
  }

  protected ValidationContext validateComment(Comment comment) {
    ValidationContext context = new ValidationContext();
    //#abstractcommentaction.java:133: method: ValidationContext net.sourceforge.pebble.web.action.AbstractCommentAction.validateComment(Comment)
    //#abstractcommentaction.java:133: Warning: suspicious precondition
    //#    the precondition for this.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: ValidationContext validateComment(Comment)
    //#    suspicious precondition index: [3]
    //#input(ValidationContext validateComment(Comment)): __Descendant_Table[net/sourceforge/pebble/web/action/AbstractCommentAction]
    //#input(ValidationContext validateComment(Comment)): __Descendant_Table[net/sourceforge/pebble/web/action/ConfirmCommentAction]
    //#input(ValidationContext validateComment(Comment)): __Descendant_Table[net/sourceforge/pebble/web/action/ReplyToBlogEntryAction]
    //#input(ValidationContext validateComment(Comment)): __Descendant_Table[net/sourceforge/pebble/web/action/SaveCommentAction]
    //#input(ValidationContext validateComment(Comment)): __Descendant_Table[net/sourceforge/pebble/web/action/ViewBlogEntryAction]
    //#input(ValidationContext validateComment(Comment)): __Descendant_Table[others]
    //#input(ValidationContext validateComment(Comment)): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(ValidationContext validateComment(Comment)): comment
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/action/ConfirmCommentAction.__Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/action/ReplyToBlogEntryAction.__Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/action/SaveCommentAction.__Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/action/ViewBlogEntryAction.__Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[net/sourceforge/pebble/web/model/Model]
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[others]
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.put(Ljava/lang/String;Ljava/lang/Object;)V
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/validation/ValidationContext.__Descendant_Table[net/sourceforge/pebble/web/validation/ValidationContext]
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/validation/ValidationContext.__Descendant_Table[others]
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/validation/ValidationContext.__Dispatch_Table.addError(Ljava/lang/String;)V
    //#input(ValidationContext validateComment(Comment)): net/sourceforge/pebble/web/validation/ValidationContext.__Dispatch_Table.addError(Lnet/sourceforge/pebble/web/validation/ValidationError;)V
    //#input(ValidationContext validateComment(Comment)): this
    //#input(ValidationContext validateComment(Comment)): this.__Tag
    //#input(ValidationContext validateComment(Comment)): this.model
    //#input(ValidationContext validateComment(Comment)): this.model.__Tag
    //#input(ValidationContext validateComment(Comment)): this.model.data
    //#output(ValidationContext validateComment(Comment)): new ArrayList(ValidationContext#1) num objects
    //#output(ValidationContext validateComment(Comment)): new ValidationContext(validateComment#1) num objects
    //#output(ValidationContext validateComment(Comment)): return_value.__Tag
    //#output(ValidationContext validateComment(Comment)): return_value.errors
    //#output(ValidationContext validateComment(Comment)): return_value
    //#new obj(ValidationContext validateComment(Comment)): new ArrayList(ValidationContext#1)
    //#new obj(ValidationContext validateComment(Comment)): new ValidationContext(validateComment#1)
    //#pre[3] (ValidationContext validateComment(Comment)): this.__Tag in {net/sourceforge/pebble/web/action/AbstractCommentAction, net/sourceforge/pebble/web/action/ConfirmCommentAction, net/sourceforge/pebble/web/action/ReplyToBlogEntryAction, net/sourceforge/pebble/web/action/SaveCommentAction, net/sourceforge/pebble/web/action/ViewBlogEntryAction}
    //#pre[4] (ValidationContext validateComment(Comment)): this.model != null
    //#pre[5] (ValidationContext validateComment(Comment)): this.model.__Tag == net/sourceforge/pebble/web/model/Model
    //#pre[6] (ValidationContext validateComment(Comment)): this.model.data != null
    //#pre[1] (ValidationContext validateComment(Comment)): (soft) comment != null
    //#post(ValidationContext validateComment(Comment)): return_value == &new ValidationContext(validateComment#1)
    //#post(ValidationContext validateComment(Comment)): new ArrayList(ValidationContext#1) num objects == 1
    //#post(ValidationContext validateComment(Comment)): new ValidationContext(validateComment#1) num objects == 1
    //#post(ValidationContext validateComment(Comment)): return_value.__Tag == net/sourceforge/pebble/web/validation/ValidationContext
    //#post(ValidationContext validateComment(Comment)): return_value.errors == &new ArrayList(ValidationContext#1)
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:javax.mail.internet.InternetAddress
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:javax.mail.internet.InternetAddress:validate
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:javax.mail.internet.AddressException:getMessage
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:java.lang.String:valueOf
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:java.util.List:add
    //#unanalyzed(ValidationContext validateComment(Comment)): Effects-of-calling:java.util.HashMap:put
    try {
      MailUtils.validate(comment.getEmail(), context);
    //#abstractcommentaction.java:135: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Comment:getEmail()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: ValidationContext validateComment(Comment)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Comment:getEmail()
    } catch (NoClassDefFoundError e) {
      // most likely: JavaMail is not in classpath
      // ignore, when we can not send email we must not validate address
      // this might lead to problems when mail is activated later without this
      // address being validated... Discussion started on mailing list, Oct-25 2008
    }
    getModel().put("validationContext", context);
    return context;
    //#abstractcommentaction.java:143: end of method: ValidationContext net.sourceforge.pebble.web.action.AbstractCommentAction.validateComment(Comment)
  }

  protected void saveComment(HttpServletRequest request, HttpServletResponse response, BlogEntry blogEntry, Comment comment) throws BlogServiceException {
    Blog blog = blogEntry.getBlog();
    blogEntry.addComment(comment);

    BlogService service = new BlogService();
    service.putBlogEntry(blogEntry);

    // remember me functionality
    String rememberMe = (String)request.getSession().getAttribute("rememberMe");
    //#abstractcommentaction.java:154: method: void net.sourceforge.pebble.web.action.AbstractCommentAction.saveComment(HttpServletRequest, HttpServletResponse, BlogEntry, Comment)
    //#abstractcommentaction.java:154: ?check always fails: void saveComment(HttpServletRequest, HttpServletResponse, BlogEntry, Comment) always ends with an exception
    //#abstractcommentaction.java:154: end of method: void net.sourceforge.pebble.web.action.AbstractCommentAction.saveComment(HttpServletRequest, HttpServletResponse, BlogEntry, Comment)
    if (rememberMe != null && rememberMe.equals("true")) {
      CookieUtils.addCookie(response, "rememberMe", "true", CookieUtils.ONE_MONTH);
      CookieUtils.addCookie(response, "rememberMe.author", encode(comment.getAuthor(), blog.getCharacterEncoding()), CookieUtils.ONE_MONTH);
      CookieUtils.addCookie(response, "rememberMe.email", encode(comment.getEmail(), blog.getCharacterEncoding()), CookieUtils.ONE_MONTH);
      CookieUtils.addCookie(response, "rememberMe.website", encode(comment.getWebsite(), blog.getCharacterEncoding()), CookieUtils.ONE_MONTH);
    } else {
      CookieUtils.removeCookie(response, "rememberMe");
      CookieUtils.removeCookie(response, "rememberMe.author");
      CookieUtils.removeCookie(response, "rememberMe.email");
      CookieUtils.removeCookie(response, "rememberMe.website");
    }
  }

  private String encode(String s, String characterEncoding) {
    if (s == null) {
    //#abstractcommentaction.java:169: method: String net.sourceforge.pebble.web.action.AbstractCommentAction.encode(String, String)
    //#input(String encode(String, String)): characterEncoding
    //#input(String encode(String, String)): log
    //#input(String encode(String, String)): s
    //#output(String encode(String, String)): return_value
    //#presumption(String encode(String, String)): org.apache.commons.logging.LogFactory:getLog(...)@33 != null
    //#post(String encode(String, String)): init'ed(return_value)
    //#test_vector(String encode(String, String)): s: Inverse{null}, Addr_Set{null}
      return "";
    } else {
      try {
        return URLEncoder.encode(s, characterEncoding);
      } catch (UnsupportedEncodingException e) {
        log.error("Exception encountered", e);
    //#abstractcommentaction.java:175: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.AbstractCommentAction
    //#    method: String encode(String, String)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
        return "";
    //#abstractcommentaction.java:176: end of method: String net.sourceforge.pebble.web.action.AbstractCommentAction.encode(String, String)
      }
    }
  }

}    //#abstractcommentaction.java:: end of class: net.sourceforge.pebble.web.action.AbstractCommentAction
