//# 0 errors, 220 messages
//#
/*
    //#PingTimer.java:1:1: class: com.dmdirc.parser.irc.PingTimer
    //#PingTimer.java:1:1: method: com.dmdirc.parser.irc.PingTimer.com.dmdirc.parser.irc.PingTimer__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.parser.irc;

import java.util.TimerTask;
import java.util.Timer;

/**
 * Used by the parser to ping the server at a set interval to check that the
 * server is still alive.
 *
 * @author Shane Mc Cormack
 */
public class PingTimer extends TimerTask {
	/** Owning Parser. */
	final IRCParser myOwner;
	/** The Timer that owns this task */
	final Timer myTimer;
	
	/**
	 * Create the PingTimer.
	 *
	 * @param control IRCParser that owns this TimerTask.
	 * @param timer Timer that owns this TimerTask.
	 */
	public PingTimer(final IRCParser control, final Timer timer) {
    //#PingTimer.java:46: method: void com.dmdirc.parser.irc.PingTimer.com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)
    //#input(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): control
    //#input(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): this
    //#input(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): timer
    //#output(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): this.myOwner
    //#output(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): this.myTimer
    //#post(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): this.myOwner == control
    //#post(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): init'ed(this.myOwner)
    //#post(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): this.myTimer == timer
    //#post(void com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)): init'ed(this.myTimer)
		myOwner = control;
		myTimer = timer;
	}
    //#PingTimer.java:49: end of method: void com.dmdirc.parser.irc.PingTimer.com.dmdirc.parser.irc.PingTimer(IRCParser, Timer)
	
	/** Timer has been executed. */
	public void run() {
		myOwner.pingTimerTask(myTimer);
    //#PingTimer.java:53: method: void com.dmdirc.parser.irc.PingTimer.run()
    //#input(void run()): " for mode "._tainted
    //#input(void run()): "Callback not found: "._tainted
    //#input(void run()): "Intercepted mode request for "._tainted
    //#input(void run()): "OnDataOut"._tainted
    //#input(void run()): "OnDebugInfo"._tainted
    //#input(void run()): "OnPingFailed"._tainted
    //#input(void run()): "OnPingSent"._tainted
    //#input(void run()): "PING "._tainted
    //#input(void run()): com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[com/dmdirc/parser/irc/ChannelInfo]
    //#input(void run()): com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[others]
    //#input(void run()): com/dmdirc/parser/irc/ChannelInfo.__Dispatch_Table.getListModeQueue()Ljava/util/Queue;
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Descendant_Table[com/dmdirc/parser/irc/IRCParser]
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Descendant_Table[others]
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.callDataOut(Ljava/lang/String;Z)Z
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.callDebugInfo(ILjava/lang/String;)Z
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.callPingFailed()Z
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.callPingSent()Z
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.disconnect(Ljava/lang/String;)V
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.doSendString(Ljava/lang/String;Z)V
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getChannelInfo(Ljava/lang/String;)Lcom/dmdirc/parser/irc/ChannelInfo;
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getIRCStringConverter()Lcom/dmdirc/parser/irc/IRCStringConverter;
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getSocketState()Lcom/dmdirc/parser/irc/SocketState;
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.pingTimerTask(Ljava/util/Timer;)V
    //#input(void run()): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.sendLine(Ljava/lang/String;)V
    //#input(void run()): com/dmdirc/parser/irc/IRCStringConverter.__Descendant_Table[com/dmdirc/parser/irc/IRCStringConverter]
    //#input(void run()): com/dmdirc/parser/irc/IRCStringConverter.__Descendant_Table[others]
    //#input(void run()): com/dmdirc/parser/irc/IRCStringConverter.__Dispatch_Table.toLowerCase(Ljava/lang/String;)Ljava/lang/String;
    //#input(void run()): com/dmdirc/parser/irc/SocketState.OPEN
    //#input(void run()): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific]
    //#input(void run()): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[com/dmdirc/parser/irc/callbacks/CallbackObject]
    //#input(void run()): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[others]
    //#input(void run()): com/dmdirc/parser/irc/callbacks/CallbackObject.__Dispatch_Table.call([Ljava/lang/Object;)Z
    //#input(void run()): com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific.__Dispatch_Table.call([Ljava/lang/Object;)Z
    //#input(void run()): this
    //#input(void run()): this.myOwner
    //#input(void run()): this.myOwner.__Tag
    //#input(void run()): this.myOwner.cMyself
    //#input(void run()): this.myOwner.currentSocketState
    //#input(void run()): this.myOwner.hChanModesOther
    //#input(void run()): this.myOwner.hChannelList
    //#input(void run()): this.myOwner.lastPingValue._tainted
    //#input(void run()): this.myOwner.myCallbackManager
    //#input(void run()): this.myOwner.myCallbackManager.callbackHash
    //#input(void run()): this.myOwner.out
    //#input(void run()): this.myOwner.pingCountDown
    //#input(void run()): this.myOwner.pingCountDownLength
    //#input(void run()): this.myOwner.pingNeeded
    //#input(void run()): this.myOwner.pingTimer
    //#input(void run()): this.myOwner.pingTimerSem
    //#input(void run()): this.myOwner.stringConverter
    //#input(void run()): this.myOwner.stringConverter.__Tag
    //#input(void run()): this.myOwner.stringConverter.lowercase
    //#input(void run()): this.myOwner.stringConverter.lowercase.length
    //#input(void run()): this.myTimer
    //#output(void run()): java.lang.String:substring(...)._tainted
    //#output(void run()): java.lang.String:valueOf(...)._tainted
    //#output(void run()): new IRCStringConverter(getIRCStringConverter#1) num objects
    //#output(void run()): new IRCStringConverter(getIRCStringConverter#1).__Tag
    //#output(void run()): new IRCStringConverter(getIRCStringConverter#1).limit
    //#output(void run()): new IRCStringConverter(getIRCStringConverter#1).lowercase
    //#output(void run()): new IRCStringConverter(getIRCStringConverter#1).uppercase
    //#output(void run()): new IRCStringConverter(updateCharArrays#1) num objects
    //#output(void run()): new IRCStringConverter(updateCharArrays#1).__Tag
    //#output(void run()): new IRCStringConverter(updateCharArrays#1).limit
    //#output(void run()): new IRCStringConverter(updateCharArrays#1).lowercase
    //#output(void run()): new IRCStringConverter(updateCharArrays#1).uppercase
    //#output(void run()): new char[](IRCStringConverter#1) num objects
    //#output(void run()): new char[](IRCStringConverter#1).length
    //#output(void run()): new char[](IRCStringConverter#1)[0..65_535]
    //#output(void run()): new char[](IRCStringConverter#2) num objects
    //#output(void run()): new char[](IRCStringConverter#2).length
    //#output(void run()): new char[](IRCStringConverter#2)[0..65_567]
    //#output(void run()): this.myOwner.cMyself
    //#output(void run()): this.myOwner.cMyself.myAwayReason
    //#output(void run()): this.myOwner.currentSocketState
    //#output(void run()): this.myOwner.got001
    //#output(void run()): this.myOwner.lastLine
    //#output(void run()): this.myOwner.lastPingValue
    //#output(void run()): this.myOwner.nNextKeyCMBool
    //#output(void run()): this.myOwner.nNextKeyPrefix
    //#output(void run()): this.myOwner.nNextKeyUser
    //#output(void run()): this.myOwner.pingCountDown
    //#output(void run()): this.myOwner.pingTime
    //#output(void run()): this.myOwner.pingTimer
    //#output(void run()): this.myOwner.post005
    //#output(void run()): this.myOwner.sNetworkName
    //#output(void run()): this.myOwner.sServerName
    //#output(void run()): this.myOwner.stringConverter
    //#output(void run()): this.myOwner.triedAlt
    //#new obj(void run()): java.lang.String:substring(...)
    //#new obj(void run()): java.lang.String:valueOf(...)
    //#new obj(void run()): new IRCStringConverter(getIRCStringConverter#1)
    //#new obj(void run()): new IRCStringConverter(updateCharArrays#1)
    //#new obj(void run()): new char[](IRCStringConverter#1)
    //#new obj(void run()): new char[](IRCStringConverter#2)
    //#pre[19] (void run()): this.myOwner != null
    //#pre[20] (void run()): this.myOwner.__Tag == com/dmdirc/parser/irc/IRCParser
    //#pre[29] (void run()): this.myOwner.pingNeeded != null
    //#pre[1] (void run()): (soft) this.myOwner.cMyself != null
    //#pre[3] (void run()): (soft) init'ed(this.myOwner.currentSocketState)
    //#pre[10] (void run()): (soft) this.myOwner.pingCountDown >= -2_147_483_647
    //#pre[12] (void run()): (soft) init'ed(this.myOwner.pingTimer)
    //#pre[16] (void run()): (soft) init'ed(this.myOwner.stringConverter)
    //#pre[21] (void run()): (soft) this.myOwner.hChanModesOther != null
    //#pre[22] (void run()): (soft) this.myOwner.hChannelList != null
    //#pre[25] (void run()): (soft) this.myOwner.myCallbackManager != null
    //#pre[26] (void run()): (soft) this.myOwner.myCallbackManager.callbackHash != null
    //#pre[27] (void run()): (soft) init'ed(this.myOwner.out)
    //#pre[28] (void run()): (soft) init'ed(this.myOwner.pingCountDownLength)
    //#pre[30] (void run()): (soft) this.myOwner.pingTimerSem != null
    //#post(void run()): init'ed(java.lang.String:substring(...)._tainted)
    //#post(void run()): java.lang.String:valueOf(...)._tainted == 0
    //#post(void run()): this.myOwner.cMyself == old this.myOwner.cMyself
    //#post(void run()): this.myOwner.cMyself != null
    //#post(void run()): possibly_updated(this.myOwner.cMyself.myAwayReason)
    //#post(void run()): this.myOwner.currentSocketState == old this.myOwner.currentSocketState
    //#post(void run()): init'ed(this.myOwner.currentSocketState)
    //#post(void run()): this.myOwner.got001 == old this.myOwner.got001
    //#post(void run()): this.myOwner.lastLine == old this.myOwner.lastLine
    //#post(void run()): this.myOwner.lastPingValue == One-of{old this.myOwner.lastPingValue, &java.lang.String:valueOf(...)}
    //#post(void run()): this.myOwner.nNextKeyCMBool == old this.myOwner.nNextKeyCMBool
    //#post(void run()): this.myOwner.nNextKeyPrefix == old this.myOwner.nNextKeyPrefix
    //#post(void run()): this.myOwner.nNextKeyUser == old this.myOwner.nNextKeyUser
    //#post(void run()): this.myOwner.pingCountDown == One-of{old this.myOwner.pingCountDown, old this.myOwner.pingCountDown - 1, this.myOwner.pingCountDownLength}
    //#post(void run()): init'ed(this.myOwner.pingCountDown)
    //#post(void run()): possibly_updated(this.myOwner.pingTime)
    //#post(void run()): this.myOwner.pingTimer == old this.myOwner.pingTimer
    //#post(void run()): init'ed(this.myOwner.pingTimer)
    //#post(void run()): this.myOwner.post005 == old this.myOwner.post005
    //#post(void run()): this.myOwner.sNetworkName == old this.myOwner.sNetworkName
    //#post(void run()): this.myOwner.sServerName == old this.myOwner.sServerName
    //#post(void run()): this.myOwner.stringConverter == One-of{old this.myOwner.stringConverter, &new IRCStringConverter(getIRCStringConverter#1)}
    //#post(void run()): init'ed(this.myOwner.stringConverter)
    //#post(void run()): this.myOwner.triedAlt == old this.myOwner.triedAlt
    //#post(void run()): new IRCStringConverter(getIRCStringConverter#1) num objects == undefined
    //#post(void run()): new IRCStringConverter(getIRCStringConverter#1) num objects == 0, if init'ed
    //#post(void run()): new IRCStringConverter(getIRCStringConverter#1).__Tag == new IRCStringConverter(getIRCStringConverter#1) num objects
    //#post(void run()): new IRCStringConverter(getIRCStringConverter#1).limit == new IRCStringConverter(getIRCStringConverter#1) num objects
    //#post(void run()): new IRCStringConverter(updateCharArrays#1) num objects == new IRCStringConverter(getIRCStringConverter#1) num objects
    //#post(void run()): new IRCStringConverter(updateCharArrays#1).__Tag == new IRCStringConverter(getIRCStringConverter#1) num objects
    //#post(void run()): new IRCStringConverter(updateCharArrays#1).limit == new IRCStringConverter(getIRCStringConverter#1) num objects
    //#post(void run()): new IRCStringConverter(getIRCStringConverter#1).lowercase == undefined
    //#post(void run()): new IRCStringConverter(getIRCStringConverter#1).lowercase == null
    //#post(void run()): new IRCStringConverter(getIRCStringConverter#1).uppercase == new IRCStringConverter(getIRCStringConverter#1).lowercase
    //#post(void run()): new IRCStringConverter(updateCharArrays#1).lowercase == new IRCStringConverter(getIRCStringConverter#1).lowercase
    //#post(void run()): new IRCStringConverter(updateCharArrays#1).uppercase == new IRCStringConverter(getIRCStringConverter#1).lowercase
    //#post(void run()): new char[](IRCStringConverter#1) num objects <= 1
    //#post(void run()): new char[](IRCStringConverter#2) num objects == new char[](IRCStringConverter#1) num objects
    //#post(void run()): init'ed(new char[](IRCStringConverter#1).length)
    //#post(void run()): possibly_updated(new char[](IRCStringConverter#1)[0..65_535])
    //#post(void run()): init'ed(new char[](IRCStringConverter#2).length)
    //#post(void run()): possibly_updated(new char[](IRCStringConverter#2)[0..65_567])
    //#unanalyzed(void run()): Effects-of-calling:java.util.concurrent.atomic.AtomicBoolean:get
    //#unanalyzed(void run()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void run()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void run()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void run()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void run()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void run()): Effects-of-calling:java.util.concurrent.atomic.AtomicBoolean:set
    //#unanalyzed(void run()): Effects-of-calling:java.util.concurrent.Semaphore:acquireUninterruptibly
    //#unanalyzed(void run()): Effects-of-calling:java.util.Timer:cancel
    //#unanalyzed(void run()): Effects-of-calling:java.util.concurrent.Semaphore:release
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:split
    //#unanalyzed(void run()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(void run()): Effects-of-calling:java.util.Map:clear
    //#unanalyzed(void run()): Effects-of-calling:java.lang.Character:valueOf
    //#unanalyzed(void run()): Effects-of-calling:java.lang.System:currentTimeMillis
    //#unanalyzed(void run()): Effects-of-calling:java.lang.Byte:byteValue
    //#unanalyzed(void run()): Effects-of-calling:doSendString
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:toCharArray
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void run()): Effects-of-calling:sendString
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(void run()): Effects-of-calling:java.lang.RuntimeException
    //#unanalyzed(void run()): Effects-of-calling:call
    //#unanalyzed(void run()): Effects-of-calling:java.net.Socket:close
    //#unanalyzed(void run()): Effects-of-calling:callSocketClosed
    //#unanalyzed(void run()): Effects-of-calling:resetState
    //#unanalyzed(void run()): Effects-of-calling:java.lang.Boolean:valueOf
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(void run()): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo
    //#unanalyzed(void run()): Effects-of-calling:setFake
    //#unanalyzed(void run()): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(void run()): Effects-of-calling:disconnect
    //#unanalyzed(void run()): Effects-of-calling:java.lang.Object:equals
    //#unanalyzed(void run()): Effects-of-calling:callPingSent
    //#unanalyzed(void run()): Effects-of-calling:java.lang.String:valueOf
    //#unanalyzed(void run()): Effects-of-calling:java.io.PrintWriter:printf
    //#unanalyzed(void run()): Effects-of-calling:setAwayReason
    //#unanalyzed(void run()): Effects-of-calling:java.util.LinkedList
    //#unanalyzed(void run()): Effects-of-calling:getListModeQueue
    //#unanalyzed(void run()): Effects-of-calling:java.util.LinkedList:contains
    //#unanalyzed(void run()): Effects-of-calling:java.util.Queue:offer
    //#unanalyzed(void run()): Effects-of-calling:java.util.LinkedList:offer
	}
    //#PingTimer.java:54: end of method: void com.dmdirc.parser.irc.PingTimer.run()
}
    //#output(com.dmdirc.parser.irc.PingTimer__static_init): __Descendant_Table[com/dmdirc/parser/irc/PingTimer]
    //#output(com.dmdirc.parser.irc.PingTimer__static_init): __Dispatch_Table.run()V
    //#post(com.dmdirc.parser.irc.PingTimer__static_init): __Descendant_Table[com/dmdirc/parser/irc/PingTimer] == &__Dispatch_Table
    //#post(com.dmdirc.parser.irc.PingTimer__static_init): __Dispatch_Table.run()V == &run
    //#PingTimer.java:: end of method: com.dmdirc.parser.irc.PingTimer.com.dmdirc.parser.irc.PingTimer__static_init
    //#PingTimer.java:: end of class: com.dmdirc.parser.irc.PingTimer
