//# 0 errors, 209 messages
//#
/*
    //#WeblogCacheWarmupJob.java:1:1: class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
 * 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.util.cache;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.business.runnable.Job;
import org.apache.roller.weblogger.config.WebloggerConfig;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.business.UserManager;
import org.apache.roller.weblogger.pojos.StaticTemplate;
import org.apache.roller.weblogger.pojos.Template;
import org.apache.roller.weblogger.pojos.Weblog;
import org.apache.roller.weblogger.ui.rendering.Renderer;
import org.apache.roller.weblogger.ui.rendering.RendererManager;
import org.apache.roller.weblogger.ui.rendering.model.ModelLoader;
import org.apache.roller.weblogger.ui.rendering.util.cache.WeblogFeedCache;
import org.apache.roller.weblogger.ui.rendering.util.WeblogFeedRequest;
import org.apache.roller.weblogger.util.cache.CachedContent;


/**
 * EXPERIMENTAL!!
 *
 * A job which will "warm up" some of the rendering layer caches by iterating
 * over all weblogs in the system and rendering a set of their content to put
 * in the caches for later use.
 *
 * Currently only supports warming up the feed cache.
 */
public class WeblogCacheWarmupJob implements Job {
    //#WeblogCacheWarmupJob.java:52: method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob()
    //#input(void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob()): this
    //#output(void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob()): this.inputs
    //#post(void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob()): this.inputs == null
    
    private static Log log = LogFactory.getLog(WeblogCacheWarmupJob.class);
    //#WeblogCacheWarmupJob.java:54: method: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init
    //#WeblogCacheWarmupJob.java:54: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/cache/WeblogCacheWarmupJob]
    //#output(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.execute()V
    //#output(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.input(Ljava/util/Map;)V
    //#output(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.output()Ljava/util/Map;
    //#output(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.warmupFeedCache(Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): log
    //#post(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/cache/WeblogCacheWarmupJob] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.execute()V == &execute
    //#post(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.input(Ljava/util/Map;)V == &input
    //#post(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.output()Ljava/util/Map; == &output
    //#post(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): __Dispatch_Table.warmupFeedCache(Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)V == &warmupFeedCache
    //#post(org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init): init'ed(log)
    //#WeblogCacheWarmupJob.java:54: end of method: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob__static_init
    
    // inputs from the user
    private Map inputs = null;
    //#WeblogCacheWarmupJob.java:57: end of method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob()
    
    
    public void execute() {
        
        log.debug("starting");
    //#WeblogCacheWarmupJob.java:62: method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.execute()
    //#WeblogCacheWarmupJob.java:62: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void execute()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
    //#input(void execute()): " in "._tainted
    //#input(void execute()): " secs."._tainted
    //#input(void execute()): "-"._tainted
    //#input(void execute()): "."._tainted
    //#input(void execute()): ".excerpts"._tainted
    //#input(void execute()): ".tags."._tainted
    //#input(void execute()): ".vm"._tainted
    //#input(void execute()): ":"._tainted
    //#input(void execute()): "Completed warmup for "._tainted
    //#input(void execute()): "Error rendering for weblog "._tainted
    //#input(void execute()): "PUT "._tainted
    //#input(void execute()): "atom"._tainted
    //#input(void execute()): "cache.weblogfeed"._tainted
    //#input(void execute()): "doing weblog "._tainted
    //#input(void execute()): "entries"._tainted
    //#input(void execute()): "rss"._tainted
    //#input(void execute()): "templates.feeds.weblog-"._tainted
    //#input(void execute()): log
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest]
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getFormat()Ljava/lang/String;
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getLocale()Ljava/lang/String;
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getTags()Ljava/util/List;
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getType()Ljava/lang/String;
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getWeblogCategoryName()Ljava/lang/String;
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.isExcerpts()Z
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.setFormat(Ljava/lang/String;)V
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.setType(Ljava/lang/String;)V
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.setWeblogHandle(Ljava/lang/String;)V
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache]
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Dispatch_Table.generateKey(Lorg/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest;)Ljava/lang/String;
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Dispatch_Table.put(Ljava/lang/String;Ljava/lang/Object;)V
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.log
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.__Tag
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.cacheEnabled
    //#input(void execute()): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.contentCache
    //#input(void execute()): this
    //#input(void execute()): this.inputs
    //#pre[1] (void execute()): log != null
    //#pre[8] (void execute()): init'ed(this.inputs)
    //#pre[2] (void execute()): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.log != null
    //#pre[3] (void execute()): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance != null
    //#pre[4] (void execute()): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.__Tag == org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache
    //#pre[5] (void execute()): (soft) init'ed(org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.cacheEnabled)
    //#pre[6] (void execute()): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.contentCache != null
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.System:currentTimeMillis
    //#unanalyzed(void execute()): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.util.WeblogRequest
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.util.ParsedRequest
    //#unanalyzed(void execute()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.config.WebloggerConfig:getProperty
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.model.ModelLoader:loadModels
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.StaticTemplate
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.RendererManager:getRenderer
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.util.cache.CachedContent
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.util.cache.CachedContent:getCachedWriter
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.Renderer:render
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.util.cache.CachedContent:flush
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.util.cache.CachedContent:close
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void execute()): Effects-of-calling:java.net.URLEncoder:encode
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void execute()): Effects-of-calling:java.util.List:size
    //#unanalyzed(void execute()): Effects-of-calling:java.util.TreeSet
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Set:size
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Set:toArray
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.util.Utilities:stringArrayToString
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.util.cache.LazyExpiringCacheEntry
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.util.cache.Cache:put
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.commons.logging.Log:info
    //#test_vector(void execute()): this.inputs: Addr_Set{null}, Inverse{null}
    //#test_vector(void execute()): java.lang.String:equals(...)@74: {0}, {1}
    //#test_vector(void execute()): java.lang.String:equals(...)@79: {0}, {1}
    //#test_vector(void execute()): java.util.Map:get(...)@68: Inverse{null}, Addr_Set{null}
        
        // check inputs to see what work we are going to do
        if(inputs != null) {
            
            // what weblogs will we handle?
            List weblogs = (List) inputs.get("weblogs");
            if(weblogs == null) {
                return;
            }
            
            // should we do rss entries feeds?
            if("true".equals((String) inputs.get("feed-entries-rss"))) {
                this.warmupFeedCache(weblogs, "entries", "rss");
            }
            
            // should we do atom entries feeds?
            if("true".equals((String) inputs.get("feed-entries-atom"))) {
                this.warmupFeedCache(weblogs, "entries", "atom");
            }
        }
        
        log.debug("finished");
    //#WeblogCacheWarmupJob.java:84: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void execute()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
    }
    //#WeblogCacheWarmupJob.java:85: end of method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.execute()
    
    
    public Map output() {
       return null; 
    //#WeblogCacheWarmupJob.java:89: method: Map org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.output()
    //#output(Map output()): return_value
    //#post(Map output()): return_value == null
    //#WeblogCacheWarmupJob.java:89: end of method: Map org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.output()
    }
    
    
    public void input(Map input) {
        this.inputs = input;
    //#WeblogCacheWarmupJob.java:94: method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.input(Map)
    //#input(void input(Map)): input
    //#input(void input(Map)): this
    //#output(void input(Map)): this.inputs
    //#post(void input(Map)): this.inputs == input
    //#post(void input(Map)): init'ed(this.inputs)
    }
    //#WeblogCacheWarmupJob.java:95: end of method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.input(Map)
    
    
    private void warmupFeedCache(List weblogs, String type, String format) {
        
        if(weblogs == null) {
    //#WeblogCacheWarmupJob.java:100: method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.warmupFeedCache(List, String, String)
    //#input(void warmupFeedCache(List, String, String)): " in "._tainted
    //#input(void warmupFeedCache(List, String, String)): " secs."._tainted
    //#input(void warmupFeedCache(List, String, String)): "-"._tainted
    //#input(void warmupFeedCache(List, String, String)): "."._tainted
    //#input(void warmupFeedCache(List, String, String)): ".excerpts"._tainted
    //#input(void warmupFeedCache(List, String, String)): ".tags."._tainted
    //#input(void warmupFeedCache(List, String, String)): ".vm"._tainted
    //#input(void warmupFeedCache(List, String, String)): ":"._tainted
    //#input(void warmupFeedCache(List, String, String)): "Completed warmup for "._tainted
    //#input(void warmupFeedCache(List, String, String)): "Error rendering for weblog "._tainted
    //#input(void warmupFeedCache(List, String, String)): "PUT "._tainted
    //#input(void warmupFeedCache(List, String, String)): "cache.weblogfeed"._tainted
    //#input(void warmupFeedCache(List, String, String)): "doing weblog "._tainted
    //#input(void warmupFeedCache(List, String, String)): "templates.feeds.weblog-"._tainted
    //#input(void warmupFeedCache(List, String, String)): format
    //#input(void warmupFeedCache(List, String, String)): format._tainted
    //#input(void warmupFeedCache(List, String, String)): log
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest]
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Descendant_Table[others]
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getFormat()Ljava/lang/String;
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getLocale()Ljava/lang/String;
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getTags()Ljava/util/List;
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getType()Ljava/lang/String;
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getWeblogCategoryName()Ljava/lang/String;
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.isExcerpts()Z
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.setFormat(Ljava/lang/String;)V
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.setType(Ljava/lang/String;)V
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest.__Dispatch_Table.setWeblogHandle(Ljava/lang/String;)V
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache]
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Descendant_Table[others]
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Dispatch_Table.generateKey(Lorg/apache/roller/weblogger/ui/rendering/util/WeblogFeedRequest;)Ljava/lang/String;
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.__Dispatch_Table.put(Ljava/lang/String;Ljava/lang/Object;)V
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.log
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.__Tag
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.cacheEnabled
    //#input(void warmupFeedCache(List, String, String)): org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.contentCache
    //#input(void warmupFeedCache(List, String, String)): type
    //#input(void warmupFeedCache(List, String, String)): type._tainted
    //#input(void warmupFeedCache(List, String, String)): weblogs
    //#pre[3] (void warmupFeedCache(List, String, String)): (soft) log != null
    //#pre[4] (void warmupFeedCache(List, String, String)): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.log != null
    //#pre[5] (void warmupFeedCache(List, String, String)): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance != null
    //#pre[6] (void warmupFeedCache(List, String, String)): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.__Tag == org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache
    //#pre[7] (void warmupFeedCache(List, String, String)): (soft) init'ed(org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.cacheEnabled)
    //#pre[8] (void warmupFeedCache(List, String, String)): (soft) org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.singletonInstance.contentCache != null
    //#presumption(void warmupFeedCache(List, String, String)): java.lang.System:currentTimeMillis(...)@164 - java.lang.System:currentTimeMillis(...)@107 in -9_223_372_036_854_775..18_446_744_073_709_551
    //#presumption(void warmupFeedCache(List, String, String)): org.apache.roller.weblogger.ui.rendering.RendererManager:getRenderer(...)@142 != null
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.util.WeblogRequest
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.util.ParsedRequest
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.net.URLEncoder:encode
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.util.List:size
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.util.TreeSet
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.util.Set:size
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.util.Set:toArray
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:org.apache.roller.weblogger.util.Utilities:stringArrayToString
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:org.apache.roller.weblogger.util.cache.LazyExpiringCacheEntry
    //#unanalyzed(void warmupFeedCache(List, String, String)): Effects-of-calling:org.apache.roller.weblogger.util.cache.Cache:put
    //#test_vector(void warmupFeedCache(List, String, String)): weblogs: Inverse{null}, Addr_Set{null}
    //#test_vector(void warmupFeedCache(List, String, String)): java.util.Iterator:hasNext(...)@111: {0}, {1}
            return;
        }
        
        // we are working on the feed cache
        WeblogFeedCache feedCache = WeblogFeedCache.getInstance();
        
        long start = System.currentTimeMillis();
        
        Iterator allWeblogs = weblogs.iterator();
        String weblogHandle = null;
    //#WeblogCacheWarmupJob.java:110: Warning: unused assignment
    //#    unused assignment into weblogHandle
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    Attribs:  Uncertain
        while(allWeblogs.hasNext()) {
            weblogHandle = (String) allWeblogs.next();
            log.debug("doing weblog "+weblogHandle);
    //#WeblogCacheWarmupJob.java:113: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
            
            try {
                // we need a feed request to represent the data
                WeblogFeedRequest feedRequest = new WeblogFeedRequest();
                feedRequest.setWeblogHandle(weblogHandle);
                feedRequest.setType(type);
                feedRequest.setFormat(format);
                
                
                // populate the rendering model
                HashMap model = new HashMap();
                Map initData = new HashMap();
                initData.put("request", null);
                initData.put("feedRequest", feedRequest);
                initData.put("weblogRequest", feedRequest);
                
                // Load models for feeds
                String feedModels = WebloggerConfig.getProperty("rendering.feedModels");
    //#WeblogCacheWarmupJob.java:131: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerConfig:getProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerConfig:getProperty(String)
                ModelLoader.loadModels(feedModels, model, initData, true);
    //#WeblogCacheWarmupJob.java:132: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.rendering.model.ModelLoader:loadModels(String, Map, Map, bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader:loadModels(String, Map, Map, bool)
                
                // TODO: re-enable custom models when they are actually used
                // Load weblog custom models
                //ModelLoader.loadCustomModels(weblog, model, initData);
                
                
                // lookup Renderer we are going to use
                Renderer renderer = null;
    //#WeblogCacheWarmupJob.java:140: Warning: unused assignment
    //#    unused assignment into renderer
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    Attribs:  Uncertain
                Template template = new StaticTemplate("templates/feeds/weblog-"+type+"-"+format+".vm", "velocity");
    //#WeblogCacheWarmupJob.java:141: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.StaticTemplate(String, String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.StaticTemplate(String, String)
                renderer = RendererManager.getRenderer(template);
    //#WeblogCacheWarmupJob.java:142: Warning: method not available
    //#    -- call on Renderer org.apache.roller.weblogger.ui.rendering.RendererManager:getRenderer(Template)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: Renderer org.apache.roller.weblogger.ui.rendering.RendererManager:getRenderer(Template)
                
                
                // render content.  use default size of about 24K for a standard page
                CachedContent rendererOutput = new CachedContent(24567);
    //#WeblogCacheWarmupJob.java:146: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CachedContent(int)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CachedContent(int)
                renderer.render(model, rendererOutput.getCachedWriter());
    //#WeblogCacheWarmupJob.java:147: Warning: method not available
    //#    -- call on PrintWriter org.apache.roller.weblogger.util.cache.CachedContent:getCachedWriter()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: PrintWriter org.apache.roller.weblogger.util.cache.CachedContent:getCachedWriter()
    //#WeblogCacheWarmupJob.java:147: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.rendering.Renderer:render(Map, Writer)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.rendering.Renderer:render(Map, Writer)
                
                
                // flush rendered output and close
                rendererOutput.flush();
    //#WeblogCacheWarmupJob.java:151: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CachedContent:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CachedContent:flush()
                rendererOutput.close();
    //#WeblogCacheWarmupJob.java:152: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CachedContent:close()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CachedContent:close()
                
                // now just put it in the cache
                String key = feedCache.generateKey(feedRequest);
                feedCache.put(key, rendererOutput);
                
            } catch(Exception e) {
                // bummer, error during rendering
                log.error("Error rendering for weblog "+weblogHandle, e);
    //#WeblogCacheWarmupJob.java:160: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            }
        }
        
        long end = System.currentTimeMillis();
        long time = (end-start)*1000;
        
        log.info("Completed warmup for "+type+"/"+format+" in "+time+" secs.");
    //#WeblogCacheWarmupJob.java:167: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
    //#    method: void warmupFeedCache(List, String, String)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        
    }
    //#WeblogCacheWarmupJob.java:169: end of method: void org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob.warmupFeedCache(List, String, String)
    
}
    //#WeblogCacheWarmupJob.java:: end of class: org.apache.roller.weblogger.ui.rendering.util.cache.WeblogCacheWarmupJob
