//# 14 errors, 249 messages
//#
/*
    //#ProcessTopic.java:1:1: class: com.dmdirc.parser.irc.ProcessTopic
    //#ProcessTopic.java:1:1: method: com.dmdirc.parser.irc.ProcessTopic.com.dmdirc.parser.irc.ProcessTopic__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;

/**
 * Process a topic change.
 */
public class ProcessTopic extends IRCProcessor {
	/**
	 * Process a topic change.
	 *
	 * @param sParam Type of line to process ("TOPIC", "332", "333")
	 * @param token IRCTokenised line to process
	 */
	@Override
	public void process(final String sParam, final String[] token) {
		ChannelInfo iChannel;
		if (sParam.equals("332")) {
    //#ProcessTopic.java:38: method: void com.dmdirc.parser.irc.ProcessTopic.process(String, String[])
    //#input(void process(String, String[])): "Callback not found: "._tainted
    //#input(void process(String, String[])): "OnChannelTopic"._tainted
    //#input(void process(String, String[])): __Descendant_Table[com/dmdirc/parser/irc/ProcessTopic]
    //#input(void process(String, String[])): __Descendant_Table[others]
    //#input(void process(String, String[])): __Dispatch_Table.callChannelTopic(Lcom/dmdirc/parser/irc/ChannelInfo;Z)Z
    //#input(void process(String, String[])): com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[com/dmdirc/parser/irc/ChannelInfo]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[others]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/ChannelInfo.__Dispatch_Table.setTopic(Ljava/lang/String;)V
    //#input(void process(String, String[])): com/dmdirc/parser/irc/ChannelInfo.__Dispatch_Table.setTopicTime(J)V
    //#input(void process(String, String[])): com/dmdirc/parser/irc/ChannelInfo.__Dispatch_Table.setTopicUser(Ljava/lang/String;)V
    //#input(void process(String, String[])): com/dmdirc/parser/irc/ClientInfo.__Descendant_Table[com/dmdirc/parser/irc/ClientInfo]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/ClientInfo.__Descendant_Table[others]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCParser.__Descendant_Table[com/dmdirc/parser/irc/IRCParser]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCParser.__Descendant_Table[others]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getCallbackManager()Lcom/dmdirc/parser/irc/callbacks/CallbackManager;
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getChannelInfo(Ljava/lang/String;)Lcom/dmdirc/parser/irc/ChannelInfo;
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getClientInfo(Ljava/lang/String;)Lcom/dmdirc/parser/irc/ClientInfo;
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getIRCStringConverter()Lcom/dmdirc/parser/irc/IRCStringConverter;
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCStringConverter.__Descendant_Table[com/dmdirc/parser/irc/IRCStringConverter]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCStringConverter.__Descendant_Table[others]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/IRCStringConverter.__Dispatch_Table.toLowerCase(Ljava/lang/String;)Ljava/lang/String;
    //#input(void process(String, String[])): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[com/dmdirc/parser/irc/callbacks/CallbackObject]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[others]
    //#input(void process(String, String[])): com/dmdirc/parser/irc/callbacks/CallbackObject.__Dispatch_Table.call([Ljava/lang/Object;)Z
    //#input(void process(String, String[])): com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific.__Dispatch_Table.call([Ljava/lang/Object;)Z
    //#input(void process(String, String[])): sParam
    //#input(void process(String, String[])): this
    //#input(void process(String, String[])): this.__Tag
    //#input(void process(String, String[])): this.myParser
    //#input(void process(String, String[])): this.myParser.__Tag
    //#input(void process(String, String[])): this.myParser.hChannelList
    //#input(void process(String, String[])): this.myParser.hClientList
    //#input(void process(String, String[])): this.myParser.myCallbackManager
    //#input(void process(String, String[])): this.myParser.myCallbackManager.callbackHash
    //#input(void process(String, String[])): this.myParser.stringConverter
    //#input(void process(String, String[])): this.myParser.stringConverter.__Tag
    //#input(void process(String, String[])): this.myParser.stringConverter.lowercase
    //#input(void process(String, String[])): this.myParser.stringConverter.lowercase.length
    //#input(void process(String, String[])): this.myParser.stringConverter.lowercase[0..65_535]
    //#input(void process(String, String[])): token
    //#input(void process(String, String[])): token.length
    //#input(void process(String, String[])): token[0]
    //#input(void process(String, String[])): token[0]._tainted
    //#input(void process(String, String[])): token[1, 6..4_294_967_295]
    //#input(void process(String, String[])): token[1, 6..4_294_967_295]._tainted
    //#input(void process(String, String[])): token[2]
    //#input(void process(String, String[])): token[3]
    //#input(void process(String, String[])): token[4]
    //#input(void process(String, String[])): token[5]
    //#output(void process(String, String[])): java.lang.String:substring(...)._tainted
    //#output(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1) num objects
    //#output(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1).__Tag
    //#output(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1).limit
    //#output(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1).lowercase
    //#output(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1).uppercase
    //#output(void process(String, String[])): new char[](IRCStringConverter#1) num objects
    //#output(void process(String, String[])): new char[](IRCStringConverter#1).length
    //#output(void process(String, String[])): new char[](IRCStringConverter#1)[0..65_535]
    //#output(void process(String, String[])): new char[](IRCStringConverter#2) num objects
    //#output(void process(String, String[])): new char[](IRCStringConverter#2).length
    //#output(void process(String, String[])): new char[](IRCStringConverter#2)[0..65_567]
    //#output(void process(String, String[])): this.myParser.stringConverter
    //#output(void process(String, String[])): token[0]
    //#new obj(void process(String, String[])): java.lang.String:substring(...)
    //#new obj(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1)
    //#new obj(void process(String, String[])): new char[](IRCStringConverter#1)
    //#new obj(void process(String, String[])): new char[](IRCStringConverter#2)
    //#pre[4] (void process(String, String[])): sParam != null
    //#pre[18] (void process(String, String[])): token != null
    //#pre[1] (void process(String, String[])): (soft) init'ed(this.myParser.stringConverter)
    //#pre[2] (void process(String, String[])): (soft) token[0] != null
    //#pre[6] (void process(String, String[])): (soft) this.__Tag == com/dmdirc/parser/irc/ProcessTopic
    //#pre[7] (void process(String, String[])): (soft) this.myParser != null
    //#pre[8] (void process(String, String[])): (soft) this.myParser.__Tag == com/dmdirc/parser/irc/IRCParser
    //#pre[9] (void process(String, String[])): (soft) this.myParser.hChannelList != null
    //#pre[11] (void process(String, String[])): (soft) this.myParser.hClientList != null
    //#pre[12] (void process(String, String[])): (soft) this.myParser.myCallbackManager != null
    //#pre[13] (void process(String, String[])): (soft) this.myParser.myCallbackManager.callbackHash != null
    //#pre[14] (void process(String, String[])): (soft) this.myParser.stringConverter.__Tag == com/dmdirc/parser/irc/IRCStringConverter
    //#pre[15] (void process(String, String[])): (soft) this.myParser.stringConverter.lowercase != null
    //#pre[17] (void process(String, String[])): (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#pre[19] (void process(String, String[])): (soft) token.length in {3..4_294_967_296}
    //#pre[21] (void process(String, String[])): (soft) init'ed(token[1, 6..4_294_967_295])
    //#pre[23] (void process(String, String[])): (soft) token[2] != null
    //#pre[24] (void process(String, String[])): (soft) token[3] != null
    //#pre[25] (void process(String, String[])): (soft) init'ed(token[4])
    //#pre[26] (void process(String, String[])): (soft) init'ed(token[5])
    //#presumption(void process(String, String[])): iClient.sHost != null
    //#presumption(void process(String, String[])): this.myParser.stringConverter.__Tag == com/dmdirc/parser/irc/IRCStringConverter
    //#presumption(void process(String, String[])): this.myParser.stringConverter.lowercase != null
    //#post(void process(String, String[])): init'ed(java.lang.String:substring(...)._tainted)
    //#post(void process(String, String[])): init'ed(this.myParser.stringConverter)
    //#post(void process(String, String[])): token[0] == One-of{old token[0], &java.lang.String:substring(...)}
    //#post(void process(String, String[])): token[0] != null
    //#post(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1) num objects <= 1
    //#post(void process(String, String[])): new IRCStringConverter(getIRCStringConverter#1) num objects == 0
    //#post(void process(String, String[])): init'ed(new IRCStringConverter(getIRCStringConverter#1).__Tag)
    //#post(void process(String, String[])): init'ed(new IRCStringConverter(getIRCStringConverter#1).limit)
    //#post(void process(String, String[])): init'ed(new IRCStringConverter(getIRCStringConverter#1).lowercase)
    //#post(void process(String, String[])): init'ed(new IRCStringConverter(getIRCStringConverter#1).uppercase)
    //#post(void process(String, String[])): new char[](IRCStringConverter#1) num objects <= 1
    //#post(void process(String, String[])): new char[](IRCStringConverter#1) num objects == 0
    //#post(void process(String, String[])): init'ed(new char[](IRCStringConverter#1).length)
    //#post(void process(String, String[])): possibly_updated(new char[](IRCStringConverter#1)[0..65_535])
    //#post(void process(String, String[])): new char[](IRCStringConverter#2) num objects <= 1
    //#post(void process(String, String[])): new char[](IRCStringConverter#2) num objects == 0
    //#post(void process(String, String[])): init'ed(new char[](IRCStringConverter#2).length)
    //#post(void process(String, String[])): possibly_updated(new char[](IRCStringConverter#2)[0..65_567])
    //#unanalyzed(void process(String, String[])): Effects-of-calling:getCallbackManager
    //#unanalyzed(void process(String, String[])): Effects-of-calling:getCallbackType
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.Boolean:valueOf
    //#unanalyzed(void process(String, String[])): Effects-of-calling:call
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.RuntimeException
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void process(String, String[])): Effects-of-calling:getChannelInfo
    //#unanalyzed(void process(String, String[])): Effects-of-calling:getClientInfo
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String:split
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String:toCharArray
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void process(String, String[])): Effects-of-calling:java.lang.String
    //#unanalyzed(void process(String, String[])): Effects-of-calling:parseHost
    //#test_vector(void process(String, String[])): token.length: {3}, {4}, {5}, {6..4_294_967_296}
    //#test_vector(void process(String, String[])): java.lang.String:charAt(...)@62: {0..57, 59..65_535}, {58}
    //#test_vector(void process(String, String[])): java.lang.String:equals(...)@38: {0}, {1}
    //#test_vector(void process(String, String[])): java.lang.String:equals(...)@42: {0}, {1}
    //#test_vector(void process(String, String[])): java.lang.String:isEmpty(...)@57: {0}, {1}
			iChannel = getChannelInfo(token[3]);
    //#ProcessTopic.java:39: ?array index out of bounds
    //#    token.length >= 4
    //#    severity: MEDIUM
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_2
    //#    assertion: token.length >= 4
    //#    VN: token.length - 3
    //#    Expected: {1..+Inf}
    //#    Bad: {0}
    //#    Attribs:  Int  Bad singleton  Bad overlaps +/-1000  Bad < Exp
    //#ProcessTopic.java:39: ?precondition failure
    //#    com/dmdirc/parser/irc/IRCProcessor.getChannelInfo: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_2
    //#    assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee: ChannelInfo com/dmdirc/parser/irc/IRCProcessor.getChannelInfo(String)
    //#    callee assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee file: IRCProcessor.java
    //#    callee precondition index: [11]
    //#    callee srcpos: 116
    //#    VN: this.myParser.stringConverter.lowercase[0..65_535]
    //#    Expected: {0..65_535}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Soft  Bad only invalid
			if (iChannel == null) { return; }
			iChannel.setTopic(token[token.length-1]);
    //#ProcessTopic.java:41: ?use of default init
    //#    init'ed(iChannel.__Tag)
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_4
    //#    assertion: init'ed(iChannel.__Tag)
    //#    VN: iChannel.__Tag
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#ProcessTopic.java:41: ?null dereference
    //#    com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag] != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_4
    //#    assertion: com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag] != null
    //#    VN: com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag]
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
		} else if (sParam.equals("333")) {
			if (token.length > 3) {
				iChannel = getChannelInfo(token[3]);
    //#ProcessTopic.java:44: ?precondition failure
    //#    com/dmdirc/parser/irc/IRCProcessor.getChannelInfo: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_7
    //#    assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee: ChannelInfo com/dmdirc/parser/irc/IRCProcessor.getChannelInfo(String)
    //#    callee assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee file: IRCProcessor.java
    //#    callee precondition index: [11]
    //#    callee srcpos: 116
    //#    VN: this.myParser.stringConverter.lowercase[0..65_535]
    //#    Expected: {0..65_535}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Soft  Bad only invalid
				if (iChannel == null) { return; }
				if (token.length > 4) {
					iChannel.setTopicUser(token[4]);
    //#ProcessTopic.java:47: ?use of default init
    //#    init'ed(iChannel.__Tag)
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_10
    //#    assertion: init'ed(iChannel.__Tag)
    //#    VN: iChannel.__Tag
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#ProcessTopic.java:47: ?null dereference
    //#    com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag] != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_10
    //#    assertion: com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag] != null
    //#    VN: com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag]
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
					if (token.length > 5) {
						iChannel.setTopicTime(Long.parseLong(token[5]));
					}
				}
				callChannelTopic(iChannel,true);
			}
		} else {
			if (IRCParser.ALWAYS_UPDATECLIENT) {
				final ClientInfo iClient = getClientInfo(token[0]);
    //#ProcessTopic.java:56: ?precondition failure
    //#    com/dmdirc/parser/irc/IRCProcessor.getClientInfo: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_13
    //#    assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee: ClientInfo com/dmdirc/parser/irc/IRCProcessor.getClientInfo(String)
    //#    callee assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee file: IRCProcessor.java
    //#    callee precondition index: [11]
    //#    callee srcpos: 106
    //#    VN: this.myParser.stringConverter.lowercase[0..65_535]
    //#    Expected: {0..65_535}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Soft  Bad only invalid
				if (iClient != null && iClient.getHost().isEmpty()) {iClient.setUserBits(token[0],false); }
			}
			iChannel = getChannelInfo(token[2]);
    //#ProcessTopic.java:59: ?precondition failure
    //#    com/dmdirc/parser/irc/IRCProcessor.getChannelInfo: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_16
    //#    assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee: ChannelInfo com/dmdirc/parser/irc/IRCProcessor.getChannelInfo(String)
    //#    callee assertion: (soft) init'ed(this.myParser.stringConverter.lowercase[0..65_535])
    //#    callee file: IRCProcessor.java
    //#    callee precondition index: [11]
    //#    callee srcpos: 116
    //#    VN: this.myParser.stringConverter.lowercase[0..65_535]
    //#    Expected: {0..65_535}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Soft  Bad only invalid
			if (iChannel == null) { return; }
			iChannel.setTopicTime(System.currentTimeMillis() / 1000);
    //#ProcessTopic.java:61: ?use of default init
    //#    init'ed(iChannel.__Tag)
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_18
    //#    assertion: init'ed(iChannel.__Tag)
    //#    VN: iChannel.__Tag
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#ProcessTopic.java:61: ?null dereference
    //#    com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag] != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: void process(String, String[])
    //#    basic block: bb_18
    //#    assertion: com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag] != null
    //#    VN: com/dmdirc/parser/irc/ChannelInfo.__Descendant_Table[iChannel.__Tag]
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
			if (token[0].charAt(0) == ':') { token[0] = token[0].substring(1); }
			iChannel.setTopicUser(token[0]);
			iChannel.setTopic(token[token.length-1]);
			callChannelTopic(iChannel,false);
		}
	}
    //#ProcessTopic.java:67: end of method: void com.dmdirc.parser.irc.ProcessTopic.process(String, String[])
	
	/**
	 * Callback to all objects implementing the ChannelTopic Callback.
	 *
	 * @see IChannelTopic
	 * @param cChannel Channel that topic was set on
	 * @param bIsJoinTopic True when getting topic on join, false if set by user/server
	 * @return true if a method was called, false otherwise
	 */
	protected boolean callChannelTopic(final ChannelInfo cChannel, final boolean bIsJoinTopic) {
		return getCallbackManager().getCallbackType("OnChannelTopic").call(cChannel, bIsJoinTopic);
    //#ProcessTopic.java:78: method: bool com.dmdirc.parser.irc.ProcessTopic.callChannelTopic(ChannelInfo, bool)
    //#ProcessTopic.java:78: ?null dereference
    //#    getCallbackType(...) != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: bool callChannelTopic(ChannelInfo, bool)
    //#    basic block: Entry_BB_1
    //#    assertion: getCallbackType(...) != null
    //#    VN: getCallbackType(...)
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
    //#ProcessTopic.java:78: ?use of default init
    //#    init'ed(getCallbackType(...).__Tag)
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: bool callChannelTopic(ChannelInfo, bool)
    //#    basic block: Entry_BB_1
    //#    assertion: init'ed(getCallbackType(...).__Tag)
    //#    VN: getCallbackType(...).__Tag
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#ProcessTopic.java:78: ?null dereference
    //#    com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[getCallbackType(...).__Tag] != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: bool callChannelTopic(ChannelInfo, bool)
    //#    basic block: Entry_BB_1
    //#    assertion: com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[getCallbackType(...).__Tag] != null
    //#    VN: com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[getCallbackType(...).__Tag]
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
    //#ProcessTopic.java:78: Warning: call too complex - analysis skipped
    //#    call on bool call(Object[])
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.parser.irc.ProcessTopic
    //#    method: bool callChannelTopic(ChannelInfo, bool)
    //#    unanalyzed callee: bool call(Object[])
    //#input(bool callChannelTopic(ChannelInfo, bool)): "Callback not found: "._tainted
    //#input(bool callChannelTopic(ChannelInfo, bool)): "OnChannelTopic"._tainted
    //#input(bool callChannelTopic(ChannelInfo, bool)): bIsJoinTopic
    //#input(bool callChannelTopic(ChannelInfo, bool)): cChannel
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/IRCParser.__Descendant_Table[com/dmdirc/parser/irc/IRCParser]
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/IRCParser.__Descendant_Table[others]
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/IRCParser.__Dispatch_Table.getCallbackManager()Lcom/dmdirc/parser/irc/callbacks/CallbackManager;
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific]
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[com/dmdirc/parser/irc/callbacks/CallbackObject]
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/callbacks/CallbackObject.__Descendant_Table[others]
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/callbacks/CallbackObject.__Dispatch_Table.call([Ljava/lang/Object;)Z
    //#input(bool callChannelTopic(ChannelInfo, bool)): com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific.__Dispatch_Table.call([Ljava/lang/Object;)Z
    //#input(bool callChannelTopic(ChannelInfo, bool)): this
    //#input(bool callChannelTopic(ChannelInfo, bool)): this.myParser
    //#input(bool callChannelTopic(ChannelInfo, bool)): this.myParser.__Tag
    //#input(bool callChannelTopic(ChannelInfo, bool)): this.myParser.myCallbackManager
    //#input(bool callChannelTopic(ChannelInfo, bool)): this.myParser.myCallbackManager.callbackHash
    //#output(bool callChannelTopic(ChannelInfo, bool)): return_value
    //#pre[4] (bool callChannelTopic(ChannelInfo, bool)): this.myParser != null
    //#pre[5] (bool callChannelTopic(ChannelInfo, bool)): this.myParser.__Tag == com/dmdirc/parser/irc/IRCParser
    //#pre[6] (bool callChannelTopic(ChannelInfo, bool)): this.myParser.myCallbackManager != null
    //#pre[7] (bool callChannelTopic(ChannelInfo, bool)): this.myParser.myCallbackManager.callbackHash != null
    //#presumption(bool callChannelTopic(ChannelInfo, bool)): getCallbackManager(...)@78 init'ed
    //#post(bool callChannelTopic(ChannelInfo, bool)): init'ed(return_value)
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:getCallbackManager
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:java.lang.RuntimeException
    //#unanalyzed(bool callChannelTopic(ChannelInfo, bool)): Effects-of-calling:java.util.Map:get
    //#ProcessTopic.java:78: end of method: bool com.dmdirc.parser.irc.ProcessTopic.callChannelTopic(ChannelInfo, bool)
	}
	
	/**
	 * What does this IRCProcessor handle.
	 *
	 * @return String[] with the names of the tokens we handle.
	 */
	@Override
	public String[] handles() {
		return new String[]{"TOPIC", "332", "333"};
    //#ProcessTopic.java:88: method: String[] com.dmdirc.parser.irc.ProcessTopic.handles()
    //#output(String[] handles()): new String[](handles#1) num objects
    //#output(String[] handles()): return_value.length
    //#output(String[] handles()): return_value[0]
    //#output(String[] handles()): return_value[1]
    //#output(String[] handles()): return_value[2]
    //#output(String[] handles()): return_value
    //#new obj(String[] handles()): new String[](handles#1)
    //#post(String[] handles()): return_value == &new String[](handles#1)
    //#post(String[] handles()): new String[](handles#1) num objects == 1
    //#post(String[] handles()): return_value.length == 3
    //#post(String[] handles()): return_value[0] == &"TOPIC"
    //#post(String[] handles()): return_value[1] == &"332"
    //#post(String[] handles()): return_value[2] == &"333"
    //#ProcessTopic.java:88: end of method: String[] com.dmdirc.parser.irc.ProcessTopic.handles()
	} 
	
	/**
	 * Create a new instance of the IRCProcessor Object.
	 *
	 * @param parser IRCParser That owns this IRCProcessor
	 * @param manager ProcessingManager that is in charge of this IRCProcessor
	 */
	protected ProcessTopic (IRCParser parser, ProcessingManager manager) { super(parser, manager); }
    //#ProcessTopic.java:97: method: void com.dmdirc.parser.irc.ProcessTopic.com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)
    //#input(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): manager
    //#input(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): parser
    //#input(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): this
    //#output(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): this.myManager
    //#output(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): this.myParser
    //#post(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): this.myManager == manager
    //#post(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): init'ed(this.myManager)
    //#post(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): this.myParser == parser
    //#post(void com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)): init'ed(this.myParser)
    //#ProcessTopic.java:97: end of method: void com.dmdirc.parser.irc.ProcessTopic.com.dmdirc.parser.irc.ProcessTopic(IRCParser, ProcessingManager)

}
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Descendant_Table[com/dmdirc/parser/irc/ProcessTopic]
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callChannelTopic(Lcom/dmdirc/parser/irc/ChannelInfo;Z)Z
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callDebugInfo(ILjava/lang/String;)Z
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callDebugInfo(ILjava/lang/String;[Ljava/lang/Object;)Z
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callErrorInfo(Lcom/dmdirc/parser/irc/ParserError;)Z
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getCallbackManager()Lcom/dmdirc/parser/irc/callbacks/CallbackManager;
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getChannelInfo(Ljava/lang/String;)Lcom/dmdirc/parser/irc/ChannelInfo;
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getClientInfo(Ljava/lang/String;)Lcom/dmdirc/parser/irc/ClientInfo;
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getLowerName()Ljava/lang/String;
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.handles()[Ljava/lang/String;
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.isValidChannelName(Ljava/lang/String;)Z
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.process(Ljava/lang/String;[Ljava/lang/String;)V
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.sendString(Ljava/lang/String;)V
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#output(com.dmdirc.parser.irc.ProcessTopic__static_init): com/dmdirc/parser/irc/IRCProcessor.__Descendant_Table[com/dmdirc/parser/irc/ProcessTopic]
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Descendant_Table[com/dmdirc/parser/irc/ProcessTopic] == &__Dispatch_Table
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): com/dmdirc/parser/irc/IRCProcessor.__Descendant_Table[com/dmdirc/parser/irc/ProcessTopic] == &__Dispatch_Table
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callChannelTopic(Lcom/dmdirc/parser/irc/ChannelInfo;Z)Z == &callChannelTopic
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callDebugInfo(ILjava/lang/String;)Z == &com/dmdirc/parser/irc/IRCProcessor.callDebugInfo
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callDebugInfo(ILjava/lang/String;[Ljava/lang/Object;)Z == &com/dmdirc/parser/irc/IRCProcessor.callDebugInfo
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.callErrorInfo(Lcom/dmdirc/parser/irc/ParserError;)Z == &com/dmdirc/parser/irc/IRCProcessor.callErrorInfo
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getCallbackManager()Lcom/dmdirc/parser/irc/callbacks/CallbackManager; == &com/dmdirc/parser/irc/IRCProcessor.getCallbackManager
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getChannelInfo(Ljava/lang/String;)Lcom/dmdirc/parser/irc/ChannelInfo; == &com/dmdirc/parser/irc/IRCProcessor.getChannelInfo
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getClientInfo(Ljava/lang/String;)Lcom/dmdirc/parser/irc/ClientInfo; == &com/dmdirc/parser/irc/IRCProcessor.getClientInfo
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getLowerName()Ljava/lang/String; == &com/dmdirc/parser/irc/IRCProcessor.getLowerName
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &com/dmdirc/parser/irc/IRCProcessor.getName
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.handles()[Ljava/lang/String; == &handles
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.isValidChannelName(Ljava/lang/String;)Z == &com/dmdirc/parser/irc/IRCProcessor.isValidChannelName
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.process(Ljava/lang/String;[Ljava/lang/String;)V == &process
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.sendString(Ljava/lang/String;)V == &com/dmdirc/parser/irc/IRCProcessor.sendString
    //#post(com.dmdirc.parser.irc.ProcessTopic__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &com/dmdirc/parser/irc/IRCProcessor.toString
    //#ProcessTopic.java:: end of method: com.dmdirc.parser.irc.ProcessTopic.com.dmdirc.parser.irc.ProcessTopic__static_init
    //#ProcessTopic.java:: end of class: com.dmdirc.parser.irc.ProcessTopic
