//# 3 errors, 477 messages
//#
/*
    //#savestaticpageaction.java:1:1: class: net.sourceforge.pebble.web.action.SaveStaticPageAction
 * 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.service.StaticPageService;
import net.sourceforge.pebble.service.StaticPageServiceException;
import net.sourceforge.pebble.domain.*;
import net.sourceforge.pebble.util.SecurityUtils;
import net.sourceforge.pebble.util.StringUtils;
import net.sourceforge.pebble.web.security.RequireSecurityToken;
import net.sourceforge.pebble.web.validation.ValidationContext;
import net.sourceforge.pebble.web.view.RedirectView;
import net.sourceforge.pebble.web.view.View;
import net.sourceforge.pebble.web.view.impl.StaticPageFormView;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

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

/**
 * Saves a static page.
 *
 * @author    Simon Brown
 */
@RequireSecurityToken
public class SaveStaticPageAction extends SecureAction {
    //#savestaticpageaction.java:58: method: void net.sourceforge.pebble.web.action.SaveStaticPageAction.net.sourceforge.pebble.web.action.SaveStaticPageAction()
    //#input(void net.sourceforge.pebble.web.action.SaveStaticPageAction()): this
    //#savestaticpageaction.java:58: end of method: void net.sourceforge.pebble.web.action.SaveStaticPageAction.net.sourceforge.pebble.web.action.SaveStaticPageAction()

  /** the log used by this class */
  private static Log log = LogFactory.getLog(SaveStaticPageAction.class);
    //#savestaticpageaction.java:61: method: net.sourceforge.pebble.web.action.SaveStaticPageAction.net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init
    //#savestaticpageaction.java:61: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getLocalizedString(Ljava/lang/String;)Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getRoles(Ljavax/servlet/http/HttpServletRequest;)[Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getStaticPage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/StaticPage;
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.populateStaticPage(Lnet/sourceforge/pebble/domain/StaticPage;Ljavax/servlet/http/HttpServletRequest;)V
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.previewPage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/web/view/View;
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__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.SaveStaticPageAction__static_init): __Dispatch_Table.savePage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/web/view/View;
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.setModel(Lnet/sourceforge/pebble/web/model/Model;)V
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.unlockPage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/web/view/View;
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): log
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): net/sourceforge/pebble/web/action/Action.__Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#output(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): net/sourceforge/pebble/web/action/SecureAction.__Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): net/sourceforge/pebble/web/action/Action.__Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): net/sourceforge/pebble/web/action/SecureAction.__Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getLocalizedString(Ljava/lang/String;)Ljava/lang/String; == &net/sourceforge/pebble/web/action/Action.getLocalizedString
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model; == &net/sourceforge/pebble/web/action/Action.getModel
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getRoles(Ljavax/servlet/http/HttpServletRequest;)[Ljava/lang/String; == &getRoles
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.getStaticPage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/domain/StaticPage; == &getStaticPage
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.populateStaticPage(Lnet/sourceforge/pebble/domain/StaticPage;Ljavax/servlet/http/HttpServletRequest;)V == &populateStaticPage
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): __Dispatch_Table.previewPage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/web/view/View; == &previewPage
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__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.SaveStaticPageAction__static_init): __Dispatch_Table.savePage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/web/view/View; == &savePage
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__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.SaveStaticPageAction__static_init): __Dispatch_Table.unlockPage(Ljavax/servlet/http/HttpServletRequest;)Lnet/sourceforge/pebble/web/view/View; == &unlockPage
    //#post(net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init): init'ed(log)
    //#savestaticpageaction.java:61: end of method: net.sourceforge.pebble.web.action.SaveStaticPageAction.net.sourceforge.pebble.web.action.SaveStaticPageAction__static_init

  /** the value used if the page is being previewed rather than saved */
  private static final String PREVIEW = "Preview";
  private static final String CANCEL = "Cancel";

  /**
   * 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 {
    String submitType = request.getParameter("submit");
    //#savestaticpageaction.java:75: method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.process(HttpServletRequest, HttpServletResponse)
    //#input(View process(HttpServletRequest, HttpServletResponse)): __Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#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)): log
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/service/StaticPageService.__Descendant_Table[net/sourceforge/pebble/service/StaticPageService]
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/service/StaticPageService.__Descendant_Table[others]
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.getStaticPageById(Lnet/sourceforge/pebble/domain/Blog;Ljava/lang/String;)Lnet/sourceforge/pebble/domain/StaticPage;
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.putStaticPage(Lnet/sourceforge/pebble/domain/StaticPage;)V
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.unlock(Lnet/sourceforge/pebble/domain/StaticPage;)Z
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/service/StaticPageService.log
    //#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)): net/sourceforge/pebble/web/validation/ValidationContext.__Descendant_Table[net/sourceforge/pebble/web/validation/ValidationContext]
    //#input(View process(HttpServletRequest, HttpServletResponse)): net/sourceforge/pebble/web/validation/ValidationContext.__Dispatch_Table.hasErrors()Z
    //#input(View process(HttpServletRequest, HttpServletResponse)): request
    //#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 RedirectView(savePage#5) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(unlockPage#2) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(unlockPage#3) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(previewPage#2) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(savePage#3) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(savePage#6) num objects
    //#output(View process(HttpServletRequest, HttpServletResponse)): return_value
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(savePage#5)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(unlockPage#2)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(unlockPage#3)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(previewPage#2)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(savePage#3)
    //#new obj(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(savePage#6)
    //#pre[2] (View process(HttpServletRequest, HttpServletResponse)): request != null
    //#pre[1] (View process(HttpServletRequest, HttpServletResponse)): (soft) log != null
    //#pre[4] (View process(HttpServletRequest, HttpServletResponse)): (soft) this.__Tag == net/sourceforge/pebble/web/action/SaveStaticPageAction
    //#pre[5] (View process(HttpServletRequest, HttpServletResponse)): (soft) this.model != null
    //#pre[6] (View process(HttpServletRequest, HttpServletResponse)): (soft) this.model.__Tag == net/sourceforge/pebble/web/model/Model
    //#pre[7] (View process(HttpServletRequest, HttpServletResponse)): (soft) this.model.data != null
    //#post(View process(HttpServletRequest, HttpServletResponse)): return_value in Addr_Set{&new StaticPageFormView(previewPage#2),&new RedirectView(unlockPage#2),&new RedirectView(unlockPage#3),&new StaticPageFormView(savePage#3),&new RedirectView(savePage#5),&new StaticPageFormView(savePage#6)}
    //#post(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(savePage#5) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(unlockPage#2) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new RedirectView(unlockPage#3) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(previewPage#2) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(savePage#3) num objects <= 1
    //#post(View process(HttpServletRequest, HttpServletResponse)): new StaticPageFormView(savePage#6) num objects <= 1
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.acegisecurity.Authentication:getName
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.acegisecurity.context.SecurityContextHolder:getContext
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.acegisecurity.context.SecurityContext:getAuthentication
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTitle
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setSubtitle
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setBody
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTags
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setAuthor
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setOriginalPermalink
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setName
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTemplate
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:getStaticPage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.HashMap:put
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:validate
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.List:isEmpty
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.web.view.impl.StaticPageFormView
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getConfiguredFactory
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getStaticPageDAO
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:error
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.PebbleException
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.Exception:getMessage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getInstance
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getStaticPage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:loadStaticPage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setPersistent
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.ContentCache:putStaticPage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:clone
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:isPersistent
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.ContentCache:removeStaticPage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getBlog
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:getSearchIndex
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:getStaticPageIndex
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getId
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getDate
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.Date:getTime
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.Date
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setDate
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:putStaticPage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:storeStaticPage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.index.SearchIndex:index
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.index.StaticPageIndex:index
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getLocalPermalink
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getTitle
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:info
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:unlock
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.web.view.RedirectView
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.service.StaticPageServiceException:getMessage
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:getUrl
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:valueOf
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.HashMap:get
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.ServletException
    //#unanalyzed(View process(HttpServletRequest, HttpServletResponse)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.lang.String:equalsIgnoreCase(...)@77: {0}, {1}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): java.lang.String:equalsIgnoreCase(...)@79: {0}, {1}
    //#test_vector(View process(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletRequest:getParameter(...)@75: Addr_Set{null}, Inverse{null}

    if (submitType != null && submitType.equalsIgnoreCase(PREVIEW)) {
      return previewPage(request);
    } else if (submitType != null && submitType.equalsIgnoreCase(CANCEL)) {
      return unlockPage(request);
    } else {
      return savePage(request);
    //#savestaticpageaction.java:82: end of method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.process(HttpServletRequest, HttpServletResponse)
    }
  }

  private View previewPage(HttpServletRequest request) throws ServletException {
    StaticPage staticPage = getStaticPage(request);
    //#savestaticpageaction.java:87: method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.previewPage(HttpServletRequest)
    //#input(View previewPage(HttpServletRequest)): __Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#input(View previewPage(HttpServletRequest)): __Descendant_Table[others]
    //#input(View previewPage(HttpServletRequest)): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(View previewPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Descendant_Table[net/sourceforge/pebble/service/StaticPageService]
    //#input(View previewPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.getStaticPageById(Lnet/sourceforge/pebble/domain/Blog;Ljava/lang/String;)Lnet/sourceforge/pebble/domain/StaticPage;
    //#input(View previewPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.log
    //#input(View previewPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[net/sourceforge/pebble/web/model/Model]
    //#input(View previewPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[others]
    //#input(View previewPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.get(Ljava/lang/String;)Ljava/lang/Object;
    //#input(View previewPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.put(Ljava/lang/String;Ljava/lang/Object;)V
    //#input(View previewPage(HttpServletRequest)): request
    //#input(View previewPage(HttpServletRequest)): this
    //#input(View previewPage(HttpServletRequest)): this.__Tag
    //#input(View previewPage(HttpServletRequest)): this.model
    //#input(View previewPage(HttpServletRequest)): this.model.__Tag
    //#input(View previewPage(HttpServletRequest)): this.model.data
    //#output(View previewPage(HttpServletRequest)): new StaticPageFormView(previewPage#2) num objects
    //#output(View previewPage(HttpServletRequest)): return_value
    //#new obj(View previewPage(HttpServletRequest)): new StaticPageFormView(previewPage#2)
    //#pre[1] (View previewPage(HttpServletRequest)): request != null
    //#pre[3] (View previewPage(HttpServletRequest)): this.__Tag == net/sourceforge/pebble/web/action/SaveStaticPageAction
    //#pre[4] (View previewPage(HttpServletRequest)): this.model != null
    //#pre[5] (View previewPage(HttpServletRequest)): this.model.__Tag == net/sourceforge/pebble/web/model/Model
    //#pre[6] (View previewPage(HttpServletRequest)): this.model.data != null
    //#post(View previewPage(HttpServletRequest)): return_value == &new StaticPageFormView(previewPage#2)
    //#post(View previewPage(HttpServletRequest)): new StaticPageFormView(previewPage#2) num objects == 1
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:org.acegisecurity.Authentication:getName
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContextHolder:getContext
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContext:getAuthentication
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTitle
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setSubtitle
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setBody
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTags
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setAuthor
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setOriginalPermalink
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setName
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTemplate
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.util.HashMap:put
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getConfiguredFactory
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getStaticPageDAO
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:error
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.PebbleException
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.Exception:getMessage
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getInstance
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getStaticPage
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:loadStaticPage
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setPersistent
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:putStaticPage
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:clone
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.util.HashMap:get
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:javax.servlet.ServletException
    //#unanalyzed(View previewPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage

    // we don't want to actually edit the original whilst previewing
    staticPage = (StaticPage)staticPage.clone();
    //#savestaticpageaction.java:90: ?null dereference
    //#    staticPage != null
    //#    severity: MEDIUM
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View previewPage(HttpServletRequest)
    //#    basic block: Entry_BB_1
    //#    assertion: staticPage != null
    //#    VN: getStaticPage(...)
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
    //#savestaticpageaction.java:90: Warning: method not available
    //#    -- call on Object net.sourceforge.pebble.domain.StaticPage:clone()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View previewPage(HttpServletRequest)
    //#    unanalyzed callee: Object net.sourceforge.pebble.domain.StaticPage:clone()
    populateStaticPage(staticPage, request);

    ValidationContext validationContext = new ValidationContext();
    staticPage.validate(validationContext);
    //#savestaticpageaction.java:94: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:validate(ValidationContext)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View previewPage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:validate(ValidationContext)
    getModel().put("validationContext", validationContext);
    getModel().put(Constants.STATIC_PAGE_KEY, staticPage);

    return new StaticPageFormView();
    //#savestaticpageaction.java:98: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.impl.StaticPageFormView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View previewPage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.impl.StaticPageFormView()
    //#savestaticpageaction.java:98: end of method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.previewPage(HttpServletRequest)
  }

  private View unlockPage(HttpServletRequest request) throws ServletException {
    StaticPage staticPage = getStaticPage(request);
    //#savestaticpageaction.java:102: method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.unlockPage(HttpServletRequest)
    //#input(View unlockPage(HttpServletRequest)): __Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#input(View unlockPage(HttpServletRequest)): __Descendant_Table[others]
    //#input(View unlockPage(HttpServletRequest)): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(View unlockPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Descendant_Table[net/sourceforge/pebble/service/StaticPageService]
    //#input(View unlockPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.getStaticPageById(Lnet/sourceforge/pebble/domain/Blog;Ljava/lang/String;)Lnet/sourceforge/pebble/domain/StaticPage;
    //#input(View unlockPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.unlock(Lnet/sourceforge/pebble/domain/StaticPage;)Z
    //#input(View unlockPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.log
    //#input(View unlockPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[net/sourceforge/pebble/web/model/Model]
    //#input(View unlockPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[others]
    //#input(View unlockPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.get(Ljava/lang/String;)Ljava/lang/Object;
    //#input(View unlockPage(HttpServletRequest)): request
    //#input(View unlockPage(HttpServletRequest)): this
    //#input(View unlockPage(HttpServletRequest)): this.__Tag
    //#input(View unlockPage(HttpServletRequest)): this.model
    //#input(View unlockPage(HttpServletRequest)): this.model.__Tag
    //#input(View unlockPage(HttpServletRequest)): this.model.data
    //#output(View unlockPage(HttpServletRequest)): new RedirectView(unlockPage#2) num objects
    //#output(View unlockPage(HttpServletRequest)): new RedirectView(unlockPage#3) num objects
    //#output(View unlockPage(HttpServletRequest)): return_value
    //#new obj(View unlockPage(HttpServletRequest)): new RedirectView(unlockPage#2)
    //#new obj(View unlockPage(HttpServletRequest)): new RedirectView(unlockPage#3)
    //#pre[1] (View unlockPage(HttpServletRequest)): request != null
    //#pre[3] (View unlockPage(HttpServletRequest)): this.__Tag == net/sourceforge/pebble/web/action/SaveStaticPageAction
    //#pre[4] (View unlockPage(HttpServletRequest)): this.model != null
    //#pre[5] (View unlockPage(HttpServletRequest)): this.model.__Tag == net/sourceforge/pebble/web/model/Model
    //#pre[6] (View unlockPage(HttpServletRequest)): this.model.data != null
    //#presumption(View unlockPage(HttpServletRequest)): net.sourceforge.pebble.domain.StaticPage:getBlog(...)@109 != null
    //#post(View unlockPage(HttpServletRequest)): return_value in Addr_Set{&new RedirectView(unlockPage#3),&new RedirectView(unlockPage#2)}
    //#post(View unlockPage(HttpServletRequest)): new RedirectView(unlockPage#2) num objects <= 1
    //#post(View unlockPage(HttpServletRequest)): new RedirectView(unlockPage#3) num objects <= 1
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getConfiguredFactory
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getStaticPageDAO
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:error
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.PebbleException
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:java.lang.Exception:getMessage
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getInstance
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getStaticPage
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:loadStaticPage
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setPersistent
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:putStaticPage
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:clone
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:isPersistent
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:removeStaticPage
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:unlock
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:java.util.HashMap:get
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:javax.servlet.ServletException
    //#unanalyzed(View unlockPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage
    //#test_vector(View unlockPage(HttpServletRequest)): net.sourceforge.pebble.domain.StaticPage:isPersistent(...)@106: {0}, {1}
    StaticPageService service = new StaticPageService();
    service.unlock(staticPage);
    //#savestaticpageaction.java:104: ?precondition failure
    //#    net/sourceforge/pebble/service/StaticPageService.unlock: staticPage != null
    //#    severity: MEDIUM
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View unlockPage(HttpServletRequest)
    //#    basic block: Entry_BB_1
    //#    assertion: getStaticPage(...) != null
    //#    callee: bool net/sourceforge/pebble/service/StaticPageService.unlock(StaticPage)
    //#    callee assertion: staticPage != null
    //#    callee file: staticpageservice.java
    //#    callee precondition index: [1]
    //#    callee srcpos: 217
    //#    VN: getStaticPage(...)
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad

    if (staticPage.isPersistent()) {
    //#savestaticpageaction.java:106: Warning: method not available
    //#    -- call on bool net.sourceforge.pebble.domain.StaticPage:isPersistent()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View unlockPage(HttpServletRequest)
    //#    unanalyzed callee: bool net.sourceforge.pebble.domain.StaticPage:isPersistent()
      return new RedirectView(staticPage.getLocalPermalink());
    //#savestaticpageaction.java:107: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.StaticPage:getLocalPermalink()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View unlockPage(HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.StaticPage:getLocalPermalink()
    //#savestaticpageaction.java:107: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.RedirectView(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View unlockPage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.RedirectView(String)
    } else {
      return new RedirectView(staticPage.getBlog().getUrl() + "viewStaticPages.secureaction");
    //#savestaticpageaction.java:109: Warning: method not available
    //#    -- call on Blog net.sourceforge.pebble.domain.StaticPage:getBlog()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View unlockPage(HttpServletRequest)
    //#    unanalyzed callee: Blog net.sourceforge.pebble.domain.StaticPage:getBlog()
    //#savestaticpageaction.java:109: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.Blog:getUrl()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View unlockPage(HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.Blog:getUrl()
    //#savestaticpageaction.java:109: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.RedirectView(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View unlockPage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.RedirectView(String)
    //#savestaticpageaction.java:109: end of method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.unlockPage(HttpServletRequest)
    }
  }

  private View savePage(HttpServletRequest request) throws ServletException {
    StaticPageService service = new StaticPageService();
    //#savestaticpageaction.java:114: method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.savePage(HttpServletRequest)
    //#input(View savePage(HttpServletRequest)): __Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#input(View savePage(HttpServletRequest)): __Descendant_Table[others]
    //#input(View savePage(HttpServletRequest)): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(View savePage(HttpServletRequest)): log
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Descendant_Table[net/sourceforge/pebble/service/StaticPageService]
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Descendant_Table[others]
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.getStaticPageById(Lnet/sourceforge/pebble/domain/Blog;Ljava/lang/String;)Lnet/sourceforge/pebble/domain/StaticPage;
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.putStaticPage(Lnet/sourceforge/pebble/domain/StaticPage;)V
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.unlock(Lnet/sourceforge/pebble/domain/StaticPage;)Z
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.log
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[net/sourceforge/pebble/web/model/Model]
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[others]
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.get(Ljava/lang/String;)Ljava/lang/Object;
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.put(Ljava/lang/String;Ljava/lang/Object;)V
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/web/validation/ValidationContext.__Descendant_Table[net/sourceforge/pebble/web/validation/ValidationContext]
    //#input(View savePage(HttpServletRequest)): net/sourceforge/pebble/web/validation/ValidationContext.__Dispatch_Table.hasErrors()Z
    //#input(View savePage(HttpServletRequest)): request
    //#input(View savePage(HttpServletRequest)): this
    //#input(View savePage(HttpServletRequest)): this.__Tag
    //#input(View savePage(HttpServletRequest)): this.model
    //#input(View savePage(HttpServletRequest)): this.model.__Tag
    //#input(View savePage(HttpServletRequest)): this.model.data
    //#output(View savePage(HttpServletRequest)): new RedirectView(savePage#5) num objects
    //#output(View savePage(HttpServletRequest)): new StaticPageFormView(savePage#3) num objects
    //#output(View savePage(HttpServletRequest)): new StaticPageFormView(savePage#6) num objects
    //#output(View savePage(HttpServletRequest)): return_value
    //#new obj(View savePage(HttpServletRequest)): new RedirectView(savePage#5)
    //#new obj(View savePage(HttpServletRequest)): new StaticPageFormView(savePage#3)
    //#new obj(View savePage(HttpServletRequest)): new StaticPageFormView(savePage#6)
    //#pre[2] (View savePage(HttpServletRequest)): request != null
    //#pre[4] (View savePage(HttpServletRequest)): this.__Tag == net/sourceforge/pebble/web/action/SaveStaticPageAction
    //#pre[5] (View savePage(HttpServletRequest)): this.model != null
    //#pre[6] (View savePage(HttpServletRequest)): this.model.__Tag == net/sourceforge/pebble/web/model/Model
    //#pre[7] (View savePage(HttpServletRequest)): this.model.data != null
    //#pre[1] (View savePage(HttpServletRequest)): (soft) log != null
    //#presumption(View savePage(HttpServletRequest)): net.sourceforge.pebble.domain.StaticPage:getBlog(...)@128 != null
    //#post(View savePage(HttpServletRequest)): return_value in Addr_Set{&new RedirectView(savePage#5),&new StaticPageFormView(savePage#6),&new StaticPageFormView(savePage#3)}
    //#post(View savePage(HttpServletRequest)): new RedirectView(savePage#5) num objects <= 1
    //#post(View savePage(HttpServletRequest)): new StaticPageFormView(savePage#3) num objects <= 1
    //#post(View savePage(HttpServletRequest)): new StaticPageFormView(savePage#6) num objects <= 1
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:org.acegisecurity.Authentication:getName
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContextHolder:getContext
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContext:getAuthentication
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTitle
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setSubtitle
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setBody
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTags
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setAuthor
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setOriginalPermalink
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setName
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setTemplate
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.util.HashMap:put
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.util.List:isEmpty
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getConfiguredFactory
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getStaticPageDAO
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:error
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.PebbleException
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.Exception:getMessage
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getInstance
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getStaticPage
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:loadStaticPage
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setPersistent
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:putStaticPage
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:clone
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:isPersistent
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:removeStaticPage
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getBlog
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:getSearchIndex
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:getStaticPageIndex
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getId
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:getDate
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.util.Date:getTime
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.util.Date
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setDate
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:putStaticPage
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:storeStaticPage
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.index.SearchIndex:index
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.index.StaticPageIndex:index
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:unlock
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.util.HashMap:get
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:javax.servlet.ServletException
    //#unanalyzed(View savePage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage
    StaticPage staticPage = getStaticPage(request);
    populateStaticPage(staticPage, request);
    //#savestaticpageaction.java:116: ?precondition failure
    //#    net/sourceforge/pebble/web/action/SaveStaticPageAction.populateStaticPage: staticPage != null
    //#    severity: MEDIUM
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    basic block: Entry_BB_1
    //#    assertion: getStaticPage(...) != null
    //#    callee: void net/sourceforge/pebble/web/action/SaveStaticPageAction.populateStaticPage(StaticPage, HttpServletRequest)
    //#    callee assertion: staticPage != null
    //#    callee file: savestaticpageaction.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 157
    //#    VN: getStaticPage(...)
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
    getModel().put(Constants.STATIC_PAGE_KEY, staticPage);

    ValidationContext validationContext = new ValidationContext();
    staticPage.validate(validationContext);
    //#savestaticpageaction.java:120: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:validate(ValidationContext)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:validate(ValidationContext)

    if (validationContext.hasErrors())  {
      getModel().put("validationContext", validationContext);
      return new StaticPageFormView();
    //#savestaticpageaction.java:124: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.impl.StaticPageFormView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.impl.StaticPageFormView()
    } else {
      try {
        service.putStaticPage(staticPage);
        staticPage.getBlog().info("Static page <a href=\"" + staticPage.getLocalPermalink() + "\">" + staticPage.getTitle() + "</a> saved.");
    //#savestaticpageaction.java:128: Warning: method not available
    //#    -- call on Blog net.sourceforge.pebble.domain.StaticPage:getBlog()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: Blog net.sourceforge.pebble.domain.StaticPage:getBlog()
    //#savestaticpageaction.java:128: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.StaticPage:getLocalPermalink()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.StaticPage:getLocalPermalink()
    //#savestaticpageaction.java:128: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.StaticPage:getTitle()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.StaticPage:getTitle()
    //#savestaticpageaction.java:128: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.Blog:info(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.Blog:info(String)
        service.unlock(staticPage);
        return new RedirectView(staticPage.getLocalPermalink());
    //#savestaticpageaction.java:130: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.domain.StaticPage:getLocalPermalink()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.domain.StaticPage:getLocalPermalink()
    //#savestaticpageaction.java:130: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.RedirectView(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.RedirectView(String)
      } catch (StaticPageServiceException e) {
        log.error(e.getMessage(), e);
    //#savestaticpageaction.java:132: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.service.StaticPageServiceException:getMessage()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: String net.sourceforge.pebble.service.StaticPageServiceException:getMessage()
    //#savestaticpageaction.java:132: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)

        return new StaticPageFormView();
    //#savestaticpageaction.java:134: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.impl.StaticPageFormView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: View savePage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.impl.StaticPageFormView()
    //#savestaticpageaction.java:134: end of method: View net.sourceforge.pebble.web.action.SaveStaticPageAction.savePage(HttpServletRequest)
      }
    }
  }

  private StaticPage getStaticPage(HttpServletRequest request) throws ServletException {
    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    //#savestaticpageaction.java:140: method: StaticPage net.sourceforge.pebble.web.action.SaveStaticPageAction.getStaticPage(HttpServletRequest)
    //#input(StaticPage getStaticPage(HttpServletRequest)): __Descendant_Table[net/sourceforge/pebble/web/action/SaveStaticPageAction]
    //#input(StaticPage getStaticPage(HttpServletRequest)): __Descendant_Table[others]
    //#input(StaticPage getStaticPage(HttpServletRequest)): __Dispatch_Table.getModel()Lnet/sourceforge/pebble/web/model/Model;
    //#input(StaticPage getStaticPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Descendant_Table[net/sourceforge/pebble/service/StaticPageService]
    //#input(StaticPage getStaticPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.__Dispatch_Table.getStaticPageById(Lnet/sourceforge/pebble/domain/Blog;Ljava/lang/String;)Lnet/sourceforge/pebble/domain/StaticPage;
    //#input(StaticPage getStaticPage(HttpServletRequest)): net/sourceforge/pebble/service/StaticPageService.log
    //#input(StaticPage getStaticPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[net/sourceforge/pebble/web/model/Model]
    //#input(StaticPage getStaticPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Descendant_Table[others]
    //#input(StaticPage getStaticPage(HttpServletRequest)): net/sourceforge/pebble/web/model/Model.__Dispatch_Table.get(Ljava/lang/String;)Ljava/lang/Object;
    //#input(StaticPage getStaticPage(HttpServletRequest)): request
    //#input(StaticPage getStaticPage(HttpServletRequest)): this
    //#input(StaticPage getStaticPage(HttpServletRequest)): this.__Tag
    //#input(StaticPage getStaticPage(HttpServletRequest)): this.model
    //#input(StaticPage getStaticPage(HttpServletRequest)): this.model.__Tag
    //#input(StaticPage getStaticPage(HttpServletRequest)): this.model.data
    //#output(StaticPage getStaticPage(HttpServletRequest)): new StaticPage(getStaticPage#3) num objects
    //#output(StaticPage getStaticPage(HttpServletRequest)): return_value
    //#new obj(StaticPage getStaticPage(HttpServletRequest)): new StaticPage(getStaticPage#3)
    //#pre[1] (StaticPage getStaticPage(HttpServletRequest)): request != null
    //#pre[3] (StaticPage getStaticPage(HttpServletRequest)): this.__Tag == net/sourceforge/pebble/web/action/SaveStaticPageAction
    //#pre[4] (StaticPage getStaticPage(HttpServletRequest)): this.model != null
    //#pre[5] (StaticPage getStaticPage(HttpServletRequest)): this.model.__Tag == net/sourceforge/pebble/web/model/Model
    //#pre[6] (StaticPage getStaticPage(HttpServletRequest)): this.model.data != null
    //#post(StaticPage getStaticPage(HttpServletRequest)): init'ed(return_value)
    //#post(StaticPage getStaticPage(HttpServletRequest)): new StaticPage(getStaticPage#3) num objects <= 1
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getConfiguredFactory
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory:getStaticPageDAO
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.Blog:error
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.PebbleException
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:java.lang.Exception:getMessage
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getInstance
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:getStaticPage
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.dao.StaticPageDAO:loadStaticPage
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:setPersistent
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.ContentCache:putStaticPage
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:net.sourceforge.pebble.domain.StaticPage:clone
    //#unanalyzed(StaticPage getStaticPage(HttpServletRequest)): Effects-of-calling:java.util.HashMap:get
    //#test_vector(StaticPage getStaticPage(HttpServletRequest)): java.lang.String:equalsIgnoreCase(...)@144: {0}, {1}
    //#test_vector(StaticPage getStaticPage(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@142: Addr_Set{null}, Inverse{null}
    String id = request.getParameter("page");
    String persistent = request.getParameter("persistent");

    if (persistent != null && persistent.equalsIgnoreCase("true")) {
      try {
        StaticPageService service = new StaticPageService();
        return service.getStaticPageById(blog, id);
      } catch (StaticPageServiceException e) {
        throw new ServletException(e);
      }
    } else {
      return new StaticPage(blog);
    //#savestaticpageaction.java:152: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage(Blog)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: StaticPage getStaticPage(HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage(Blog)
    //#savestaticpageaction.java:152: end of method: StaticPage net.sourceforge.pebble.web.action.SaveStaticPageAction.getStaticPage(HttpServletRequest)
    }
  }

  private void populateStaticPage(StaticPage staticPage, HttpServletRequest request) {
    String title = request.getParameter("title");
    //#savestaticpageaction.java:157: method: void net.sourceforge.pebble.web.action.SaveStaticPageAction.populateStaticPage(StaticPage, HttpServletRequest)
    //#input(void populateStaticPage(StaticPage, HttpServletRequest)): request
    //#input(void populateStaticPage(StaticPage, HttpServletRequest)): staticPage
    //#pre[1] (void populateStaticPage(StaticPage, HttpServletRequest)): request != null
    //#pre[2] (void populateStaticPage(StaticPage, HttpServletRequest)): staticPage != null
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:org.acegisecurity.Authentication:getName
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContextHolder:getContext
    //#unanalyzed(void populateStaticPage(StaticPage, HttpServletRequest)): Effects-of-calling:org.acegisecurity.context.SecurityContext:getAuthentication
    String subtitle = request.getParameter("subtitle");
    String body = StringUtils.filterNewlines(request.getParameter("body"));
    String tags = request.getParameter("tags");
    String originalPermalink = request.getParameter("originalPermalink");
    String name = request.getParameter("name");
    String author = SecurityUtils.getUsername();
    String template = request.getParameter("template");

    staticPage.setTitle(title);
    //#savestaticpageaction.java:166: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setTitle(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setTitle(String)
    staticPage.setSubtitle(subtitle);
    //#savestaticpageaction.java:167: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setSubtitle(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setSubtitle(String)
    staticPage.setBody(body);
    //#savestaticpageaction.java:168: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setBody(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setBody(String)
    staticPage.setTags(tags);
    //#savestaticpageaction.java:169: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setTags(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setTags(String)
    staticPage.setAuthor(author);
    //#savestaticpageaction.java:170: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setAuthor(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setAuthor(String)
    staticPage.setOriginalPermalink(originalPermalink);
    //#savestaticpageaction.java:171: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setOriginalPermalink(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setOriginalPermalink(String)
    staticPage.setName(name);
    //#savestaticpageaction.java:172: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setName(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setName(String)
    staticPage.setTemplate(template);
    //#savestaticpageaction.java:173: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.domain.StaticPage:setTemplate(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.action.SaveStaticPageAction
    //#    method: void populateStaticPage(StaticPage, HttpServletRequest)
    //#    unanalyzed callee: void net.sourceforge.pebble.domain.StaticPage:setTemplate(String)
  }
    //#savestaticpageaction.java:174: end of method: void net.sourceforge.pebble.web.action.SaveStaticPageAction.populateStaticPage(StaticPage, HttpServletRequest)

  /**
   * Gets a list of all roles that are allowed to access this action.
   *
   * @return  an array of Strings representing role names
   * @param request
   */
  public String[] getRoles(HttpServletRequest request) {
    return new String[]{Constants.BLOG_CONTRIBUTOR_ROLE};
    //#savestaticpageaction.java:183: method: String[] net.sourceforge.pebble.web.action.SaveStaticPageAction.getRoles(HttpServletRequest)
    //#input(String[] getRoles(HttpServletRequest)): net.sourceforge.pebble.Constants.BLOG_CONTRIBUTOR_ROLE
    //#output(String[] getRoles(HttpServletRequest)): new String[](getRoles#1) num objects
    //#output(String[] getRoles(HttpServletRequest)): return_value.length
    //#output(String[] getRoles(HttpServletRequest)): return_value[0]
    //#output(String[] getRoles(HttpServletRequest)): return_value
    //#new obj(String[] getRoles(HttpServletRequest)): new String[](getRoles#1)
    //#presumption(String[] getRoles(HttpServletRequest)): init'ed(net.sourceforge.pebble.Constants.BLOG_CONTRIBUTOR_ROLE)
    //#post(String[] getRoles(HttpServletRequest)): return_value == &new String[](getRoles#1)
    //#post(String[] getRoles(HttpServletRequest)): new String[](getRoles#1) num objects == 1
    //#post(String[] getRoles(HttpServletRequest)): return_value.length == 1
    //#post(String[] getRoles(HttpServletRequest)): return_value[0] == net.sourceforge.pebble.Constants.BLOG_CONTRIBUTOR_ROLE
    //#post(String[] getRoles(HttpServletRequest)): (soft) init'ed(return_value[0])
    //#savestaticpageaction.java:183: end of method: String[] net.sourceforge.pebble.web.action.SaveStaticPageAction.getRoles(HttpServletRequest)
  }

}
    //#savestaticpageaction.java:: end of class: net.sourceforge.pebble.web.action.SaveStaticPageAction
