//# 6 errors, 240 messages
//#
/*
    //#TrackbackServlet.java:1:1: class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
 * Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  The ASF licenses this file to You
 * under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.  For additional information regarding
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.
 */

package org.apache.roller.weblogger.ui.rendering.servlets;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Timestamp;
import java.util.Date;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.config.WebloggerRuntimeConfig;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.business.UserManager;
import org.apache.roller.weblogger.business.WeblogManager;
import org.apache.roller.weblogger.pojos.WeblogEntryComment;
import org.apache.roller.weblogger.pojos.WeblogEntry;
import org.apache.roller.weblogger.pojos.Weblog;
import org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager;
import org.apache.roller.weblogger.ui.rendering.plugins.comments.TrackbackLinkbackCommentValidator;
import org.apache.roller.weblogger.ui.rendering.util.WeblogTrackbackRequest;
import org.apache.roller.weblogger.util.I18nMessages;
import org.apache.roller.weblogger.util.MailUtil;
import org.apache.roller.weblogger.util.RollerMessages;
import org.apache.roller.weblogger.util.cache.CacheManager;


/**
 * Roller's Trackback server implementation. POSTing to this Servlet will add a
 * Trackback to a Weblog Entry. For more info on Trackback, read the spec:
 * <a href="http://www.movabletype.org/docs/mttrackback.html">MT Trackback</a>.
 *
 * @web.servlet name="TrackbackServlet"
 * @web.servlet-mapping url-pattern="/roller-ui/rendering/trackback/*"
 */
public class TrackbackServlet extends HttpServlet { 
    //#TrackbackServlet.java:57: method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet()
    //#input(void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet()): this
    //#output(void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet()): this.commentValidationManager
    //#post(void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet()): this.commentValidationManager == null
    
    private static Log logger = LogFactory.getLog(TrackbackServlet.class);
    //#TrackbackServlet.java:59: method: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init
    //#TrackbackServlet.java:59: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet]
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.getErrorResponse(Ljava/lang/String;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.getSuccessResponse(Ljava/lang/String;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.init(Ljavax/servlet/ServletConfig;)V
    //#output(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): logger
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V == &doGet
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V == &doPost
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.getErrorResponse(Ljava/lang/String;)Ljava/lang/String; == &getErrorResponse
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.getSuccessResponse(Ljava/lang/String;)Ljava/lang/String; == &getSuccessResponse
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): __Dispatch_Table.init(Ljavax/servlet/ServletConfig;)V == &init
    //#post(org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init): init'ed(logger)
    //#TrackbackServlet.java:59: end of method: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet__static_init
    
    private CommentValidationManager commentValidationManager = null;
    //#TrackbackServlet.java:61: end of method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet()
    

    public void init(ServletConfig config) throws ServletException {
        commentValidationManager = new CommentValidationManager();
    //#TrackbackServlet.java:65: method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.init(ServletConfig)
    //#TrackbackServlet.java:65: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void init(ServletConfig)
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager()
    //#input(void init(ServletConfig)): this
    //#output(void init(ServletConfig)): new CommentValidationManager(init#1) num objects
    //#output(void init(ServletConfig)): this.commentValidationManager
    //#new obj(void init(ServletConfig)): new CommentValidationManager(init#1)
    //#post(void init(ServletConfig)): this.commentValidationManager == &new CommentValidationManager(init#1)
    //#post(void init(ServletConfig)): new CommentValidationManager(init#1) num objects == 1
        
        // add trackback verification validator just for trackbacks
        commentValidationManager.addCommentValidator(new TrackbackLinkbackCommentValidator());
    //#TrackbackServlet.java:68: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.rendering.plugins.comments.TrackbackLinkbackCommentValidator()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void init(ServletConfig)
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.rendering.plugins.comments.TrackbackLinkbackCommentValidator()
    //#TrackbackServlet.java:68: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager:addCommentValidator(CommentValidator)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void init(ServletConfig)
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager:addCommentValidator(CommentValidator)
    }
    //#TrackbackServlet.java:69: end of method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.init(ServletConfig)
    
    
    /**
     * Handle incoming http GET requests.
     *
     * The TrackbackServlet does not support GET requests, it's a 404.
     */
    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws IOException, ServletException {
        
        response.sendError(HttpServletResponse.SC_NOT_FOUND);
    //#TrackbackServlet.java:80: method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.doGet(HttpServletRequest, HttpServletResponse)
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): response
    //#pre[1] (void doGet(HttpServletRequest, HttpServletResponse)): response != null
    }
    //#TrackbackServlet.java:81: end of method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.doGet(HttpServletRequest, HttpServletResponse)
    
    
    /**
     * Service incoming POST requests.
     *
     * Here we handle incoming trackback posts.
     */
    public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        
        String error = null;
    //#TrackbackServlet.java:92: method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.doPost(HttpServletRequest, HttpServletResponse)
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): ""._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "..."._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<.message>"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<.response>"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<?xml version="1.0" encoding="iso-8859-1"?>"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<error>0<.error>"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<error>1<.error>"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<message>"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<message>ERROR: "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "<response>"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "Comment Validation score: "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "Comments and Trackbacks are disabled for the entry you specified."._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "Entry not specified."._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "Trackback accepted"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "Trackback submitted to moderator"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "Trackbacks are disabled for this site"._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "[Trackback] "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "bad path info, "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "excerpt = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "handle = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "locale = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "name = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "not a weblog request, "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "not a weblog trackback request, "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "parsing path "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "pathInfo = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "title = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "unable to lookup entry: "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "unable to lookup weblog: "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "url = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): "weblogAnchor = "._tainted
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): java.lang.Boolean.FALSE
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): logger
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogCommentRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPageRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewResourceRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogCommentRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogPageRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogPreviewResourceRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogResourceRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogSearchRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Descendant_Table[others]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.log
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogResourceRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogSearchRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Descendant_Table[others]
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getBlogName()Ljava/lang/String;
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getExcerpt()Ljava/lang/String;
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getPathInfo()Ljava/lang/String;
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getTitle()Ljava/lang/String;
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getUrl()Ljava/lang/String;
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.getWeblogAnchor()Ljava/lang/String;
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.isLocale(Ljava/lang/String;)Z
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.setExcerpt(Ljava/lang/String;)V
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.__Dispatch_Table.setTitle(Ljava/lang/String;)V
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): request
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): response
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): this
    //#input(void doPost(HttpServletRequest, HttpServletResponse)): this.commentValidationManager
    //#pre[5] (void doPost(HttpServletRequest, HttpServletResponse)): response != null
    //#pre[1] (void doPost(HttpServletRequest, HttpServletResponse)): (soft) logger != null
    //#pre[2] (void doPost(HttpServletRequest, HttpServletResponse)): (soft) org/apache/roller/weblogger/ui/rendering/util/WeblogRequest.log != null
    //#pre[4] (void doPost(HttpServletRequest, HttpServletResponse)): (soft) request != null
    //#pre[7] (void doPost(HttpServletRequest, HttpServletResponse)): (soft) this.commentValidationManager != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): init'ed(java.lang.Boolean.FALSE)
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): java.lang.Object:getClass(...)@217 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletResponse:getWriter(...)@93 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.UserManager:getWebsiteByHandle(...)@122 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.WeblogManager:getWeblogEntryByAnchor(...)@131 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.Weblogger:getUserManager(...)@121 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.Weblogger:getWeblogManager(...)@130 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.Weblogger:getWeblogManager(...)@184 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@121 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@130 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@184 != null
    //#presumption(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@186 != null
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.util.WeblogRequest
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getServletPath
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:getPathInfo
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getRequestURL
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.WebloggerException
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.net.URLDecoder:decode
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:isDebugEnabled
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.util.ParsedRequest
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getPathInfo
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:endsWith
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getUserPrincipal
    //#unanalyzed(void doPost(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.security.Principal:getName
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@109: {0}, {1}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@181: {0}, {1}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@199: {0}, {1}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): java.lang.String:length(...)@116: {0..254}, {255..4_294_967_295}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getBooleanProperty(...)@101: {1}, {0}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getBooleanProperty(...)@181: {1}, {0}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.pojos.Weblog:getCommentModerationRequired(...)@169: {0}, {1}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.pojos.Weblog:getCommentModerationRequired(...)@189: {1}, {0}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.pojos.WeblogEntry:getCommentsStillAllowed(...)@153: {0}, {1}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.pojos.WeblogEntry:isPublished(...)@153: {0}, {1}
    //#test_vector(void doPost(HttpServletRequest, HttpServletResponse)): org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager:validateComment(...)@166: {-2_147_483_648..99, 101..4_294_967_295}, {100}
        PrintWriter pw = response.getWriter();
        
        Weblog weblog = null;
        WeblogEntry entry = null;
        
        RollerMessages messages = new RollerMessages();
    //#TrackbackServlet.java:98: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.RollerMessages()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.RollerMessages()
        
        WeblogTrackbackRequest trackbackRequest = null;
        if (!WebloggerRuntimeConfig.getBooleanProperty("users.trackbacks.enabled")) {
    //#TrackbackServlet.java:101: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getBooleanProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getBooleanProperty(String)
            // TODO: i18n
            error = "Trackbacks are disabled for this site";
        } else {
            
            try {
                trackbackRequest = new WeblogTrackbackRequest(request);
                
                if ((trackbackRequest.getTitle() == null) ||
    //#TrackbackServlet.java:109: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getTitle: init'ed(this.title)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_4
    //#    assertion: init'ed(this.title)
    //#    callee: String org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getTitle()
    //#    callee assertion: init'ed(this.title)
    //#    callee file: WeblogTrackbackRequest.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 179
    //#    VN: this.title
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
                        "".equals(trackbackRequest.getTitle())) {
                    trackbackRequest.setTitle(trackbackRequest.getUrl());
    //#TrackbackServlet.java:111: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getUrl: init'ed(this.url)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_6
    //#    assertion: init'ed(this.url)
    //#    callee: String org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getUrl()
    //#    callee assertion: init'ed(this.url)
    //#    callee file: WeblogTrackbackRequest.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 163
    //#    VN: this.url
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
                }
                
                if (trackbackRequest.getExcerpt() == null) {
    //#TrackbackServlet.java:114: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getExcerpt: init'ed(this.excerpt)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_7
    //#    assertion: init'ed(this.excerpt)
    //#    callee: String org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getExcerpt()
    //#    callee assertion: init'ed(this.excerpt)
    //#    callee file: WeblogTrackbackRequest.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 171
    //#    VN: this.excerpt
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
                    trackbackRequest.setExcerpt("");
                } else if (trackbackRequest.getExcerpt().length() >= 255) {
                    trackbackRequest.setExcerpt(trackbackRequest.getExcerpt().substring(0, 252)+"...");
                }
                
                // lookup weblog specified by comment request
                UserManager uMgr = WebloggerFactory.getWeblogger().getUserManager();
    //#TrackbackServlet.java:121: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#TrackbackServlet.java:121: Warning: method not available
    //#    -- call on UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()
                weblog = uMgr.getWebsiteByHandle(trackbackRequest.getWeblogHandle());
    //#TrackbackServlet.java:122: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.ui.rendering.util.WeblogTrackbackRequest:getWeblogHandle()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: String org.apache.roller.weblogger.ui.rendering.util.WeblogTrackbackRequest:getWeblogHandle()
    //#TrackbackServlet.java:122: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.business.UserManager:getWebsiteByHandle(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.business.UserManager:getWebsiteByHandle(String)
                
                if (weblog == null) {
                    throw new WebloggerException("unable to lookup weblog: "+
                            trackbackRequest.getWeblogHandle());
                }
                
                // lookup entry specified by comment request
                WeblogManager weblogMgr = WebloggerFactory.getWeblogger().getWeblogManager();
    //#TrackbackServlet.java:130: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#TrackbackServlet.java:130: Warning: method not available
    //#    -- call on WeblogManager org.apache.roller.weblogger.business.Weblogger:getWeblogManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: WeblogManager org.apache.roller.weblogger.business.Weblogger:getWeblogManager()
                entry = weblogMgr.getWeblogEntryByAnchor(weblog, trackbackRequest.getWeblogAnchor());
    //#TrackbackServlet.java:131: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getWeblogAnchor: init'ed(this.weblogAnchor)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_13
    //#    assertion: init'ed(this.weblogAnchor)
    //#    callee: String org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getWeblogAnchor()
    //#    callee assertion: init'ed(this.weblogAnchor)
    //#    callee file: WeblogTrackbackRequest.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 187
    //#    VN: this.weblogAnchor
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#TrackbackServlet.java:131: Warning: method not available
    //#    -- call on WeblogEntry org.apache.roller.weblogger.business.WeblogManager:getWeblogEntryByAnchor(Weblog, String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: WeblogEntry org.apache.roller.weblogger.business.WeblogManager:getWeblogEntryByAnchor(Weblog, String)
                
                if (entry == null) {
                    throw new WebloggerException("unable to lookup entry: "+
                            trackbackRequest.getWeblogAnchor());
                }
                
            } catch (Exception e) {
                // some kind of error parsing the request or looking up weblog
                logger.debug("error creating trackback request", e);
    //#TrackbackServlet.java:140: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object, Throwable)
                error = e.getMessage();
            }
        }
        
        if (error != null) {
            pw.println(this.getErrorResponse(error));
            return;
        }
        
        try {            
            // check if trackbacks are allowed for this entry
            // this checks site-wide settings, weblog settings, and entry settings
            if (entry != null && entry.getCommentsStillAllowed() && entry.isPublished()) {
    //#TrackbackServlet.java:153: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.pojos.WeblogEntry:getCommentsStillAllowed()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.pojos.WeblogEntry:getCommentsStillAllowed()
    //#TrackbackServlet.java:153: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.pojos.WeblogEntry:isPublished()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.pojos.WeblogEntry:isPublished()
                
                // Track trackbacks as comments
                WeblogEntryComment comment = new WeblogEntryComment();
    //#TrackbackServlet.java:156: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment()
                comment.setContent("[Trackback] "+trackbackRequest.getExcerpt());
    //#TrackbackServlet.java:157: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setContent(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setContent(String)
                comment.setName(trackbackRequest.getBlogName());
    //#TrackbackServlet.java:158: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getBlogName: init'ed(this.blogName)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_23
    //#    assertion: init'ed(trackbackRequest.blogName)
    //#    callee: String org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getBlogName()
    //#    callee assertion: init'ed(this.blogName)
    //#    callee file: WeblogTrackbackRequest.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 155
    //#    VN: trackbackRequest.blogName
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#TrackbackServlet.java:158: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setName(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setName(String)
                comment.setUrl(trackbackRequest.getUrl());
    //#TrackbackServlet.java:159: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getUrl: init'ed(this.url)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_23
    //#    assertion: init'ed(trackbackRequest.url)
    //#    callee: String org/apache/roller/weblogger/ui/rendering/util/WeblogTrackbackRequest.getUrl()
    //#    callee assertion: init'ed(this.url)
    //#    callee file: WeblogTrackbackRequest.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 163
    //#    VN: trackbackRequest.url
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#TrackbackServlet.java:159: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setUrl(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setUrl(String)
                comment.setWeblogEntry(entry);
    //#TrackbackServlet.java:160: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setWeblogEntry(WeblogEntry)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setWeblogEntry(WeblogEntry)
                comment.setRemoteHost(request.getRemoteHost());
    //#TrackbackServlet.java:161: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setRemoteHost(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setRemoteHost(String)
                comment.setNotify(Boolean.FALSE);
    //#TrackbackServlet.java:162: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setNotify(Boolean)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setNotify(Boolean)
                comment.setPostTime(new Timestamp(new Date().getTime()));
    //#TrackbackServlet.java:163: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setPostTime(Timestamp)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setPostTime(Timestamp)
                
                // run new trackback through validators
                int validationScore = commentValidationManager.validateComment(comment, messages);
    //#TrackbackServlet.java:166: Warning: method not available
    //#    -- call on int org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager:validateComment(WeblogEntryComment, RollerMessages)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: int org.apache.roller.weblogger.ui.rendering.plugins.comments.CommentValidationManager:validateComment(WeblogEntryComment, RollerMessages)
                logger.debug("Comment Validation score: " + validationScore);
    //#TrackbackServlet.java:167: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
                
                if (validationScore == 100 && weblog.getCommentModerationRequired()) {
    //#TrackbackServlet.java:169: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.pojos.Weblog:getCommentModerationRequired()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.pojos.Weblog:getCommentModerationRequired()
                    // Valid comments go into moderation if required
                    comment.setStatus(WeblogEntryComment.PENDING);
    //#TrackbackServlet.java:171: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setStatus(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setStatus(String)
                } else if (validationScore == 100) {
                    // else they're approved
                    comment.setStatus(WeblogEntryComment.APPROVED);
    //#TrackbackServlet.java:174: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setStatus(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setStatus(String)
                } else {
                    // Invalid comments are marked as spam
                    comment.setStatus(WeblogEntryComment.SPAM);
    //#TrackbackServlet.java:177: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.WeblogEntryComment:setStatus(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.WeblogEntryComment:setStatus(String)
                }
                
                // save, commit, send response
                if(!WeblogEntryComment.SPAM.equals(comment.getStatus()) ||
    //#TrackbackServlet.java:181: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.WeblogEntryComment:getStatus()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.WeblogEntryComment:getStatus()
    //#TrackbackServlet.java:181: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getBooleanProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getBooleanProperty(String)
                        !WebloggerRuntimeConfig.getBooleanProperty("trackbacks.ignoreSpam.enabled")) {
                    
                    WeblogManager mgr = WebloggerFactory.getWeblogger().getWeblogManager();
    //#TrackbackServlet.java:184: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#TrackbackServlet.java:184: Warning: method not available
    //#    -- call on WeblogManager org.apache.roller.weblogger.business.Weblogger:getWeblogManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: WeblogManager org.apache.roller.weblogger.business.Weblogger:getWeblogManager()
                    mgr.saveComment(comment);
    //#TrackbackServlet.java:185: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.WeblogManager:saveComment(WeblogEntryComment)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.WeblogManager:saveComment(WeblogEntryComment)
                    WebloggerFactory.getWeblogger().flush();
    //#TrackbackServlet.java:186: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#TrackbackServlet.java:186: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
                    
                    // only invalidate the cache if comment isn't moderated
                    if(!weblog.getCommentModerationRequired()) {
    //#TrackbackServlet.java:189: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.pojos.Weblog:getCommentModerationRequired()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.pojos.Weblog:getCommentModerationRequired()
                        // Clear all caches associated with comment
                        CacheManager.invalidate(comment);
    //#TrackbackServlet.java:191: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(WeblogEntryComment)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(WeblogEntryComment)
                    }
                    
                    // Send email notifications
                    MailUtil.sendEmailNotification(comment, messages, 
    //#TrackbackServlet.java:195: Warning: method not available
    //#    -- call on Locale org.apache.roller.weblogger.ui.rendering.util.WeblogTrackbackRequest:getLocaleInstance()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: Locale org.apache.roller.weblogger.ui.rendering.util.WeblogTrackbackRequest:getLocaleInstance()
    //#TrackbackServlet.java:195: Warning: method not available
    //#    -- call on I18nMessages org.apache.roller.weblogger.util.I18nMessages:getMessages(Locale)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: I18nMessages org.apache.roller.weblogger.util.I18nMessages:getMessages(Locale)
    //#TrackbackServlet.java:195: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.MailUtil:sendEmailNotification(WeblogEntryComment, RollerMessages, I18nMessages, bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.MailUtil:sendEmailNotification(WeblogEntryComment, RollerMessages, I18nMessages, bool)
                            I18nMessages.getMessages(trackbackRequest.getLocaleInstance()),
                            validationScore == 100);
                    
                    if(WeblogEntryComment.PENDING.equals(comment.getStatus())) {
    //#TrackbackServlet.java:199: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.WeblogEntryComment:getStatus()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
    //#    method: void doPost(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.WeblogEntryComment:getStatus()
                        pw.println(this.getSuccessResponse("Trackback submitted to moderator"));
                    } else {
                        pw.println(this.getSuccessResponse("Trackback accepted"));
                    }
                }
                
            } else if (entry!=null) {
                // TODO: i18n
                error = "Comments and Trackbacks are disabled for the entry you specified.";
            } else {
                // TODO: i18n
                error = "Entry not specified.";
            }
            
        } catch (Exception e) {
            error = e.getMessage();
            if ( error == null ) {
                error = e.getClass().getName();
            }
        }
        
        if(error!= null) {
            pw.println(this.getErrorResponse(error));
        }
        
    }
    //#TrackbackServlet.java:225: end of method: void org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.doPost(HttpServletRequest, HttpServletResponse)
    
    
    private String getSuccessResponse(String message) {
        
        StringBuffer output = new StringBuffer();
    //#TrackbackServlet.java:230: method: String org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.getSuccessResponse(String)
    //#input(String getSuccessResponse(String)): "<.message>"._tainted
    //#input(String getSuccessResponse(String)): "<.response>"._tainted
    //#input(String getSuccessResponse(String)): "<?xml version="1.0" encoding="iso-8859-1"?>"._tainted
    //#input(String getSuccessResponse(String)): "<error>0<.error>"._tainted
    //#input(String getSuccessResponse(String)): "<message>"._tainted
    //#input(String getSuccessResponse(String)): "<response>"._tainted
    //#input(String getSuccessResponse(String)): message
    //#input(String getSuccessResponse(String)): message._tainted
    //#output(String getSuccessResponse(String)): java.lang.StringBuffer:toString(...)._tainted
    //#output(String getSuccessResponse(String)): return_value
    //#new obj(String getSuccessResponse(String)): java.lang.StringBuffer:toString(...)
    //#post(String getSuccessResponse(String)): java.lang.StringBuffer:toString(...)._tainted == message._tainted
    //#post(String getSuccessResponse(String)): init'ed(java.lang.StringBuffer:toString(...)._tainted)
    //#post(String getSuccessResponse(String)): return_value == &java.lang.StringBuffer:toString(...)
        
        output.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
        output.append("<response>");
        output.append("<error>0</error>");
        output.append("<message>");
        output.append(message);
        output.append("</message>");
        output.append("</response>");
            
        return output.toString();
    //#TrackbackServlet.java:240: end of method: String org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.getSuccessResponse(String)
    }
    
    
    private String getErrorResponse(String message) {
        
        StringBuffer output = new StringBuffer();
    //#TrackbackServlet.java:246: method: String org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.getErrorResponse(String)
    //#input(String getErrorResponse(String)): "<.message>"._tainted
    //#input(String getErrorResponse(String)): "<.response>"._tainted
    //#input(String getErrorResponse(String)): "<?xml version="1.0" encoding="iso-8859-1"?>"._tainted
    //#input(String getErrorResponse(String)): "<error>1<.error>"._tainted
    //#input(String getErrorResponse(String)): "<message>ERROR: "._tainted
    //#input(String getErrorResponse(String)): "<response>"._tainted
    //#input(String getErrorResponse(String)): message
    //#input(String getErrorResponse(String)): message._tainted
    //#output(String getErrorResponse(String)): java.lang.StringBuffer:toString(...)._tainted
    //#output(String getErrorResponse(String)): return_value
    //#new obj(String getErrorResponse(String)): java.lang.StringBuffer:toString(...)
    //#post(String getErrorResponse(String)): java.lang.StringBuffer:toString(...)._tainted == message._tainted
    //#post(String getErrorResponse(String)): init'ed(java.lang.StringBuffer:toString(...)._tainted)
    //#post(String getErrorResponse(String)): return_value == &java.lang.StringBuffer:toString(...)
        
        output.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
        output.append("<response>");
        output.append("<error>1</error>");
        output.append("<message>ERROR: ");
        output.append(message);
        output.append("</message>");
        output.append("</response>");
            
        return output.toString();
    //#TrackbackServlet.java:256: end of method: String org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet.getErrorResponse(String)
    }
    
}
    //#TrackbackServlet.java:: end of class: org.apache.roller.weblogger.ui.rendering.servlets.TrackbackServlet
