//# 1 errors, 295 messages
//#
/*
    //#HitCountProcessingJob.java:1:1: class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
 * 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.business.runnable;

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.HitCountQueue;
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.Weblog;


/**
 * A job which gathers the currently queued hits from the HitCountQueue and
 * stores them in the database.
 */
public class HitCountProcessingJob implements Job {
    
    private static Log log = LogFactory.getLog(HitCountProcessingJob.class);
    //#HitCountProcessingJob.java:41: method: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init
    //#HitCountProcessingJob.java:41: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Descendant_Table[org/apache/roller/weblogger/business/runnable/HitCountProcessingJob]
    //#output(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Dispatch_Table.execute()V
    //#output(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Dispatch_Table.input(Ljava/util/Map;)V
    //#output(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Dispatch_Table.output()Ljava/util/Map;
    //#output(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): log
    //#output(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): org/apache/roller/weblogger/business/runnable/Job.__Descendant_Table[org/apache/roller/weblogger/business/runnable/HitCountProcessingJob]
    //#post(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Descendant_Table[org/apache/roller/weblogger/business/runnable/HitCountProcessingJob] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): org/apache/roller/weblogger/business/runnable/Job.__Descendant_Table[org/apache/roller/weblogger/business/runnable/HitCountProcessingJob] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Dispatch_Table.execute()V == &execute
    //#post(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Dispatch_Table.input(Ljava/util/Map;)V == &input
    //#post(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): __Dispatch_Table.output()Ljava/util/Map; == &output
    //#post(org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init): init'ed(log)
    //#HitCountProcessingJob.java:41: end of method: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.org.apache.roller.weblogger.business.runnable.HitCountProcessingJob__static_init
    
    
    public HitCountProcessingJob() {}
    //#HitCountProcessingJob.java:44: method: void org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.org.apache.roller.weblogger.business.runnable.HitCountProcessingJob()
    //#HitCountProcessingJob.java:44: end of method: void org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.org.apache.roller.weblogger.business.runnable.HitCountProcessingJob()
    
    
    /**
     * Execute the job.
     *
     * We want to extract the currently queued hits from the HitCounter and
     * then propogate them to the db for persistent storage.
     */
    public void execute() {
        
        UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
    //#HitCountProcessingJob.java:55: method: void org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.execute()
    //#HitCountProcessingJob.java:55: Warning: suspicious precondition
    //#    the precondition for org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    suspicious precondition index: [6]
    //#input(void execute()): " secs"._tainted
    //#input(void execute()): "Completed: "._tainted
    //#input(void execute()): "weblogHandleToId CACHE HIT - "._tainted
    //#input(void execute()): "weblogHandleToId CACHE MISS - "._tainted
    //#input(void execute()): log
    //#input(void execute()): org/apache/roller/weblogger/business/BookmarkManager.__Descendant_Table[org/apache/roller/weblogger/business/BookmarkManager]
    //#input(void execute()): org/apache/roller/weblogger/business/BookmarkManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPABookmarkManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/BookmarkManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/BookmarkManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/FileManager.__Descendant_Table[org/apache/roller/weblogger/business/FileManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/FileManager.__Descendant_Table[org/apache/roller/weblogger/business/FileManager]
    //#input(void execute()): org/apache/roller/weblogger/business/FileManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/FileManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/FileManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/GuiceWebloggerProvider.__Dispatch_Table.getWeblogger()Lorg/apache/roller/weblogger/business/Weblogger;
    //#input(void execute()): org/apache/roller/weblogger/business/HitCountQueue.__Descendant_Table[org/apache/roller/weblogger/business/HitCountQueue]
    //#input(void execute()): org/apache/roller/weblogger/business/HitCountQueue.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/HitCountQueue.__Dispatch_Table.getHits()Ljava/util/List;
    //#input(void execute()): org/apache/roller/weblogger/business/HitCountQueue.__Dispatch_Table.resetHits()V
    //#input(void execute()): org/apache/roller/weblogger/business/HitCountQueue.instance
    //#input(void execute()): org/apache/roller/weblogger/business/HitCountQueue.instance.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/HitCountQueue.instance.queue
    //#input(void execute()): org/apache/roller/weblogger/business/UserManager.__Descendant_Table[org/apache/roller/weblogger/business/UserManager]
    //#input(void execute()): org/apache/roller/weblogger/business/UserManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/UserManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/UserManager.__Dispatch_Table.getWebsiteByHandle(Ljava/lang/String;)Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void execute()): org/apache/roller/weblogger/business/UserManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/WeblogManager.__Descendant_Table[org/apache/roller/weblogger/business/WeblogManager]
    //#input(void execute()): org/apache/roller/weblogger/business/WeblogManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/WeblogManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/WeblogManager.__Dispatch_Table.incrementHitCount(Lorg/apache/roller/weblogger/pojos/Weblog;I)V
    //#input(void execute()): org/apache/roller/weblogger/business/WeblogManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Descendant_Table[org/apache/roller/weblogger/business/WebloggerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Descendant_Table[org/apache/roller/weblogger/business/Weblogger]
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Dispatch_Table.flush()V
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Dispatch_Table.getUserManager()Lorg/apache/roller/weblogger/business/UserManager;
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Dispatch_Table.getWeblogManager()Lorg/apache/roller/weblogger/business/WeblogManager;
    //#input(void execute()): org/apache/roller/weblogger/business/Weblogger.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.autoPingManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.autoPingManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.bookmarkManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.bookmarkManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.fileManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.fileManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.pingQueueManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.pingQueueManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.pingTargetManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.pingTargetManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.pluginManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.pluginManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.refererManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.refererManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.strategy
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.strategy.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.strategy.emf
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.strategy.threadLocalEntityManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.threadManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.threadManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.userManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.userManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.userManager.strategy
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.userManager.strategy.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.userManager.strategy.emf
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.userManager.strategy.threadLocalEntityManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.userManager.weblogHandleToIdMap
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.weblogManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.weblogManager.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.weblogManager.strategy
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.weblogManager.strategy.__Tag
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.weblogManager.strategy.emf
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance.weblogManager.strategy.threadLocalEntityManager
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerImpl.__Dispatch_Table.flush()V
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerImpl.__Dispatch_Table.getUserManager()Lorg/apache/roller/weblogger/business/UserManager;
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerImpl.__Dispatch_Table.getWeblogManager()Lorg/apache/roller/weblogger/business/WeblogManager;
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerImpl.log
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerProvider.__Descendant_Table[org/apache/roller/weblogger/business/GuiceWebloggerProvider]
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerProvider.__Descendant_Table[org/apache/roller/weblogger/business/WebloggerProvider]
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerProvider.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/WebloggerProvider.__Dispatch_Table.getWeblogger()Lorg/apache/roller/weblogger/business/Weblogger;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPABookmarkManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy]
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.__Dispatch_Table.flush()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.__Dispatch_Table.getNamedQuery(Ljava/lang/String;)Ljavax/persistence/Query;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.__Dispatch_Table.load(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.__Dispatch_Table.store(Ljava/lang/Object;)Ljava/lang/Object;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.javax.persistence.FlushModeType.COMMIT
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.__Dispatch_Table.getWebsite(Ljava/lang/String;)Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.__Dispatch_Table.getWebsiteByHandle(Ljava/lang/String;)Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.__Dispatch_Table.getWebsiteByHandle(Ljava/lang/String;Ljava/lang/Boolean;)Lorg/apache/roller/weblogger/pojos/Weblog;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.java.lang.Boolean.TRUE
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.log
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.__Dispatch_Table.incrementHitCount(Lorg/apache/roller/weblogger/pojos/Weblog;I)V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.__Dispatch_Table.flush()V
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.__Dispatch_Table.getUserManager()Lorg/apache/roller/weblogger/business/UserManager;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.__Dispatch_Table.getWeblogManager()Lorg/apache/roller/weblogger/business/WeblogManager;
    //#input(void execute()): org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/pings/AutoPingManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/AutoPingManager.__Descendant_Table[org/apache/roller/weblogger/business/pings/AutoPingManager]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/AutoPingManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/AutoPingManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingQueueManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingQueueManager.__Descendant_Table[org/apache/roller/weblogger/business/pings/PingQueueManager]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingQueueManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingQueueManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingTargetManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingTargetManager.__Descendant_Table[org/apache/roller/weblogger/business/pings/PingTargetManager]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingTargetManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/pings/PingTargetManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/plugins/PluginManager.__Descendant_Table[org/apache/roller/weblogger/business/plugins/PluginManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/plugins/PluginManager.__Descendant_Table[org/apache/roller/weblogger/business/plugins/PluginManager]
    //#input(void execute()): org/apache/roller/weblogger/business/plugins/PluginManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/plugins/PluginManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/plugins/PluginManagerImpl.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/referrers/RefererManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/referrers/RefererManager.__Descendant_Table[org/apache/roller/weblogger/business/referrers/RefererManager]
    //#input(void execute()): org/apache/roller/weblogger/business/referrers/RefererManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/referrers/RefererManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/runnable/ThreadManager.__Descendant_Table[org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/runnable/ThreadManager.__Descendant_Table[org/apache/roller/weblogger/business/runnable/ThreadManagerImpl]
    //#input(void execute()): org/apache/roller/weblogger/business/runnable/ThreadManager.__Descendant_Table[org/apache/roller/weblogger/business/runnable/ThreadManager]
    //#input(void execute()): org/apache/roller/weblogger/business/runnable/ThreadManager.__Descendant_Table[others]
    //#input(void execute()): org/apache/roller/weblogger/business/runnable/ThreadManager.__Dispatch_Table.release()V
    //#input(void execute()): org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.__Dispatch_Table.release()V
    //#output(void execute()): org/apache/roller/weblogger/business/HitCountQueue.instance.queue
    //#pre[1] (void execute()): log != null
    //#pre[2] (void execute()): init'ed(org/apache/roller/weblogger/business/HitCountQueue.instance.queue)
    //#pre[3] (void execute()): org/apache/roller/weblogger/business/HitCountQueue.instance != null
    //#pre[4] (void execute()): org/apache/roller/weblogger/business/HitCountQueue.instance.__Tag == org/apache/roller/weblogger/business/HitCountQueue
    //#pre[5] (void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider != null
    //#pre[6] (void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.__Tag in {org/apache/roller/weblogger/business/GuiceWebloggerProvider, org/apache/roller/weblogger/business/WebloggerProvider}
    //#pre[7] (void execute()): org/apache/roller/weblogger/business/WebloggerFactory.webloggerProvider.webloggerInstance != null
    //#pre[8] (void execute()): (soft) org/apache/roller/weblogger/business/WebloggerImpl.log != null
    //#pre[9] (void execute()): (soft) org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.log != null
    //#presumption(void execute()): getWeblogger(...).__Tag in {org/apache/roller/weblogger/business/Weblogger, org/apache/roller/weblogger/business/WebloggerImpl, org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl}
    //#presumption(void execute()): getWeblogger(...).__Tag in {org/apache/roller/weblogger/business/Weblogger, org/apache/roller/weblogger/business/WebloggerImpl, org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl}
    //#presumption(void execute()): getWeblogger(...).__Tag in {org/apache/roller/weblogger/business/Weblogger, org/apache/roller/weblogger/business/WebloggerImpl, org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl}
    //#presumption(void execute()): getWeblogger(...).__Tag in {org/apache/roller/weblogger/business/Weblogger, org/apache/roller/weblogger/business/WebloggerImpl, org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl}
    //#presumption(void execute()): getWeblogger(...).__Tag in {org/apache/roller/weblogger/business/Weblogger, org/apache/roller/weblogger/business/WebloggerImpl, org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl}
    //#presumption(void execute()): getWeblogger(...).autoPingManager != null
    //#presumption(void execute()): getWeblogger(...).autoPingManager != null
    //#presumption(void execute()): getWeblogger(...).autoPingManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl, org/apache/roller/weblogger/business/pings/AutoPingManager}
    //#presumption(void execute()): getWeblogger(...).autoPingManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl, org/apache/roller/weblogger/business/pings/AutoPingManager}
    //#presumption(void execute()): getWeblogger(...).bookmarkManager != null
    //#presumption(void execute()): getWeblogger(...).bookmarkManager != null
    //#presumption(void execute()): getWeblogger(...).bookmarkManager.__Tag in {org/apache/roller/weblogger/business/BookmarkManager, org/apache/roller/weblogger/business/jpa/JPABookmarkManagerImpl}
    //#presumption(void execute()): getWeblogger(...).bookmarkManager.__Tag in {org/apache/roller/weblogger/business/BookmarkManager, org/apache/roller/weblogger/business/jpa/JPABookmarkManagerImpl}
    //#presumption(void execute()): getWeblogger(...).fileManager != null
    //#presumption(void execute()): getWeblogger(...).fileManager != null
    //#presumption(void execute()): getWeblogger(...).fileManager.__Tag in {org/apache/roller/weblogger/business/FileManager, org/apache/roller/weblogger/business/FileManagerImpl}
    //#presumption(void execute()): getWeblogger(...).fileManager.__Tag in {org/apache/roller/weblogger/business/FileManager, org/apache/roller/weblogger/business/FileManagerImpl}
    //#presumption(void execute()): getWeblogger(...).pingQueueManager != null
    //#presumption(void execute()): getWeblogger(...).pingQueueManager != null
    //#presumption(void execute()): getWeblogger(...).pingQueueManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl, org/apache/roller/weblogger/business/pings/PingQueueManager}
    //#presumption(void execute()): getWeblogger(...).pingQueueManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl, org/apache/roller/weblogger/business/pings/PingQueueManager}
    //#presumption(void execute()): getWeblogger(...).pingTargetManager != null
    //#presumption(void execute()): getWeblogger(...).pingTargetManager != null
    //#presumption(void execute()): getWeblogger(...).pingTargetManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl, org/apache/roller/weblogger/business/pings/PingTargetManager}
    //#presumption(void execute()): getWeblogger(...).pingTargetManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl, org/apache/roller/weblogger/business/pings/PingTargetManager}
    //#presumption(void execute()): getWeblogger(...).pluginManager != null
    //#presumption(void execute()): getWeblogger(...).pluginManager != null
    //#presumption(void execute()): getWeblogger(...).pluginManager.__Tag in {org/apache/roller/weblogger/business/plugins/PluginManager, org/apache/roller/weblogger/business/plugins/PluginManagerImpl}
    //#presumption(void execute()): getWeblogger(...).pluginManager.__Tag in {org/apache/roller/weblogger/business/plugins/PluginManager, org/apache/roller/weblogger/business/plugins/PluginManagerImpl}
    //#presumption(void execute()): getWeblogger(...).refererManager != null
    //#presumption(void execute()): getWeblogger(...).refererManager != null
    //#presumption(void execute()): getWeblogger(...).refererManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl, org/apache/roller/weblogger/business/referrers/RefererManager}
    //#presumption(void execute()): getWeblogger(...).refererManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl, org/apache/roller/weblogger/business/referrers/RefererManager}
    //#presumption(void execute()): getWeblogger(...).strategy != null
    //#presumption(void execute()): getWeblogger(...).strategy.__Tag == org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy
    //#presumption(void execute()): getWeblogger(...).strategy.emf != null
    //#presumption(void execute()): getWeblogger(...).strategy.threadLocalEntityManager != null
    //#presumption(void execute()): getWeblogger(...).threadManager != null
    //#presumption(void execute()): getWeblogger(...).threadManager != null
    //#presumption(void execute()): getWeblogger(...).threadManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl, org/apache/roller/weblogger/business/runnable/ThreadManager, org/apache/roller/weblogger/business/runnable/ThreadManagerImpl}
    //#presumption(void execute()): getWeblogger(...).threadManager.__Tag in {org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl, org/apache/roller/weblogger/business/runnable/ThreadManager, org/apache/roller/weblogger/business/runnable/ThreadManagerImpl}
    //#presumption(void execute()): getWeblogger(...).userManager != null
    //#presumption(void execute()): getWeblogger(...).userManager != null
    //#presumption(void execute()): getWeblogger(...).userManager != null
    //#presumption(void execute()): getWeblogger(...).userManager.__Tag in {org/apache/roller/weblogger/business/UserManager, org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl}
    //#presumption(void execute()): getWeblogger(...).userManager.__Tag in {org/apache/roller/weblogger/business/UserManager, org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl}
    //#presumption(void execute()): getWeblogger(...).weblogManager != null
    //#presumption(void execute()): getWeblogger(...).weblogManager != null
    //#presumption(void execute()): getWeblogger(...).weblogManager != null
    //#presumption(void execute()): getWeblogger(...).weblogManager.__Tag in {org/apache/roller/weblogger/business/WeblogManager, org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl}
    //#presumption(void execute()): getWeblogger(...).weblogManager.__Tag in {org/apache/roller/weblogger/business/WeblogManager, org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl}
    //#presumption(void execute()): java.lang.Long:intValue(...)@93 != 0
    //#presumption(void execute()): java.lang.Long:longValue(...)@76 <= 18_446_744_073_709_551_614
    //#presumption(void execute()): java.util.Iterator:next(...)@89 != null
    //#presumption(void execute()): java.util.Map:get(...)@93 != null
    //#presumption(void execute()): java.util.Map:keySet(...)@87 != null
    //#presumption(void execute()): umgr.__Tag == org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl
    //#presumption(void execute()): umgr.strategy != null
    //#presumption(void execute()): umgr.strategy.__Tag == org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy
    //#presumption(void execute()): umgr.strategy.emf != null
    //#presumption(void execute()): umgr.strategy.threadLocalEntityManager != null
    //#presumption(void execute()): umgr.weblogHandleToIdMap != null
    //#presumption(void execute()): wmgr.__Tag in {org/apache/roller/weblogger/business/WeblogManager, org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl}
    //#presumption(void execute()): wmgr.strategy != null
    //#presumption(void execute()): wmgr.strategy.__Tag == org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy
    //#presumption(void execute()): wmgr.strategy.emf@92 != null
    //#presumption(void execute()): wmgr.strategy.threadLocalEntityManager != null
    //#post(void execute()): init'ed(org/apache/roller/weblogger/business/HitCountQueue.instance.queue)
    //#unanalyzed(void execute()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Collections:synchronizedList
    //#unanalyzed(void execute()): Effects-of-calling:getWeblogger
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.ThreadLocal:get
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityManagerFactory:createEntityManager
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.ThreadLocal:set
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityManager:getTransaction
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityTransaction:isActive
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityTransaction:begin
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityManager:find
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityManager:createNamedQuery
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.Query:setFlushMode
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.Query:setParameter
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.Query:getSingleResult
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.Weblog:getHandle
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Map:remove
    //#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:java.util.Map:put
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void execute()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void execute()): Effects-of-calling:java.lang.Boolean:equals
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.Weblog:getEnabled
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.Weblog:getId
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityManager:contains
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityManager:persist
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogHitCount
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogHitCount:setWeblog
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogHitCount:setDailyHits
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogHitCount:getDailyHits
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityTransaction:commit
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.roller.RollerException
    //#unanalyzed(void execute()): Effects-of-calling:release
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityTransaction:rollback
    //#unanalyzed(void execute()): Effects-of-calling:javax.persistence.EntityManager:close
    //#unanalyzed(void execute()): Effects-of-calling:org.apache.commons.logging.Log:error
    //#test_vector(void execute()): java.util.Iterator:hasNext(...)@88: {0}, {1}
    //#test_vector(void execute()): java.util.Map:get(...)@72: Inverse{null}, Addr_Set{null}
        WeblogManager wmgr = WebloggerFactory.getWeblogger().getWeblogManager();
        
        HitCountQueue hitCounter = HitCountQueue.getInstance();
        
        // first get the current set of hits
        List currentHits = hitCounter.getHits();
        
        // now reset the queued hits
        hitCounter.resetHits();
        
        // tally the counts, grouped by weblog handle
        Map hitsTally = new HashMap();
        String weblogHandle = null;
    //#HitCountProcessingJob.java:68: Warning: unused assignment
    //#    unused assignment into weblogHandle
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    Attribs:  Uncertain
        for(int i=0; i < currentHits.size(); i++) {
            weblogHandle = (String) currentHits.get(i);
            
            Long count = (Long) hitsTally.get(weblogHandle);
            if(count == null) {
                count = new Long(1);
            } else {
                count = new Long(count.longValue()+1);
            }
            hitsTally.put(weblogHandle, count);
        }
        
        // iterate over the tallied hits and store them in the db
        try {
            long startTime = System.currentTimeMillis();
            
            Weblog weblog = null;
    //#HitCountProcessingJob.java:85: Warning: unused assignment
    //#    unused assignment into weblog
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    Attribs:  Uncertain
            String key = null;
    //#HitCountProcessingJob.java:86: Warning: unused assignment
    //#    unused assignment into key
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    Attribs:  Uncertain
            Iterator it = hitsTally.keySet().iterator();
            while(it.hasNext()) {
                key = (String) it.next();
                
                try {
                    weblog = umgr.getWebsiteByHandle(key);
                    wmgr.incrementHitCount(weblog, ((Long)hitsTally.get(key)).intValue());
    //#HitCountProcessingJob.java:93: ?precondition failure
    //#    org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.incrementHitCount: weblog != null
    //#    severity: MEDIUM
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    basic block: bb_11
    //#    assertion: getWebsiteByHandle(...) != null
    //#    callee: void org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.incrementHitCount(Weblog, int)
    //#    callee assertion: weblog != null
    //#    callee file: JPAWeblogManagerImpl.java
    //#    callee precondition index: [7]
    //#    callee srcpos: 1575
    //#    VN: getWebsiteByHandle(...)
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
                } catch (WebloggerException ex) {
                    log.error(ex);
    //#HitCountProcessingJob.java:95: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object)
                }
            }
            
            // flush the results to the db
            WebloggerFactory.getWeblogger().flush();
            
            long endTime = System.currentTimeMillis();
            
            log.debug("Completed: "+ (endTime-startTime)/1000 + " secs");
    //#HitCountProcessingJob.java:104: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
            
        } catch (WebloggerException ex) {
            log.error("Error persisting updated hit counts", ex);
    //#HitCountProcessingJob.java:107: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
    //#    method: void execute()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
        } finally {
            // release session
            WebloggerFactory.getWeblogger().release();
        }
    }
    //#HitCountProcessingJob.java:112: end of method: void org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.execute()
    
    
    public void input(Map input) {
        // no-op
    }
    //#HitCountProcessingJob.java:117: method: void org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.input(Map)
    //#HitCountProcessingJob.java:117: end of method: void org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.input(Map)
    
    public Map output() {
        return null;
    //#HitCountProcessingJob.java:120: method: Map org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.output()
    //#output(Map output()): return_value
    //#post(Map output()): return_value == null
    //#HitCountProcessingJob.java:120: end of method: Map org.apache.roller.weblogger.business.runnable.HitCountProcessingJob.output()
    }
    
}
    //#HitCountProcessingJob.java:: end of class: org.apache.roller.weblogger.business.runnable.HitCountProcessingJob
