//# 12 errors, 1,469 messages
//#
/*
    //#LoggingPlugin.java:1:1: class: com.dmdirc.addons.logging.LoggingPlugin$2
    //#LoggingPlugin.java:1:1: class: com.dmdirc.addons.logging.LoggingPlugin$OpenFile
    //#LoggingPlugin.java:1:1: method: com.dmdirc.addons.logging.LoggingPlugin$OpenFile.com.dmdirc.addons.logging.LoggingPlugin$OpenFile__static_init
    //#LoggingPlugin.java:1:1: class: com.dmdirc.addons.logging.LoggingPlugin$1
    //#LoggingPlugin.java:1:1: method: com.dmdirc.addons.logging.LoggingPlugin$1.com.dmdirc.addons.logging.LoggingPlugin$1__static_init
    //#LoggingPlugin.java:1:1: class: com.dmdirc.addons.logging.LoggingPlugin
    //#LoggingPlugin.java:1:1: method: com.dmdirc.addons.logging.LoggingPlugin.com.dmdirc.addons.logging.LoggingPlugin__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.addons.logging;

import com.dmdirc.Channel;
import com.dmdirc.Main;
import com.dmdirc.Query;
import com.dmdirc.Server;
import com.dmdirc.actions.ActionManager;
import com.dmdirc.actions.CoreActionType;
import com.dmdirc.actions.interfaces.ActionType;
import com.dmdirc.commandparser.CommandManager;
import com.dmdirc.config.IdentityManager;
import com.dmdirc.config.prefs.PreferencesCategory;
import com.dmdirc.config.prefs.PreferencesManager;
import com.dmdirc.config.prefs.PreferencesSetting;
import com.dmdirc.config.prefs.PreferencesType;
import com.dmdirc.interfaces.ActionListener;
import com.dmdirc.logger.ErrorLevel;
import com.dmdirc.logger.Logger;
import com.dmdirc.parser.irc.ChannelClientInfo;
import com.dmdirc.parser.irc.ChannelInfo;
import com.dmdirc.parser.irc.ClientInfo;
import com.dmdirc.parser.irc.IRCParser;
import com.dmdirc.plugins.Plugin;
import com.dmdirc.ui.interfaces.InputWindow;
import com.dmdirc.ui.interfaces.Window;
import com.dmdirc.ui.messages.Styliser;

import java.awt.Color;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Hashtable;
import java.util.Map;
import java.util.Stack;

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

/**
 * Adds logging facility to client.
 *
 * @author Shane 'Dataforce' McCormack
 */
public class LoggingPlugin extends Plugin implements ActionListener {

	/** The command we registered. */
	private LoggingCommand command;

	/** Open File */
	protected class OpenFile {
		public long lastUsedTime = System.currentTimeMillis();
		public BufferedWriter writer = null;
		public OpenFile(final BufferedWriter writer) {
    //#LoggingPlugin.java:83: method: void com.dmdirc.addons.logging.LoggingPlugin$OpenFile.com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)
    //#input(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): Param_1
    //#input(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): this
    //#input(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): writer
    //#output(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): this.lastUsedTime
    //#output(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): this.this$0
    //#output(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): this.writer
    //#post(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): init'ed(this.lastUsedTime)
    //#post(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): this.this$0 == Param_1
    //#post(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): init'ed(this.this$0)
    //#post(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): this.writer == writer
    //#post(void com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)): init'ed(this.writer)
			this.writer = writer;
		}
    //#LoggingPlugin.java:85: end of method: void com.dmdirc.addons.logging.LoggingPlugin$OpenFile.com.dmdirc.addons.logging.LoggingPlugin$OpenFile(LoggingPlugin, BufferedWriter)
	}

	/** Timer used to close idle files */
	protected Timer idleFileTimer;

	/** Hashtable of open files. */
	protected final Map<String, OpenFile> openFiles = new Hashtable<String, OpenFile>();

	/** Date format used for "File Opened At" log. */
	final DateFormat openedAtFormat = new SimpleDateFormat("EEEE MMMM dd, yyyy - HH:mm:ss");
	
	/**
	 * Creates a new instance of the Logging Plugin.
	 */
	public LoggingPlugin() { super(); }
    //#LoggingPlugin.java:100: method: void com.dmdirc.addons.logging.LoggingPlugin.com.dmdirc.addons.logging.LoggingPlugin()
    //#LoggingPlugin.java:100: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.plugins.Plugin()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void com.dmdirc.addons.logging.LoggingPlugin()
    //#    unanalyzed callee: void com.dmdirc.plugins.Plugin()
    //#input(void com.dmdirc.addons.logging.LoggingPlugin()): this
    //#output(void com.dmdirc.addons.logging.LoggingPlugin()): new Hashtable(LoggingPlugin#1) num objects
    //#output(void com.dmdirc.addons.logging.LoggingPlugin()): new SimpleDateFormat(LoggingPlugin#2) num objects
    //#output(void com.dmdirc.addons.logging.LoggingPlugin()): this.openFiles
    //#output(void com.dmdirc.addons.logging.LoggingPlugin()): this.openedAtFormat
    //#new obj(void com.dmdirc.addons.logging.LoggingPlugin()): new Hashtable(LoggingPlugin#1)
    //#new obj(void com.dmdirc.addons.logging.LoggingPlugin()): new SimpleDateFormat(LoggingPlugin#2)
    //#post(void com.dmdirc.addons.logging.LoggingPlugin()): this.openFiles == &new Hashtable(LoggingPlugin#1)
    //#post(void com.dmdirc.addons.logging.LoggingPlugin()): this.openedAtFormat == &new SimpleDateFormat(LoggingPlugin#2)
    //#post(void com.dmdirc.addons.logging.LoggingPlugin()): new Hashtable(LoggingPlugin#1) num objects == 1
    //#post(void com.dmdirc.addons.logging.LoggingPlugin()): new SimpleDateFormat(LoggingPlugin#2) num objects == 1
    //#LoggingPlugin.java:100: end of method: void com.dmdirc.addons.logging.LoggingPlugin.com.dmdirc.addons.logging.LoggingPlugin()

    /** {@inheritDoc} */
    @Override
    public void domainUpdated() {
        IdentityManager.getAddonIdentity().setOption(getDomain(),
    //#LoggingPlugin.java:105: method: void com.dmdirc.addons.logging.LoggingPlugin.domainUpdated()
    //#LoggingPlugin.java:105: Warning: method not available - call not analyzed
    //#    call on Identity com.dmdirc.config.IdentityManager:getAddonIdentity()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void domainUpdated()
    //#    unanalyzed callee: Identity com.dmdirc.config.IdentityManager:getAddonIdentity()
    //#LoggingPlugin.java:105: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void domainUpdated()
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:105: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.Main:getConfigDir()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void domainUpdated()
    //#    unanalyzed callee: String com.dmdirc.Main:getConfigDir()
    //#LoggingPlugin.java:105: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.Identity:setOption(String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void domainUpdated()
    //#    unanalyzed callee: void com.dmdirc.config.Identity:setOption(String, String, String)
    //#input(void domainUpdated()): "logs"._tainted
    //#input(void domainUpdated()): this
    //#presumption(void domainUpdated()): com.dmdirc.config.IdentityManager:getAddonIdentity(...)@105 != null
                "general.directory", Main.getConfigDir() + "logs"
                + System.getProperty("file.separator"));
    }
    //#LoggingPlugin.java:108: end of method: void com.dmdirc.addons.logging.LoggingPlugin.domainUpdated()

	/**
	 * Called when the plugin is loaded.
	 */
	@Override
	public void onLoad() {
		final File dir = new File(IdentityManager.getGlobalConfig().getOption(getDomain(), "general.directory"));
    //#LoggingPlugin.java:115: method: void com.dmdirc.addons.logging.LoggingPlugin.onLoad()
    //#LoggingPlugin.java:115: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:115: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:115: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_ACTION
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_CLOSED
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_GOTTOPIC
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_JOIN
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_KICK
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_MESSAGE
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_MODECHANGE
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_NICKCHANGE
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_OPENED
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_PART
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_QUIT
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_ACTION
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_MESSAGE
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.CHANNEL_TOPICCHANGE
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.QUERY_ACTION
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.QUERY_CLOSED
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.QUERY_MESSAGE
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.QUERY_OPENED
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.QUERY_SELF_ACTION
    //#input(void onLoad()): com.dmdirc.actions.CoreActionType.QUERY_SELF_MESSAGE
    //#input(void onLoad()): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void onLoad()): this
    //#output(void onLoad()): new LoggingCommand(onLoad#2) num objects
    //#output(void onLoad()): this.command.__Tag
    //#output(void onLoad()): new Timer(onLoad#4) num objects
    //#output(void onLoad()): this.command
    //#output(void onLoad()): this.idleFileTimer
    //#new obj(void onLoad()): new LoggingCommand(onLoad#2)
    //#new obj(void onLoad()): new Timer(onLoad#4)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_ACTION)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_CLOSED)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_GOTTOPIC)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_JOIN)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_KICK)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_MESSAGE)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_MODECHANGE)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_NICKCHANGE)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_OPENED)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_PART)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_QUIT)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_SELF_ACTION)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_SELF_MESSAGE)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_TOPICCHANGE)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.QUERY_ACTION)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.QUERY_CLOSED)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.QUERY_MESSAGE)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.QUERY_OPENED)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.QUERY_SELF_ACTION)
    //#presumption(void onLoad()): init'ed(com.dmdirc.actions.CoreActionType.QUERY_SELF_MESSAGE)
    //#presumption(void onLoad()): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@115 != null
    //#presumption(void onLoad()): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#post(void onLoad()): this.command == &new LoggingCommand(onLoad#2)
    //#post(void onLoad()): this.idleFileTimer == &new Timer(onLoad#4)
    //#post(void onLoad()): new LoggingCommand(onLoad#2) num objects == 1
    //#post(void onLoad()): new Timer(onLoad#4) num objects == 1
    //#post(void onLoad()): this.command.__Tag == com/dmdirc/addons/logging/LoggingCommand
    //#unanalyzed(void onLoad()): Effects-of-calling:java.util.TimerTask
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.commandparser.commands.ServerCommand
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.commandparser.CommandManager:registerCommand
    //#test_vector(void onLoad()): java.io.File:exists(...)@116: {0}, {1}
    //#test_vector(void onLoad()): java.io.File:isDirectory(...)@117: {1}, {0}
    //#test_vector(void onLoad()): java.io.File:mkdirs(...)@121: {1}, {0}
		if (dir.exists()) {
			if (!dir.isDirectory()) {
				Logger.userError(ErrorLevel.LOW, "Unable to create logging dir (file exists instead)");
    //#LoggingPlugin.java:118: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			}
		} else {
			if (!dir.mkdirs()) {
				Logger.userError(ErrorLevel.LOW, "Unable to create logging dir");
    //#LoggingPlugin.java:122: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			}
		}

		command = new LoggingCommand();
		ActionManager.addListener(this,
    //#LoggingPlugin.java:127: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.actions.ActionManager:addListener(ActionListener, ActionType[])
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: void com.dmdirc.actions.ActionManager:addListener(ActionListener, ActionType[])
		                 CoreActionType.CHANNEL_OPENED,
		                 CoreActionType.CHANNEL_CLOSED,
		                 CoreActionType.CHANNEL_MESSAGE,
		                 CoreActionType.CHANNEL_SELF_MESSAGE,
		                 CoreActionType.CHANNEL_ACTION,
		                 CoreActionType.CHANNEL_SELF_ACTION,
		                 CoreActionType.CHANNEL_GOTTOPIC,
		                 CoreActionType.CHANNEL_TOPICCHANGE,
		                 CoreActionType.CHANNEL_JOIN,
		                 CoreActionType.CHANNEL_PART,
		                 CoreActionType.CHANNEL_QUIT,
		                 CoreActionType.CHANNEL_KICK,
		                 CoreActionType.CHANNEL_NICKCHANGE,
		                 CoreActionType.CHANNEL_MODECHANGE,
		                 CoreActionType.QUERY_OPENED,
		                 CoreActionType.QUERY_CLOSED,
		                 CoreActionType.QUERY_MESSAGE,
		                 CoreActionType.QUERY_SELF_MESSAGE,
		                 CoreActionType.QUERY_ACTION,
		                 CoreActionType.QUERY_SELF_ACTION);
		
		// Close idle files every hour.
		idleFileTimer = new Timer("LoggingPlugin Timer");
		idleFileTimer.schedule(new TimerTask(){
    //#LoggingPlugin.java:151: method: void com.dmdirc.addons.logging.LoggingPlugin$1.com.dmdirc.addons.logging.LoggingPlugin$1(LoggingPlugin)
    //#input(void com.dmdirc.addons.logging.LoggingPlugin$1(LoggingPlugin)): Param_1
    //#input(void com.dmdirc.addons.logging.LoggingPlugin$1(LoggingPlugin)): this
    //#output(void com.dmdirc.addons.logging.LoggingPlugin$1(LoggingPlugin)): this.this$0
    //#post(void com.dmdirc.addons.logging.LoggingPlugin$1(LoggingPlugin)): this.this$0 == Param_1
    //#post(void com.dmdirc.addons.logging.LoggingPlugin$1(LoggingPlugin)): init'ed(this.this$0)
    //#LoggingPlugin.java:151: end of method: void com.dmdirc.addons.logging.LoggingPlugin$1.com.dmdirc.addons.logging.LoggingPlugin$1(LoggingPlugin)
            /** {@inheritDoc} */
            @Override
			public void run() {
				timerTask();
    //#LoggingPlugin.java:155: method: void com.dmdirc.addons.logging.LoggingPlugin$1.run()
    //#input(void run()): ")"._tainted
    //#input(void run()): "Unable to close idle file (File: "._tainted
    //#input(void run()): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(void run()): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(void run()): com/dmdirc/addons/logging/LoggingPlugin.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(void run()): com/dmdirc/addons/logging/LoggingPlugin.__Descendant_Table[others]
    //#input(void run()): com/dmdirc/addons/logging/LoggingPlugin.__Dispatch_Table.timerTask()V
    //#input(void run()): com/dmdirc/addons/logging/LoggingPlugin.com.dmdirc.logger.ErrorLevel.LOW
    //#input(void run()): this
    //#input(void run()): this.this$0
    //#input(void run()): this.this$0.__Tag
    //#input(void run()): this.this$0.openFiles
    //#pre[2] (void run()): this.this$0 != null
    //#pre[3] (void run()): this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#pre[4] (void run()): (soft) this.openFiles != null
    //#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:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void run()): Effects-of-calling:java.lang.System:currentTimeMillis
    //#unanalyzed(void run()): Effects-of-calling:java.util.Hashtable
    //#unanalyzed(void run()): Effects-of-calling:java.util.Hashtable:keySet
    //#unanalyzed(void run()): Effects-of-calling:java.util.Set:iterator
    //#unanalyzed(void run()): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void run()): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void run()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void run()): Effects-of-calling:java.io.BufferedWriter:close
    //#unanalyzed(void run()): Effects-of-calling:java.util.Map:remove
    //#unanalyzed(void run()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
			}
    //#LoggingPlugin.java:156: end of method: void com.dmdirc.addons.logging.LoggingPlugin$1.run()
		}, 3600000);
	}
    //#LoggingPlugin.java:158: end of method: void com.dmdirc.addons.logging.LoggingPlugin.onLoad()
	
	/**
	 * What to do every hour when the timer fires.
	 */
	protected void timerTask() {
		// Oldest time to allow
		final long oldestTime = System.currentTimeMillis() - 3480000;
    //#LoggingPlugin.java:165: method: void com.dmdirc.addons.logging.LoggingPlugin.timerTask()
    //#input(void timerTask()): ")"._tainted
    //#input(void timerTask()): "Unable to close idle file (File: "._tainted
    //#input(void timerTask()): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void timerTask()): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(void timerTask()): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(void timerTask()): this
    //#input(void timerTask()): this.openFiles
    //#input(void timerTask()): this.openFiles.__Lock
    //#pre[2] (void timerTask()): (soft) this.openFiles != null
    //#presumption(void timerTask()): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#presumption(void timerTask()): file.writer@169 != null
    //#presumption(void timerTask()): java.lang.System:currentTimeMillis(...)@165 >= -9_223_372_036_851_295_808
    //#presumption(void timerTask()): java.util.Map:get(...).__Tag@169 == com/dmdirc/addons/logging/LoggingPlugin$OpenFile
    //#presumption(void timerTask()): java.util.Map:get(...)@169 != null
    //#test_vector(void timerTask()): java.util.Iterator:hasNext(...)@168: {1}, {0}
		
		synchronized (openFiles) {
			for (String filename : (new Hashtable<String, OpenFile>(openFiles)).keySet()) {
				OpenFile file = openFiles.get(filename);
				if (file.lastUsedTime < oldestTime) {
					try {
						file.writer.close();
						openFiles.remove(filename);
					} catch (IOException e) {
						Logger.userError(ErrorLevel.LOW, "Unable to close idle file (File: "+filename+")");
    //#LoggingPlugin.java:175: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void timerTask()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
					}
				}
			}
		}
	}
    //#LoggingPlugin.java:180: end of method: void com.dmdirc.addons.logging.LoggingPlugin.timerTask()

	/**
	 * Called when this plugin is unloaded.
	 */
	@Override
	public void onUnload() {
		idleFileTimer.cancel();
    //#LoggingPlugin.java:187: method: void com.dmdirc.addons.logging.LoggingPlugin.onUnload()
    //#input(void onUnload()): ")"._tainted
    //#input(void onUnload()): "Unable to close file (File: "._tainted
    //#input(void onUnload()): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void onUnload()): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(void onUnload()): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(void onUnload()): this
    //#input(void onUnload()): this.command
    //#input(void onUnload()): this.idleFileTimer
    //#input(void onUnload()): this.openFiles
    //#input(void onUnload()): this.openFiles.__Lock
    //#pre[2] (void onUnload()): init'ed(this.command)
    //#pre[3] (void onUnload()): this.idleFileTimer != null
    //#pre[4] (void onUnload()): this.openFiles != null
    //#presumption(void onUnload()): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#presumption(void onUnload()): file.writer@195 != null
    //#presumption(void onUnload()): java.util.Map:get(...).__Tag@195 == com/dmdirc/addons/logging/LoggingPlugin$OpenFile
    //#presumption(void onUnload()): java.util.Map:get(...)@195 != null
    //#presumption(void onUnload()): java.util.Map:keySet(...)@194 != null
    //#test_vector(void onUnload()): java.util.Iterator:hasNext(...)@194: {0}, {1}
		idleFileTimer.purge();
		
		CommandManager.unregisterCommand(command);
    //#LoggingPlugin.java:190: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onUnload()
    //#    unanalyzed callee: void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
		ActionManager.removeListener(this);
    //#LoggingPlugin.java:191: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.actions.ActionManager:removeListener(ActionListener)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onUnload()
    //#    unanalyzed callee: void com.dmdirc.actions.ActionManager:removeListener(ActionListener)
		
		synchronized (openFiles) {
			for (String filename : openFiles.keySet()) {
				OpenFile file = openFiles.get(filename);
				try {
					file.writer.close();
				} catch (IOException e) {
					Logger.userError(ErrorLevel.LOW, "Unable to close file (File: "+filename+")");
    //#LoggingPlugin.java:199: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void onUnload()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
				}
			}
			openFiles.clear();
		}
	}
    //#LoggingPlugin.java:204: end of method: void com.dmdirc.addons.logging.LoggingPlugin.onUnload()

	/** {@inheritDoc} */
	@Override
	public void showConfig(final PreferencesManager manager) {
		final PreferencesCategory general = new PreferencesCategory("Logging", "General configuration for Logging plugin.");
    //#LoggingPlugin.java:209: method: void com.dmdirc.addons.logging.LoggingPlugin.showConfig(PreferencesManager)
    //#LoggingPlugin.java:209: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory(String, String)
    //#input(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesType.BOOLEAN
    //#input(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesType.COLOUR
    //#input(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesType.INTEGER
    //#input(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesType.TEXT
    //#input(void showConfig(PreferencesManager)): manager
    //#input(void showConfig(PreferencesManager)): this
    //#pre[1] (void showConfig(PreferencesManager)): manager != null
    //#presumption(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesManager:getCategory(...)@232 != null
    //#presumption(void showConfig(PreferencesManager)): init'ed(com.dmdirc.config.prefs.PreferencesType.BOOLEAN)
    //#presumption(void showConfig(PreferencesManager)): init'ed(com.dmdirc.config.prefs.PreferencesType.COLOUR)
    //#presumption(void showConfig(PreferencesManager)): init'ed(com.dmdirc.config.prefs.PreferencesType.INTEGER)
    //#presumption(void showConfig(PreferencesManager)): init'ed(com.dmdirc.config.prefs.PreferencesType.TEXT)
		final PreferencesCategory backbuffer = new PreferencesCategory("Back Buffer", "Options related to the automatic backbuffer");
    //#LoggingPlugin.java:210: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory(String, String)
		final PreferencesCategory advanced = new PreferencesCategory("Advanced", "Advanced configuration for Logging plugin. You shouldn't need to edit this unless you know what you are doing.");
    //#LoggingPlugin.java:211: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory(String, String)
		
		general.addSetting(new PreferencesSetting(PreferencesType.TEXT, getDomain(), "general.directory", "Directory", "Directory for log files"));
    //#LoggingPlugin.java:213: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:213: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:213: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		general.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "general.networkfolders", "Separate logs by network", "Should the files be stored in a sub-dir with the networks name?"));
    //#LoggingPlugin.java:214: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:214: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:214: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		general.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "general.addtime", "Timestamp logs", "Should a timestamp be added to the log files?"));
    //#LoggingPlugin.java:215: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:215: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:215: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		general.addSetting(new PreferencesSetting(PreferencesType.TEXT, getDomain(), "general.timestamp", "Timestamp format", "The String to pass to 'SimpleDateFormat' to format the timestamp"));
    //#LoggingPlugin.java:216: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:216: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:216: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		general.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "general.stripcodes", "Strip Control Codes", "Remove known irc control codes from lines before saving?"));
    //#LoggingPlugin.java:217: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:217: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:217: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		general.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "general.channelmodeprefix", "Show channel mode prefix", "Show the @,+ etc next to nicknames"));
    //#LoggingPlugin.java:218: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:218: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:218: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		
		backbuffer.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "backbuffer.autobackbuffer", "Automatically display", "Automatically display the backbuffer when a channel is joined"));
    //#LoggingPlugin.java:220: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:220: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:220: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		backbuffer.addSetting(new PreferencesSetting(PreferencesType.COLOUR, getDomain(), "backbuffer.colour", "Colour to use for display", "Colour used when displaying the backbuffer"));
    //#LoggingPlugin.java:221: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:221: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:221: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		backbuffer.addSetting(new PreferencesSetting(PreferencesType.INTEGER, getDomain(), "backbuffer.lines", "Number of lines to show", "Number of lines used when displaying backbuffer"));
    //#LoggingPlugin.java:222: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:222: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:222: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		backbuffer.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "backbuffer.timestamp", "Show Formatter-Timestamp", "Should the line be added to the frame with the timestamp from the formatter aswell as the file contents"));
    //#LoggingPlugin.java:223: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:223: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:223: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)

		advanced.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "advanced.filenamehash", "Add Filename hash", "Add the MD5 hash of the channel/client name to the filename. (This is used to allow channels with similar names (ie a _ not a  -) to be logged separately)"));
    //#LoggingPlugin.java:225: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:225: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:225: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)

		advanced.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN, getDomain(), "advanced.usedate", "Use Date directories", "Should the log files be in separate directories based on the date?"));
    //#LoggingPlugin.java:227: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:227: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:227: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
		advanced.addSetting(new PreferencesSetting(PreferencesType.TEXT, getDomain(), "advanced.usedateformat", "Archive format", "The String to pass to 'SimpleDateFormat' to format the directory name(s) for archiving"));
    //#LoggingPlugin.java:228: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:228: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#LoggingPlugin.java:228: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)

		general.addSubCategory(backbuffer.setInline());
    //#LoggingPlugin.java:230: Warning: method not available - call not analyzed
    //#    call on PreferencesCategory com.dmdirc.config.prefs.PreferencesCategory:setInline()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: PreferencesCategory com.dmdirc.config.prefs.PreferencesCategory:setInline()
    //#LoggingPlugin.java:230: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
		general.addSubCategory(advanced.setInline());
    //#LoggingPlugin.java:231: Warning: method not available - call not analyzed
    //#    call on PreferencesCategory com.dmdirc.config.prefs.PreferencesCategory:setInline()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: PreferencesCategory com.dmdirc.config.prefs.PreferencesCategory:setInline()
    //#LoggingPlugin.java:231: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
		manager.getCategory("Plugins").addSubCategory(general.setInlineAfter());
    //#LoggingPlugin.java:232: Warning: method not available - call not analyzed
    //#    call on PreferencesCategory com.dmdirc.config.prefs.PreferencesManager:getCategory(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: PreferencesCategory com.dmdirc.config.prefs.PreferencesManager:getCategory(String)
    //#LoggingPlugin.java:232: Warning: method not available - call not analyzed
    //#    call on PreferencesCategory com.dmdirc.config.prefs.PreferencesCategory:setInlineAfter()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: PreferencesCategory com.dmdirc.config.prefs.PreferencesCategory:setInlineAfter()
    //#LoggingPlugin.java:232: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
	}
    //#LoggingPlugin.java:233: end of method: void com.dmdirc.addons.logging.LoggingPlugin.showConfig(PreferencesManager)

	/**
	 * Log a query-related event
	 *
	 * @param type The type of the event to process
	 * @param format Format of messages that are about to be sent. (May be null)
	 * @param arguments The arguments for the event
	 */
	protected void handleQueryEvent(final CoreActionType type, final StringBuffer format, final Object... arguments) {
		final Query query = (Query)arguments[0];
    //#LoggingPlugin.java:243: method: void com.dmdirc.addons.logging.LoggingPlugin.handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): " "._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): ""._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "#"._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "' is invalid. For more information: http:..java.sun.com.javase.6.docs.api.java.text.SimpleDateFormat.html"._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): ")"._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "): "._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): ".log"._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "Dateformat String '"._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "Query object has no server ("._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "Unable to close file (Filename: "._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "Unable to show backbuffer (Filename: "._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): "null.log"._tainted
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Descendant_Table[others]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.addNetworkDir(Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/String;)V
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Z
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;)Ljava/lang/String;
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getLogFile(Ljava/lang/Object;)Ljava/lang/String;
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.showBackBuffer(Lcom/dmdirc/ui/interfaces/Window;Ljava/lang/String;)V
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): arguments
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): arguments.length
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): arguments[0]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): arguments[1]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.QUERY_MESSAGE
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.QUERY_SELF_ACTION
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.QUERY_SELF_MESSAGE
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1).length
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$2.$SwitchMap$com$dmdirc$actions$CoreActionType
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[com/dmdirc/addons/logging/ReverseFileReader]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[others]
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.close()V
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getLines(I)Ljava/util/Stack;
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getNextLine()Ljava/lang/String;
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.reset()V
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): java.io.File.separatorChar
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): this
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): this.__Tag
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): this.openFiles
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): this.openedAtFormat
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): type
    //#input(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): type._tainted
    //#pre[1] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): arguments != null
    //#pre[3] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): arguments[0] != null
    //#pre[2] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): (soft) arguments.length >= 2
    //#pre[4] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): (soft) init'ed(arguments[1])
    //#pre[5] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): (soft) init'ed(com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295])
    //#pre[7] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): (soft) this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#pre[8] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): (soft) this.openFiles != null
    //#pre[9] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): (soft) this.openedAtFormat != null
    //#pre[10] (void handleQueryEvent(CoreActionType, StringBuffer, Object[])): (soft) type != null
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.Query:getServer(...)@249 != null
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.actions.CoreActionType.QUERY_MESSAGE)
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.actions.CoreActionType.QUERY_SELF_ACTION)
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.actions.CoreActionType.QUERY_SELF_MESSAGE)
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:values(...).length >= 1
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@254 != null
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@270 != null
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.logger.ErrorLevel.MEDIUM)
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:get(...).__Tag@281 == com/dmdirc/addons/logging/LoggingPlugin$OpenFile
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:get(...).writer@281 != null
    //#presumption(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:get(...)@281 != null
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.text.SimpleDateFormat
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.addons.logging.LoggingPlugin:getDomain
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.System:getProperty
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOption
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:exists
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.System:currentTimeMillis
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:replaceAll
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:insert
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getNickname
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:getInstance
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:getBytes
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:update
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:digest
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.math.BigInteger
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.math.BigInteger:toString
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Integer:parseInt
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Character:valueOf
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:format
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.awt.Color:decode
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Date
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.text.DateFormat:format
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.ui.messages.Styliser:stipControlCodes
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.FileWriter
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:write
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:newLine
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:flush
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:seek
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:length
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionInt
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:getFilePointer
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:read
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Byte:valueOf
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:add
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:size
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:get
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Byte:byteValue
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:push
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:empty
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:pop
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.ui.interfaces.Window:addLine
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:close
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.FileNotFoundException:getMessage
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.IOException:getMessage
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.SecurityException:getMessage
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:length
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:charAt
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:instanceof
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getParser
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getNetworkName
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getName
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:instanceof
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getParser
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Object:toString
    //#unanalyzed(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.text.SimpleDateFormat:format
    //#test_vector(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295]: {1}, {2}, {3..6}, {-2_147_483_648..0, 7..4_294_967_295}
    //#test_vector(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.Query:getServer(...)@244: Inverse{null}, Addr_Set{null}
    //#test_vector(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.Server:getParser(...)@249: Inverse{null}, Addr_Set{null}
    //#test_vector(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.config.ConfigManager:getOptionBool(...)@254: {0}, {1}
    //#test_vector(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.config.ConfigManager:getOptionBool(...)@270: {0}, {1}
    //#test_vector(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.parser.irc.IRCParser:getClientInfo(...)@260: Inverse{null}, Addr_Set{null}
    //#test_vector(void handleQueryEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:containsKey(...)@280: {0}, {1}
		if (query.getServer() == null) {
    //#LoggingPlugin.java:244: Warning: method not available - call not analyzed
    //#    call on Server com.dmdirc.Query:getServer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: Server com.dmdirc.Query:getServer()
			Logger.appError(ErrorLevel.MEDIUM, "Query object has no server ("+type.toString()+")", new Exception("Query object has no server ("+type.toString()+")"));
    //#LoggingPlugin.java:245: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.actions.CoreActionType:toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.actions.CoreActionType:toString()
    //#LoggingPlugin.java:245: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:appError(ErrorLevel, String, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:appError(ErrorLevel, String, Throwable)
			return;
		}
		
		final IRCParser parser = query.getServer().getParser();
    //#LoggingPlugin.java:249: Warning: method not available - call not analyzed
    //#    call on Server com.dmdirc.Query:getServer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: Server com.dmdirc.Query:getServer()
    //#LoggingPlugin.java:249: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
		ClientInfo client;
		
		if (parser == null) {
			// Without a parser object, we might not be able to find the file to log this to.
			if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "general.networkfolders")) {
    //#LoggingPlugin.java:254: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:254: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:254: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
				// We *wont* be able to, so rather than logging to an incorrect file we just won't log.
				return;
			}
			client = null;
		} else {
			client = parser.getClientInfo(query.getHost());
    //#LoggingPlugin.java:260: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.Query:getHost()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.Query:getHost()
    //#LoggingPlugin.java:260: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.IRCParser:getClientInfo(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.IRCParser:getClientInfo(String)
			if (client == null) {
				client = new ClientInfo(parser, query.getHost()).setFake(true);
    //#LoggingPlugin.java:262: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.Query:getHost()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.Query:getHost()
    //#LoggingPlugin.java:262: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.parser.irc.ClientInfo(IRCParser, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: void com.dmdirc.parser.irc.ClientInfo(IRCParser, String)
    //#LoggingPlugin.java:262: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.ClientInfo:setFake(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.ClientInfo:setFake(bool)
			}
		}
		
		final String filename = getLogFile(client);
		
		switch (type) {
    //#LoggingPlugin.java:268: method: com.dmdirc.addons.logging.LoggingPlugin$2.com.dmdirc.addons.logging.LoggingPlugin$2__static_init
    //#LoggingPlugin.java:268: Warning: method not available - call not analyzed
    //#    call on CoreActionType[] com.dmdirc.actions.CoreActionType:values()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin$2
    //#    method: com.dmdirc.addons.logging.LoggingPlugin$2__static_init
    //#    unanalyzed callee: CoreActionType[] com.dmdirc.actions.CoreActionType:values()
    //#LoggingPlugin.java:268: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.actions.CoreActionType:ordinal()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin$2
    //#    method: com.dmdirc.addons.logging.LoggingPlugin$2__static_init
    //#    unanalyzed callee: int com.dmdirc.actions.CoreActionType:ordinal()
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_ACTION
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_CLOSED
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_GOTTOPIC
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_JOIN
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_KICK
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_MESSAGE
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_MODECHANGE
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_NICKCHANGE
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_OPENED
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_PART
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_QUIT
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_ACTION
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_MESSAGE
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_TOPICCHANGE
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_ACTION
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_CLOSED
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_MESSAGE
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_OPENED
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_SELF_ACTION
    //#input(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_SELF_MESSAGE
    //#output(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): $SwitchMap$com$dmdirc$actions$CoreActionType
    //#output(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$2]
    //#output(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): new int[](LoggingPlugin$2__static_init#1) num objects
    //#output(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): $SwitchMap$com$dmdirc$actions$CoreActionType.length
    //#output(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): $SwitchMap$com$dmdirc$actions$CoreActionType[0..4_294_967_295]
    //#new obj(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): new int[](LoggingPlugin$2__static_init#1)
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_ACTION != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_CLOSED != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_GOTTOPIC != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_JOIN != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_KICK != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_MESSAGE != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_MODECHANGE != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_NICKCHANGE != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_OPENED != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_PART != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_QUIT != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_ACTION != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_MESSAGE != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.CHANNEL_TOPICCHANGE != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_ACTION != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_CLOSED != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_MESSAGE != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_OPENED != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_SELF_ACTION != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType.QUERY_SELF_MESSAGE != null
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 >= 0
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:ordinal(...)@268 < com.dmdirc.actions.CoreActionType:values(...).length@268
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:values(...).length@268 >= 1
    //#presumption(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): com.dmdirc.actions.CoreActionType:values(...)@268 != null
    //#post(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): $SwitchMap$com$dmdirc$actions$CoreActionType == &new int[](LoggingPlugin$2__static_init#1)
    //#post(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$2] == &__Dispatch_Table
    //#post(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): new int[](LoggingPlugin$2__static_init#1) num objects == 1
    //#post(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): $SwitchMap$com$dmdirc$actions$CoreActionType.length >= 1
    //#post(com.dmdirc.addons.logging.LoggingPlugin$2__static_init): $SwitchMap$com$dmdirc$actions$CoreActionType[0..4_294_967_295] in {0..20}, if init'ed
    //#LoggingPlugin.java:268: end of method: com.dmdirc.addons.logging.LoggingPlugin$2.com.dmdirc.addons.logging.LoggingPlugin$2__static_init
    //#LoggingPlugin.java:268: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.actions.CoreActionType:ordinal()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: int com.dmdirc.actions.CoreActionType:ordinal()
			case QUERY_OPENED:
				if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "backbuffer.autobackbuffer")) {
    //#LoggingPlugin.java:270: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:270: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:270: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
					showBackBuffer(query.getFrame(), filename);
    //#LoggingPlugin.java:271: Warning: method not available - call not analyzed
    //#    call on InputWindow com.dmdirc.Query:getFrame()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: InputWindow com.dmdirc.Query:getFrame()
				}

				appendLine(filename, "*** Query opened at: %s", openedAtFormat.format(new Date()));
				appendLine(filename, "*** Query with User: %s", query.getHost());
    //#LoggingPlugin.java:275: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.Query:getHost()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.Query:getHost()
				appendLine(filename, "");
				break;
			case QUERY_CLOSED:
				appendLine(filename, "*** Query closed at: %s", openedAtFormat.format(new Date()));
				if (openFiles.containsKey(filename)) {
					final BufferedWriter file = openFiles.get(filename).writer;
					try {
						file.close();
					} catch (IOException e) {
						Logger.userError(ErrorLevel.LOW, "Unable to close file (Filename: "+filename+")");
    //#LoggingPlugin.java:285: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
					}
					openFiles.remove(filename);
				}
				break;
			case QUERY_MESSAGE:
			case QUERY_SELF_MESSAGE:
			case QUERY_ACTION:
			case QUERY_SELF_ACTION:
				final boolean isME = (type == CoreActionType.QUERY_SELF_MESSAGE || type == CoreActionType.QUERY_SELF_ACTION);
				final String overrideNick = (isME) ? getDisplayName(parser.getMyself()) : "";
    //#LoggingPlugin.java:295: ?null dereference
    //#    parser != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_23
    //#    assertion: parser != null
    //#    VN: com.dmdirc.Server:getParser(...)@249
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad  Uncertain
    //#LoggingPlugin.java:295: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
				
				if (type == CoreActionType.QUERY_MESSAGE || type == CoreActionType.QUERY_SELF_MESSAGE) {
					appendLine(filename, "<%s> %s", getDisplayName(client, overrideNick), (String)arguments[1]);
    //#LoggingPlugin.java:298: ?precondition failure
    //#    com/dmdirc/addons/logging/LoggingPlugin.getDisplayName: overrideNick != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_27
    //#    assertion: getDisplayName(...) != null
    //#    callee: String com/dmdirc/addons/logging/LoggingPlugin.getDisplayName(ClientInfo, String)
    //#    callee assertion: overrideNick != null
    //#    callee file: LoggingPlugin.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 735
    //#    VN: getDisplayName(...)
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
				} else {
					appendLine(filename, "* %s %s", getDisplayName(client, overrideNick), (String)arguments[1]);
    //#LoggingPlugin.java:300: ?precondition failure
    //#    com/dmdirc/addons/logging/LoggingPlugin.getDisplayName: overrideNick != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleQueryEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_28
    //#    assertion: getDisplayName(...) != null
    //#    callee: String com/dmdirc/addons/logging/LoggingPlugin.getDisplayName(ClientInfo, String)
    //#    callee assertion: overrideNick != null
    //#    callee file: LoggingPlugin.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 735
    //#    VN: getDisplayName(...)
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
				}
				break;
		}
	}
    //#LoggingPlugin.java:304: end of method: void com.dmdirc.addons.logging.LoggingPlugin.handleQueryEvent(CoreActionType, StringBuffer, Object[])
	
	/**
	 * Log a channel-related event
	 *
	 * @param type The type of the event to process
	 * @param format Format of messages that are about to be sent. (May be null)
	 * @param arguments The arguments for the event
	 */
	protected void handleChannelEvent(final CoreActionType type, final StringBuffer format, final Object... arguments) {
		final Channel chan = ((Channel)arguments[0]);
    //#LoggingPlugin.java:314: method: void com.dmdirc.addons.logging.LoggingPlugin.handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): " "._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): ""._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): "#"._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): "' is invalid. For more information: http:..java.sun.com.javase.6.docs.api.java.text.SimpleDateFormat.html"._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): ")"._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): "): "._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): ".log"._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): "Dateformat String '"._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): "Unable to close file (Filename: "._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): "Unable to show backbuffer (Filename: "._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): "null.log"._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Descendant_Table[others]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.addNetworkDir(Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/String;)V
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Z
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;)Ljava/lang/String;
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;)Ljava/lang/String;
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.getLogFile(Ljava/lang/Object;)Ljava/lang/String;
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): __Dispatch_Table.showBackBuffer(Lcom/dmdirc/ui/interfaces/Window;Ljava/lang/String;)V
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments.length
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments[0]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments[1]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments[1]._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments[2]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments[2]._tainted
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments[3]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.CHANNEL_MESSAGE
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_MESSAGE
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1).length
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$2.$SwitchMap$com$dmdirc$actions$CoreActionType
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[com/dmdirc/addons/logging/ReverseFileReader]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[others]
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.close()V
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getLines(I)Ljava/util/Stack;
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getNextLine()Ljava/lang/String;
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.reset()V
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.io.File.separatorChar
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): this
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): this.__Tag
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): this.openFiles
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): this.openedAtFormat
    //#input(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): type
    //#pre[2] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments != null
    //#pre[4] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): arguments[0] != null
    //#pre[13] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#pre[16] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): type != null
    //#pre[3] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): (soft) arguments.length >= 4
    //#pre[5] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): (soft) init'ed(arguments[1])
    //#pre[8] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): (soft) init'ed(arguments[2])
    //#pre[10] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): (soft) arguments[3] != null
    //#pre[11] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): (soft) init'ed(com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295])
    //#pre[14] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): (soft) this.openFiles != null
    //#pre[15] (void handleChannelEvent(CoreActionType, StringBuffer, Object[])): (soft) this.openedAtFormat != null
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.Channel:getChannelInfo(...)@315 != null
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_MESSAGE)
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.actions.CoreActionType.CHANNEL_SELF_MESSAGE)
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:ordinal(...)@323 >= 0
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:values(...).length >= 1
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:ordinal(...)@323 < com.dmdirc.actions.CoreActionType:values(...).length
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@325 != null
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)@319 != null
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.parser.irc.ChannelClientInfo:getNickname(...)@396 != null
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.parser.irc.ChannelInfo:getTopicTime(...)@360 in {-9_223_372_036_854_775..18_446_744_073_709_551}
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.parser.irc.ChannelInfo:getTopicTime(...)@360 in {-9_223_372_036_854_775..18_446_744_073_709_551}
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:get(...).__Tag@335 == com/dmdirc/addons/logging/LoggingPlugin$OpenFile
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:get(...).writer@335 != null
    //#presumption(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:get(...)@335 != null
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.text.SimpleDateFormat
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.addons.logging.LoggingPlugin:getDomain
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.System:getProperty
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOption
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:exists
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.System:currentTimeMillis
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:replaceAll
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:insert
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getNickname
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:getInstance
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:getBytes
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:update
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:digest
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.math.BigInteger
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.math.BigInteger:toString
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Integer:parseInt
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Character:valueOf
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:format
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.awt.Color:decode
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:toString
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:getNickname
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:getImportantModePrefix
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Date
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.text.DateFormat:format
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.ui.messages.Styliser:stipControlCodes
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.FileWriter
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:write
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:newLine
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:flush
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:seek
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:length
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionInt
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:getFilePointer
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:read
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Byte:valueOf
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:add
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:size
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:get
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Byte:byteValue
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:push
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:empty
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:pop
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.ui.interfaces.Window:addLine
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:close
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.FileNotFoundException:getMessage
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.io.IOException:getMessage
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.SecurityException:getMessage
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:length
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:charAt
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:instanceof
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getParser
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getNetworkName
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getName
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:instanceof
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getParser
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Object:toString
    //#unanalyzed(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): Effects-of-calling:java.text.SimpleDateFormat:format
    //#test_vector(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295]: {7}, {8}, {9..12}, {13}, {14}, {15}, {16}, {17}, {18}, {19}, {20}, {-2_147_483_648..6, 21..4_294_967_295}
    //#test_vector(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): com.dmdirc.config.ConfigManager:getOptionBool(...)@325: {0}, {1}
    //#test_vector(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.lang.String:isEmpty(...)@369: {0}, {1}
    //#test_vector(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.lang.String:isEmpty(...)@376: {0}, {1}
    //#test_vector(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.lang.String:isEmpty(...)@386: {0}, {1}
    //#test_vector(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.lang.String:isEmpty(...)@396: {0}, {1}
    //#test_vector(void handleChannelEvent(CoreActionType, StringBuffer, Object[])): java.util.Map:containsKey(...)@334: {0}, {1}
		final ChannelInfo channel = chan.getChannelInfo();
    //#LoggingPlugin.java:315: Warning: method not available - call not analyzed
    //#    call on ChannelInfo com.dmdirc.Channel:getChannelInfo()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ChannelInfo com.dmdirc.Channel:getChannelInfo()
		final String filename = getLogFile(channel);
		
		final ChannelClientInfo channelClient = (arguments.length > 1 && arguments[1] instanceof ChannelClientInfo) ? (ChannelClientInfo)arguments[1] : null;
		final ClientInfo client = (channelClient != null) ? channelClient.getClient() : null;
    //#LoggingPlugin.java:319: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.ChannelClientInfo:getClient()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.ChannelClientInfo:getClient()

		final String message = (arguments.length > 2 && arguments[2] instanceof String) ? (String)arguments[2] : null;
		
		switch (type) {
    //#LoggingPlugin.java:323: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.actions.CoreActionType:ordinal()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: int com.dmdirc.actions.CoreActionType:ordinal()
			case CHANNEL_OPENED:
				if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "backbuffer.autobackbuffer")) {
    //#LoggingPlugin.java:325: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:325: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:325: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
					showBackBuffer(chan.getFrame(), filename);
    //#LoggingPlugin.java:326: Warning: method not available - call not analyzed
    //#    call on InputWindow com.dmdirc.Channel:getFrame()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: InputWindow com.dmdirc.Channel:getFrame()
				}

				appendLine(filename, "*** Channel opened at: %s", openedAtFormat.format(new Date()));
				appendLine(filename, "");
				break;
			case CHANNEL_CLOSED:
				appendLine(filename, "*** Channel closed at: %s", openedAtFormat.format(new Date()));
				if (openFiles.containsKey(filename)) {
					final BufferedWriter file = openFiles.get(filename).writer;
					try {
						file.close();
					} catch (IOException e) {
						Logger.userError(ErrorLevel.LOW, "Unable to close file (Filename: "+filename+")");
    //#LoggingPlugin.java:339: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
					}
					openFiles.remove(filename);
				}
				break;
			case CHANNEL_MESSAGE:
			case CHANNEL_SELF_MESSAGE:
			case CHANNEL_ACTION:
			case CHANNEL_SELF_ACTION:
				if (type == CoreActionType.CHANNEL_MESSAGE || type == CoreActionType.CHANNEL_SELF_MESSAGE) {
					appendLine(filename, "<%s> %s", getDisplayName(client), message);
				} else {
					appendLine(filename, "* %s %s", getDisplayName(client), message);
				}
				break;
			case CHANNEL_GOTTOPIC:
				// ActionManager.processEvent(CoreActionType.CHANNEL_GOTTOPIC, this);
				final DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
				final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
				
				appendLine(filename, "*** Topic is: %s", channel.getTopic());
    //#LoggingPlugin.java:359: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelInfo:getTopic()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelInfo:getTopic()
				appendLine(filename, "*** Set at: %s on %s by %s", timeFormat.format(1000 * channel.getTopicTime()), dateFormat.format(1000 * channel.getTopicTime()), channel.getTopicUser());
    //#LoggingPlugin.java:360: Warning: method not available - call not analyzed
    //#    call on long com.dmdirc.parser.irc.ChannelInfo:getTopicTime()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: long com.dmdirc.parser.irc.ChannelInfo:getTopicTime()
    //#LoggingPlugin.java:360: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelInfo:getTopicUser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelInfo:getTopicUser()
				break;
			case CHANNEL_TOPICCHANGE:
				appendLine(filename, "*** %s Changed the topic to: %s", getDisplayName(channelClient), message);
				break;
			case CHANNEL_JOIN:
				appendLine(filename, "*** %s (%s) joined the channel", getDisplayName(channelClient), client.toString());
    //#LoggingPlugin.java:366: ?null dereference
    //#    client != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_27
    //#    assertion: client != null
    //#    VN: com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad  Uncertain
    //#LoggingPlugin.java:366: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:toString()
				break;
			case CHANNEL_PART:
				if (message.isEmpty()) {
    //#LoggingPlugin.java:369: ?null dereference
    //#    message != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_28
    //#    assertion: message != null
    //#    VN: arguments[2]
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
					appendLine(filename, "*** %s (%s) left the channel", getDisplayName(channelClient), client.toString());
    //#LoggingPlugin.java:370: ?null dereference
    //#    client != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_29
    //#    assertion: client != null
    //#    VN: com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad  Uncertain
    //#LoggingPlugin.java:370: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:toString()
				} else {
					appendLine(filename, "*** %s (%s) left the channel (%s)", getDisplayName(channelClient), client.toString(), message);
    //#LoggingPlugin.java:372: ?null dereference
    //#    client != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_30
    //#    assertion: client != null
    //#    VN: com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad  Uncertain
    //#LoggingPlugin.java:372: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:toString()
				}
				break;
			case CHANNEL_QUIT:
				if (message.isEmpty()) {
    //#LoggingPlugin.java:376: ?null dereference
    //#    message != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_31
    //#    assertion: message != null
    //#    VN: arguments[2]
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
					appendLine(filename, "*** %s (%s) Quit IRC", getDisplayName(channelClient), client.toString());
    //#LoggingPlugin.java:377: ?null dereference
    //#    client != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_32
    //#    assertion: client != null
    //#    VN: com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad  Uncertain
    //#LoggingPlugin.java:377: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:toString()
				} else {
					appendLine(filename, "*** %s (%s) Quit IRC (%s)", getDisplayName(channelClient), client.toString(), message);
    //#LoggingPlugin.java:379: ?null dereference
    //#    client != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_33
    //#    assertion: client != null
    //#    VN: com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad  Uncertain
    //#LoggingPlugin.java:379: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:toString()
				}
				break;
			case CHANNEL_KICK:
				final String kickReason = (String)arguments[3];
				final ChannelClientInfo kickedClient = (ChannelClientInfo)arguments[2];
				
				if (kickReason.isEmpty()) {
					appendLine(filename, "*** %s was kicked by %s", getDisplayName(kickedClient), getDisplayName(channelClient));
				} else {
					appendLine(filename, "*** %s was kicked by %s (%s)", getDisplayName(kickedClient), getDisplayName(channelClient), kickReason);
				}
				break;
			case CHANNEL_NICKCHANGE:
				appendLine(filename, "*** %s is now %s", getDisplayName(channelClient, message), getDisplayName(channelClient));
    //#LoggingPlugin.java:393: ?precondition failure
    //#    com/dmdirc/addons/logging/LoggingPlugin.getDisplayName: overrideNick != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_37
    //#    assertion: arguments[2] != null
    //#    callee: String com/dmdirc/addons/logging/LoggingPlugin.getDisplayName(ChannelClientInfo, String)
    //#    callee assertion: overrideNick != null
    //#    callee file: LoggingPlugin.java
    //#    callee precondition index: [3]
    //#    callee srcpos: 760
    //#    VN: arguments[2]
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
				break;
			case CHANNEL_MODECHANGE:
				if (channelClient.getNickname().isEmpty()) {
    //#LoggingPlugin.java:396: ?null dereference
    //#    channelClient != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    basic block: bb_38
    //#    assertion: channelClient != null
    //#    VN: arguments[1]
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
    //#LoggingPlugin.java:396: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelClientInfo:getNickname()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void handleChannelEvent(CoreActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelClientInfo:getNickname()
					appendLine(filename, "*** Channel modes are: %s", message);
				} else {
					appendLine(filename, "*** %s set modes: %s", getDisplayName(channelClient), message);
				}
				break;
		}
	}
    //#LoggingPlugin.java:403: end of method: void com.dmdirc.addons.logging.LoggingPlugin.handleChannelEvent(CoreActionType, StringBuffer, Object[])

	/**
	 * Process an event of the specified type.
	 *
	 * @param type The type of the event to process
	 * @param format Format of messages that are about to be sent. (May be null)
	 * @param arguments The arguments for the event
	 */
	@Override
	public void processEvent(final ActionType type, final StringBuffer format, final Object ... arguments) {
		if (type instanceof CoreActionType) {
    //#LoggingPlugin.java:414: method: void com.dmdirc.addons.logging.LoggingPlugin.processEvent(ActionType, StringBuffer, Object[])
    //#input(void processEvent(ActionType, StringBuffer, Object[])): " "._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): ""._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "#"._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "' is invalid. For more information: http:..java.sun.com.javase.6.docs.api.java.text.SimpleDateFormat.html"._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): ")"._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "): "._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): ".log"._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "Dateformat String '"._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "Query object has no server ("._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "Unable to close file (Filename: "._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "Unable to show backbuffer (Filename: "._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "null.log"._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Descendant_Table[others]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.addNetworkDir(Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/String;)V
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Z
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;)Ljava/lang/String;
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;)Ljava/lang/String;
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.getLogFile(Ljava/lang/Object;)Ljava/lang/String;
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.handleChannelEvent(Lcom/dmdirc/actions/CoreActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.handleQueryEvent(Lcom/dmdirc/actions/CoreActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V
    //#input(void processEvent(ActionType, StringBuffer, Object[])): __Dispatch_Table.showBackBuffer(Lcom/dmdirc/ui/interfaces/Window;Ljava/lang/String;)V
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments.length
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[0]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[1]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[1]._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[2]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[2]._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[3]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.CHANNEL_MESSAGE
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.CHANNEL_SELF_MESSAGE
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.QUERY_MESSAGE
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.QUERY_SELF_ACTION
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType.QUERY_SELF_MESSAGE
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1).length
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$2.$SwitchMap$com$dmdirc$actions$CoreActionType
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[com/dmdirc/addons/logging/ReverseFileReader]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[others]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.close()V
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getLines(I)Ljava/util/Stack;
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getNextLine()Ljava/lang/String;
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.reset()V
    //#input(void processEvent(ActionType, StringBuffer, Object[])): format
    //#input(void processEvent(ActionType, StringBuffer, Object[])): java.io.File.separatorChar
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.__Tag
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.openFiles
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.openedAtFormat
    //#input(void processEvent(ActionType, StringBuffer, Object[])): type
    //#input(void processEvent(ActionType, StringBuffer, Object[])): type._tainted
    //#pre[1] (void processEvent(ActionType, StringBuffer, Object[])): (soft) arguments != null
    //#pre[2] (void processEvent(ActionType, StringBuffer, Object[])): (soft) arguments.length >= 4
    //#pre[3] (void processEvent(ActionType, StringBuffer, Object[])): (soft) arguments[0] != null
    //#pre[4] (void processEvent(ActionType, StringBuffer, Object[])): (soft) init'ed(arguments[1])
    //#pre[6] (void processEvent(ActionType, StringBuffer, Object[])): (soft) init'ed(arguments[2])
    //#pre[8] (void processEvent(ActionType, StringBuffer, Object[])): (soft) arguments[3] != null
    //#pre[9] (void processEvent(ActionType, StringBuffer, Object[])): (soft) init'ed(com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295])
    //#pre[12] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#pre[13] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.openFiles != null
    //#pre[14] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.openedAtFormat != null
    //#presumption(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:ordinal(...)@417 >= 0
    //#presumption(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:values(...).length >= 1
    //#presumption(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:values(...).length - com.dmdirc.actions.CoreActionType:ordinal(...)@417 in range
    //#presumption(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.actions.CoreActionType:ordinal(...)@417 < com.dmdirc.actions.CoreActionType:values(...).length
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.text.SimpleDateFormat
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.addons.logging.LoggingPlugin:getDomain
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.System:getProperty
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOption
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:exists
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.System:currentTimeMillis
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:close
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:remove
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:replaceAll
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:insert
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getNickname
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:getInstance
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:getBytes
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:update
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.security.MessageDigest:digest
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.math.BigInteger
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.math.BigInteger:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Integer:parseInt
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Character:valueOf
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:format
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.awt.Color:decode
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:getNickname
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:getImportantModePrefix
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Date
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.text.DateFormat:format
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.ui.messages.Styliser:stipControlCodes
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.FileWriter
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:write
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:newLine
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.BufferedWriter:flush
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.actions.CoreActionType:ordinal
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.Channel:getChannelInfo
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:getLogFile
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:instanceof
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:getClient
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:instanceof
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.Channel:getFrame
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:showBackBuffer
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:getDisplayName
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getTopic
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getTopicTime
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Long:valueOf
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getTopicUser
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.Query:getServer
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.Server:getParser
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.Query:getHost
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getClientInfo
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:setFake
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:seek
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:length
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionInt
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:getFilePointer
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:read
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Byte:valueOf
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:add
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:size
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.ArrayList:get
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Byte:byteValue
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:push
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:empty
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.Stack:pop
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.ui.interfaces.Window:addLine
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.RandomAccessFile:close
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.FileNotFoundException:getMessage
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.IOException:getMessage
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.SecurityException:getMessage
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:length
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuffer:charAt
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:instanceof
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getParser
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getNetworkName
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getName
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:instanceof
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getParser
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Object:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.text.SimpleDateFormat:format
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.actions.CoreActionType:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Exception
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.logger.Logger:appError
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.Query:getFrame
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getMyself
    //#test_vector(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.addons.logging.LoggingPlugin$2__static_init.new int[](LoggingPlugin$2__static_init#1)[0..4_294_967_295]: {1..6}, {7..20}, {-2_147_483_648..0, 21..4_294_967_295}
			final CoreActionType thisType = (CoreActionType) type;

			switch (thisType) {
    //#LoggingPlugin.java:417: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.actions.CoreActionType:ordinal()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void processEvent(ActionType, StringBuffer, Object[])
    //#    unanalyzed callee: int com.dmdirc.actions.CoreActionType:ordinal()
				case CHANNEL_OPENED:
				case CHANNEL_CLOSED:
				case CHANNEL_MESSAGE:
				case CHANNEL_SELF_MESSAGE:
				case CHANNEL_ACTION:
				case CHANNEL_SELF_ACTION:
				case CHANNEL_GOTTOPIC:
				case CHANNEL_TOPICCHANGE:
				case CHANNEL_JOIN:
				case CHANNEL_PART:
				case CHANNEL_QUIT:
				case CHANNEL_KICK:
				case CHANNEL_NICKCHANGE:
				case CHANNEL_MODECHANGE:
					handleChannelEvent(thisType, format, arguments);
					break;
				case QUERY_OPENED:
				case QUERY_CLOSED:
				case QUERY_MESSAGE:
				case QUERY_SELF_MESSAGE:
				case QUERY_ACTION:
				case QUERY_SELF_ACTION:
					handleQueryEvent(thisType, format, arguments);
					break;
				default:
					break;
			}
		}
	}
    //#LoggingPlugin.java:446: end of method: void com.dmdirc.addons.logging.LoggingPlugin.processEvent(ActionType, StringBuffer, Object[])

	/**
	 * Add a backbuffer to a frame.
	 *
	 * @param frame The frame to add the backbuffer lines to
	 * @param filename File to get backbuffer from
	 */
	protected void showBackBuffer(final Window frame, final String filename) {
		final int numLines = IdentityManager.getGlobalConfig().getOptionInt(getDomain(), "backbuffer.lines");
    //#LoggingPlugin.java:455: method: void com.dmdirc.addons.logging.LoggingPlugin.showBackBuffer(Window, String)
    //#LoggingPlugin.java:455: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:455: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:455: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.config.ConfigManager:getOptionInt(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: int com.dmdirc.config.ConfigManager:getOptionInt(String, String)
    //#input(void showBackBuffer(Window, String)): "#"._tainted
    //#input(void showBackBuffer(Window, String)): "): "._tainted
    //#input(void showBackBuffer(Window, String)): "Unable to show backbuffer (Filename: "._tainted
    //#input(void showBackBuffer(Window, String)): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void showBackBuffer(Window, String)): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[com/dmdirc/addons/logging/ReverseFileReader]
    //#input(void showBackBuffer(Window, String)): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[others]
    //#input(void showBackBuffer(Window, String)): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.close()V
    //#input(void showBackBuffer(Window, String)): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getLines(I)Ljava/util/Stack;
    //#input(void showBackBuffer(Window, String)): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getNextLine()Ljava/lang/String;
    //#input(void showBackBuffer(Window, String)): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.reset()V
    //#input(void showBackBuffer(Window, String)): filename
    //#input(void showBackBuffer(Window, String)): filename._tainted
    //#input(void showBackBuffer(Window, String)): frame
    //#input(void showBackBuffer(Window, String)): this
    //#presumption(void showBackBuffer(Window, String)): com.dmdirc.config.ConfigManager:getOption(...)@456 != null
    //#presumption(void showBackBuffer(Window, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@455 != null
    //#presumption(void showBackBuffer(Window, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@456 != null
    //#presumption(void showBackBuffer(Window, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@457 != null
    //#presumption(void showBackBuffer(Window, String)): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.Integer:parseInt
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.Character:valueOf
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.String:format
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.awt.Color:decode
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.io.RandomAccessFile:seek
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.io.RandomAccessFile:length
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.io.RandomAccessFile:getFilePointer
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.io.RandomAccessFile:read
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.Byte:valueOf
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.util.ArrayList:add
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.util.ArrayList:size
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.util.ArrayList:get
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.Byte:byteValue
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.lang.String
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.io.RandomAccessFile
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.util.Stack
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.util.Stack:push
    //#unanalyzed(void showBackBuffer(Window, String)): Effects-of-calling:java.io.RandomAccessFile:close
    //#test_vector(void showBackBuffer(Window, String)): frame: Inverse{null}, Addr_Set{null}
    //#test_vector(void showBackBuffer(Window, String)): java.io.File:exists(...)@464: {0}, {1}
    //#test_vector(void showBackBuffer(Window, String)): java.util.Stack:empty(...)@472: {1}, {0}
		final String colour = IdentityManager.getGlobalConfig().getOption(getDomain(), "backbuffer.colour");
    //#LoggingPlugin.java:456: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:456: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:456: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: String com.dmdirc.config.ConfigManager:getOption(String, String)
		final boolean showTimestamp = IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "backbuffer.timestamp");
    //#LoggingPlugin.java:457: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:457: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:457: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
		if (frame == null) {
			Logger.userError(ErrorLevel.LOW, "Given a null frame");
    //#LoggingPlugin.java:459: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			return;
		}

		final File testFile = new File(filename);
		if (testFile.exists()) {
			try {
				final ReverseFileReader file = new ReverseFileReader(testFile);
				// Because the file includes a newline char at the end, an empty line
				// is returned by getLines. To counter this, we call getLines(1) and do
				// nothing with the output.
				file.getLines(1);
				final Stack<String> lines = file.getLines(numLines);
				while (!lines.empty()) {
					frame.addLine(getColouredString(colour,lines.pop()), showTimestamp);
    //#LoggingPlugin.java:473: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.ui.interfaces.Window:addLine(String, bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: void com.dmdirc.ui.interfaces.Window:addLine(String, bool)
				}
				file.close();
    //#LoggingPlugin.java:475: Warning: unused assignment in callee
    //#    Unused assignment to (file.file) in close
    //#    severity: LOW
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
				frame.addLine(getColouredString(colour,"--- End of backbuffer\n"), showTimestamp);
    //#LoggingPlugin.java:476: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.ui.interfaces.Window:addLine(String, bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: void com.dmdirc.ui.interfaces.Window:addLine(String, bool)
			} catch (FileNotFoundException e) {
				Logger.userError(ErrorLevel.LOW, "Unable to show backbuffer (Filename: "+filename+"): " + e.getMessage());
    //#LoggingPlugin.java:478: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			} catch (IOException e) {
				Logger.userError(ErrorLevel.LOW, "Unable to show backbuffer (Filename: "+filename+"): " + e.getMessage());
    //#LoggingPlugin.java:480: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			} catch (SecurityException e) {
				Logger.userError(ErrorLevel.LOW, "Unable to show backbuffer (Filename: "+filename+"): " + e.getMessage());
    //#LoggingPlugin.java:482: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void showBackBuffer(Window, String)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			}
		}
	}
    //#LoggingPlugin.java:485: end of method: void com.dmdirc.addons.logging.LoggingPlugin.showBackBuffer(Window, String)

	/**
	 * Get a coloured String.
	 * If colour is invalid, IRC Colour 14 will be used.
	 *
	 * @param colour The colour the string should be (IRC Colour or 6-digit hex colour)
	 * @param line the line to colour
	 * @return The given line with the appropriate irc codes appended/prepended to colour it.
	 */
	protected static String getColouredString(final String colour, final String line) {
		String res = null;
    //#LoggingPlugin.java:496: method: String com.dmdirc.addons.logging.LoggingPlugin.getColouredString(String, String)
    //#input(String getColouredString(String, String)): "#"._tainted
    //#input(String getColouredString(String, String)): colour
    //#input(String getColouredString(String, String)): colour._tainted
    //#input(String getColouredString(String, String)): line
    //#output(String getColouredString(String, String)): return_value
    //#pre[1] (String getColouredString(String, String)): colour != null
    //#post(String getColouredString(String, String)): init'ed(return_value)
    //#test_vector(String getColouredString(String, String)): java.lang.Integer:parseInt(...)@501: {16..4_294_967_295}, {0..15}
    //#test_vector(String getColouredString(String, String)): java.lang.String:length(...)@497: {3..4_294_967_295}, {0..2}
    //#test_vector(String getColouredString(String, String)): java.lang.String:length(...)@509: {0..5, 7..4_294_967_295}, {6}
		if (colour.length() < 3) {
			int num;

			try {
				num = Integer.parseInt(colour);
			} catch (NumberFormatException ex) {
				num = -1;
			}

			if (num >= 0 && num <= 15) {
				res = String.format("%c%02d%s%1$c", Styliser.CODE_COLOUR, num, line);
			}
		} else if (colour.length() == 6) {
			try {
				Color.decode("#" + colour);
				res = String.format("%c%s%s%1$c", Styliser.CODE_HEXCOLOUR, colour, line);
			} catch (NumberFormatException ex) { /* Do Nothing */ }
		}

		if (res == null) {
			res = String.format("%c%02d%s%1$c", Styliser.CODE_COLOUR, 14, line);
		}
		return res;
    //#LoggingPlugin.java:519: end of method: String com.dmdirc.addons.logging.LoggingPlugin.getColouredString(String, String)
	}

	/**
	 * Add a line to a file.
	 *
	 * @param filename Name of file to write to
	 * @param format Format of line to add. (NewLine will be added Automatically)
	 * @param args Arguments for format
	 * @return true on success, else false.
	 */
	protected boolean appendLine(final String filename, final String format, final Object... args) {
		return appendLine(filename, String.format(format, args));
    //#LoggingPlugin.java:531: method: bool com.dmdirc.addons.logging.LoggingPlugin.appendLine(String, String, Object[])
    //#input(bool appendLine(String, String, Object[])): " "._tainted
    //#input(bool appendLine(String, String, Object[])): "' is invalid. For more information: http:..java.sun.com.javase.6.docs.api.java.text.SimpleDateFormat.html"._tainted
    //#input(bool appendLine(String, String, Object[])): "Dateformat String '"._tainted
    //#input(bool appendLine(String, String, Object[])): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(bool appendLine(String, String, Object[])): __Descendant_Table[others]
    //#input(bool appendLine(String, String, Object[])): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(bool appendLine(String, String, Object[])): args
    //#input(bool appendLine(String, String, Object[])): com.dmdirc.logger.ErrorLevel.LOW
    //#input(bool appendLine(String, String, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(bool appendLine(String, String, Object[])): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(bool appendLine(String, String, Object[])): filename
    //#input(bool appendLine(String, String, Object[])): format
    //#input(bool appendLine(String, String, Object[])): this
    //#input(bool appendLine(String, String, Object[])): this.__Tag
    //#input(bool appendLine(String, String, Object[])): this.openFiles
    //#output(bool appendLine(String, String, Object[])): return_value
    //#pre[5] (bool appendLine(String, String, Object[])): this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#pre[6] (bool appendLine(String, String, Object[])): (soft) this.openFiles != null
    //#post(bool appendLine(String, String, Object[])): init'ed(return_value)
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.text.SimpleDateFormat
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:com.dmdirc.addons.logging.LoggingPlugin:getDomain
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOption
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.System:currentTimeMillis
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.util.Map:get
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.util.Date
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.text.DateFormat:format
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:com.dmdirc.ui.messages.Styliser:stipControlCodes
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.io.FileWriter
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.io.BufferedWriter
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.util.Map:put
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.io.BufferedWriter:write
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.io.BufferedWriter:newLine
    //#unanalyzed(bool appendLine(String, String, Object[])): Effects-of-calling:java.io.BufferedWriter:flush
    //#LoggingPlugin.java:531: end of method: bool com.dmdirc.addons.logging.LoggingPlugin.appendLine(String, String, Object[])
	}

	/**
	 * Add a line to a file.
	 *
	 * @param filename Name of file to write to
	 * @param line Line to add. (NewLine will be added Automatically)
	 * @return true on success, else false.
	 */
	protected boolean appendLine(final String filename, final String line) {
		final StringBuffer finalLine = new StringBuffer();
    //#LoggingPlugin.java:542: method: bool com.dmdirc.addons.logging.LoggingPlugin.appendLine(String, String)
    //#input(bool appendLine(String, String)): " "._tainted
    //#input(bool appendLine(String, String)): "' is invalid. For more information: http:..java.sun.com.javase.6.docs.api.java.text.SimpleDateFormat.html"._tainted
    //#input(bool appendLine(String, String)): "Dateformat String '"._tainted
    //#input(bool appendLine(String, String)): com.dmdirc.logger.ErrorLevel.LOW
    //#input(bool appendLine(String, String)): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#input(bool appendLine(String, String)): com/dmdirc/addons/logging/LoggingPlugin$OpenFile.__Descendant_Table[others]
    //#input(bool appendLine(String, String)): filename
    //#input(bool appendLine(String, String)): line
    //#input(bool appendLine(String, String)): line._tainted
    //#input(bool appendLine(String, String)): this
    //#input(bool appendLine(String, String)): this.openFiles
    //#output(bool appendLine(String, String)): return_value
    //#pre[5] (bool appendLine(String, String)): (soft) this.openFiles != null
    //#presumption(bool appendLine(String, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@544 != null
    //#presumption(bool appendLine(String, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@546 != null
    //#presumption(bool appendLine(String, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@561 != null
    //#presumption(bool appendLine(String, String)): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#presumption(bool appendLine(String, String)): java.text.DateFormat:format(...)@549 != null
    //#presumption(bool appendLine(String, String)): java.text.DateFormat:format(...)@553 != null
    //#presumption(bool appendLine(String, String)): java.util.Map:get(...).__Tag@570 == com/dmdirc/addons/logging/LoggingPlugin$OpenFile
    //#presumption(bool appendLine(String, String)): java.util.Map:get(...)@570 != null
    //#presumption(bool appendLine(String, String)): of.writer@570 != null
    //#post(bool appendLine(String, String)): init'ed(return_value)
    //#unanalyzed(bool appendLine(String, String)): Effects-of-calling:java.lang.System:currentTimeMillis
    //#test_vector(bool appendLine(String, String)): com.dmdirc.config.ConfigManager:getOptionBool(...)@544: {0}, {1}
    //#test_vector(bool appendLine(String, String)): com.dmdirc.config.ConfigManager:getOptionBool(...)@561: {0}, {1}
    //#test_vector(bool appendLine(String, String)): java.util.Map:containsKey(...)@569: {0}, {1}
		
		if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "general.addtime")) {
    //#LoggingPlugin.java:544: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:544: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:544: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
			String dateString;
			final String dateFormatString = IdentityManager.getGlobalConfig().getOption(getDomain(), "general.timestamp");
    //#LoggingPlugin.java:546: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:546: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:546: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: String com.dmdirc.config.ConfigManager:getOption(String, String)
			try {
				final DateFormat dateFormat = new SimpleDateFormat(dateFormatString);
				dateString = dateFormat.format(new Date()).trim();
			} catch (IllegalArgumentException iae) {
				// Default to known good format
				final DateFormat dateFormat = new SimpleDateFormat("[dd/MM/yyyy HH:mm:ss]");
				dateString = dateFormat.format(new Date()).trim();
				
				Logger.userError(ErrorLevel.LOW, "Dateformat String '"+dateFormatString+"' is invalid. For more information: http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html");
    //#LoggingPlugin.java:555: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			}
			finalLine.append(dateString);
			finalLine.append(" ");
		}
		
		if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "general.stripcodes")) {
    //#LoggingPlugin.java:561: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:561: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:561: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
			finalLine.append(Styliser.stipControlCodes(line));
    //#LoggingPlugin.java:562: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.ui.messages.Styliser:stipControlCodes(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    unanalyzed callee: String com.dmdirc.ui.messages.Styliser:stipControlCodes(String)
		} else {
			finalLine.append(line);
		}
		//System.out.println("[Adding] "+filename+" => "+finalLine);
		BufferedWriter out = null;
    //#LoggingPlugin.java:567: Warning: unused assignment
    //#    Unused assignment into out
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool appendLine(String, String)
    //#    Attribs:  Uncertain
		try {
			if (openFiles.containsKey(filename)) {
				OpenFile of = openFiles.get(filename);
				of.lastUsedTime = System.currentTimeMillis();
				out = of.writer;
			} else {
				out = new BufferedWriter(new FileWriter(filename, true));
				openFiles.put(filename, new OpenFile(out));
			}
			out.write(finalLine.toString());
			out.newLine();
			out.flush();
			return true;
		} catch (IOException e) {
			/*
			 * Do Nothing
			 *
			 * Makes no sense to keep adding errors to the logger when we can't
			 * write to the file, as chances are it will happen on every incomming
			 * line.
			 */
		}
		return false;
    //#LoggingPlugin.java:590: end of method: bool com.dmdirc.addons.logging.LoggingPlugin.appendLine(String, String)
	}

	/**
	 * Get the name of the log file for a specific object.
	 *
	 * @param obj Object to get name for
	 * @return the name of the log file to use for this object.
	 */
	protected String getLogFile(final Object obj) {
		final StringBuffer directory = new StringBuffer();
    //#LoggingPlugin.java:600: method: String com.dmdirc.addons.logging.LoggingPlugin.getLogFile(Object)
    //#input(String getLogFile(Object)): ""._tainted
    //#input(String getLogFile(Object)): ".log"._tainted
    //#input(String getLogFile(Object)): "null.log"._tainted
    //#input(String getLogFile(Object)): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(String getLogFile(Object)): __Descendant_Table[others]
    //#input(String getLogFile(Object)): __Dispatch_Table.addNetworkDir(Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/String;)V
    //#input(String getLogFile(Object)): com.dmdirc.logger.ErrorLevel.LOW
    //#input(String getLogFile(Object)): java.io.File.separatorChar
    //#input(String getLogFile(Object)): obj
    //#input(String getLogFile(Object)): obj._tainted
    //#input(String getLogFile(Object)): this
    //#input(String getLogFile(Object)): this.__Tag
    //#output(String getLogFile(Object)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String getLogFile(Object)): return_value
    //#new obj(String getLogFile(Object)): java.lang.StringBuilder:toString(...)
    //#pre[4] (String getLogFile(Object)): (soft) this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#presumption(String getLogFile(Object)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@604 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@630 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@631 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@643 != null
    //#presumption(String getLogFile(Object)): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.ChannelInfo:getName(...)@616 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.ChannelInfo:getName(...)@617 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.ChannelInfo:getParser(...)@614 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.ClientInfo:getNickname(...)@623 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.ClientInfo:getNickname(...)@624 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.ClientInfo:getParser(...)@621 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.IRCParser:getNetworkName(...)@614 != null
    //#presumption(String getLogFile(Object)): com.dmdirc.parser.irc.IRCParser:getNetworkName(...)@621 != null
    //#presumption(String getLogFile(Object)): init'ed(java.io.File.separatorChar)
    //#presumption(String getLogFile(Object)): java.lang.StringBuffer:length(...)@605 >= -2_147_483_647
    //#presumption(String getLogFile(Object)): java.lang.StringBuffer:length(...)@634 >= -2_147_483_647
    //#post(String getLogFile(Object)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(String getLogFile(Object)): return_value == &java.lang.StringBuilder:toString(...)
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:com.dmdirc.addons.logging.LoggingPlugin:getDomain
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.System:getProperty
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.io.File
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.String:replaceAll
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.StringBuffer:insert
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.security.MessageDigest:getInstance
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.String:getBytes
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.security.MessageDigest:update
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.security.MessageDigest:digest
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.math.BigInteger
    //#unanalyzed(String getLogFile(Object)): Effects-of-calling:java.math.BigInteger:toString
    //#test_vector(String getLogFile(Object)): obj: Inverse{null}, Addr_Set{null}
    //#test_vector(String getLogFile(Object)): com.dmdirc.config.ConfigManager:getOptionBool(...)@630: {0}, {1}
    //#test_vector(String getLogFile(Object)): com.dmdirc.config.ConfigManager:getOptionBool(...)@643: {0}, {1}
    //#test_vector(String getLogFile(Object)): com.dmdirc.parser.irc.ChannelInfo:getParser(...)@613: Addr_Set{null}, Inverse{null}
    //#test_vector(String getLogFile(Object)): com.dmdirc.parser.irc.ChannelInfo:instanceof(...)@611: {0}, {1}
    //#test_vector(String getLogFile(Object)): com.dmdirc.parser.irc.ClientInfo:getParser(...)@620: Addr_Set{null}, Inverse{null}
    //#test_vector(String getLogFile(Object)): com.dmdirc.parser.irc.ClientInfo:instanceof(...)@618: {0}, {1}
    //#test_vector(String getLogFile(Object)): java.io.File:exists(...)@638: {1}, {0}
    //#test_vector(String getLogFile(Object)): java.io.File:mkdirs(...)@638: {1}, {0}
		final StringBuffer file = new StringBuffer();
		String md5String = "";
	
		directory.append(IdentityManager.getGlobalConfig().getOption(getDomain(), "general.directory"));
    //#LoggingPlugin.java:604: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:604: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:604: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.config.ConfigManager:getOption(String, String)
		if (directory.charAt(directory.length()-1) != File.separatorChar) {
			directory.append(File.separatorChar);
		}
		
		if (obj == null) {
			file.append("null.log");
		} else if (obj instanceof ChannelInfo) {
			final ChannelInfo channel = (ChannelInfo) obj;
			if (channel.getParser() != null) {
    //#LoggingPlugin.java:613: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.parser.irc.ChannelInfo:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: IRCParser com.dmdirc.parser.irc.ChannelInfo:getParser()
				addNetworkDir(directory, file, channel.getParser().getNetworkName());
    //#LoggingPlugin.java:614: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.parser.irc.ChannelInfo:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: IRCParser com.dmdirc.parser.irc.ChannelInfo:getParser()
    //#LoggingPlugin.java:614: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.IRCParser:getNetworkName()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.IRCParser:getNetworkName()
			}
			file.append(sanitise(channel.getName().toLowerCase()));
    //#LoggingPlugin.java:616: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelInfo:getName()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelInfo:getName()
			md5String = channel.getName();
    //#LoggingPlugin.java:617: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelInfo:getName()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelInfo:getName()
		} else if (obj instanceof ClientInfo) {
			final ClientInfo client = (ClientInfo) obj;
			if (client.getParser() != null) {
    //#LoggingPlugin.java:620: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.parser.irc.ClientInfo:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: IRCParser com.dmdirc.parser.irc.ClientInfo:getParser()
				addNetworkDir(directory, file, client.getParser().getNetworkName());
    //#LoggingPlugin.java:621: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.parser.irc.ClientInfo:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: IRCParser com.dmdirc.parser.irc.ClientInfo:getParser()
    //#LoggingPlugin.java:621: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.IRCParser:getNetworkName()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.IRCParser:getNetworkName()
			}
			file.append(sanitise(client.getNickname().toLowerCase()));
    //#LoggingPlugin.java:623: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:getNickname()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:getNickname()
			md5String = client.getNickname();
    //#LoggingPlugin.java:624: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:getNickname()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:getNickname()
		} else {
			file.append(sanitise(obj.toString().toLowerCase()));
			md5String = obj.toString();
		}
		
		if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "advanced.usedate")) {
    //#LoggingPlugin.java:630: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:630: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:630: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
			final String dateFormat = IdentityManager.getGlobalConfig().getOption(getDomain(), "advanced.usedateformat");
    //#LoggingPlugin.java:631: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:631: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:631: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.config.ConfigManager:getOption(String, String)
			final String dateDir = (new SimpleDateFormat(dateFormat)).format(new Date());
			directory.append(dateDir);
			if (directory.charAt(directory.length()-1) != File.separatorChar) {
				directory.append(File.separatorChar);
			}
			
			if (!new File(directory.toString()).exists() && !(new File(directory.toString())).mkdirs()) {
				Logger.userError(ErrorLevel.LOW, "Unable to create date dirs");
    //#LoggingPlugin.java:639: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			}
		}
		
		if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "advanced.filenamehash")) {
    //#LoggingPlugin.java:643: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:643: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:643: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getLogFile(Object)
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
			file.append('.');
			file.append(md5(md5String));
		}
		file.append(".log");
		
		return directory.toString() + file.toString();
    //#LoggingPlugin.java:649: end of method: String com.dmdirc.addons.logging.LoggingPlugin.getLogFile(Object)
	}
	
	/**
	 * This function adds the networkName to the log file.
	 * It first tries to create a directory for each network, if that fails
	 * it will prepend the networkName to the filename instead.
	 *
	 * @param directory Current directory name
	 * @param file Current file name
	 * @param networkName Name of network
	 */
	protected void addNetworkDir(final StringBuffer directory, final StringBuffer file, final String networkName) {
		if (!IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "general.networkfolders")) {
    //#LoggingPlugin.java:662: method: void com.dmdirc.addons.logging.LoggingPlugin.addNetworkDir(StringBuffer, StringBuffer, String)
    //#LoggingPlugin.java:662: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void addNetworkDir(StringBuffer, StringBuffer, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:662: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void addNetworkDir(StringBuffer, StringBuffer, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:662: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void addNetworkDir(StringBuffer, StringBuffer, String)
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#input(void addNetworkDir(StringBuffer, StringBuffer, String)): com.dmdirc.logger.ErrorLevel.LOW
    //#input(void addNetworkDir(StringBuffer, StringBuffer, String)): directory
    //#input(void addNetworkDir(StringBuffer, StringBuffer, String)): directory._tainted
    //#input(void addNetworkDir(StringBuffer, StringBuffer, String)): file
    //#input(void addNetworkDir(StringBuffer, StringBuffer, String)): networkName
    //#input(void addNetworkDir(StringBuffer, StringBuffer, String)): this
    //#output(void addNetworkDir(StringBuffer, StringBuffer, String)): directory._tainted
    //#pre[1] (void addNetworkDir(StringBuffer, StringBuffer, String)): (soft) directory != null
    //#pre[2] (void addNetworkDir(StringBuffer, StringBuffer, String)): (soft) file != null
    //#pre[3] (void addNetworkDir(StringBuffer, StringBuffer, String)): (soft) networkName != null
    //#presumption(void addNetworkDir(StringBuffer, StringBuffer, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@662 != null
    //#presumption(void addNetworkDir(StringBuffer, StringBuffer, String)): init'ed(com.dmdirc.logger.ErrorLevel.LOW)
    //#post(void addNetworkDir(StringBuffer, StringBuffer, String)): init'ed(directory._tainted)
    //#unanalyzed(void addNetworkDir(StringBuffer, StringBuffer, String)): Effects-of-calling:java.lang.String:replaceAll
    //#test_vector(void addNetworkDir(StringBuffer, StringBuffer, String)): com.dmdirc.config.ConfigManager:getOptionBool(...)@662: {1}, {0}
    //#test_vector(void addNetworkDir(StringBuffer, StringBuffer, String)): java.io.File:exists(...)@672: {0}, {1}
    //#test_vector(void addNetworkDir(StringBuffer, StringBuffer, String)): java.io.File:exists(...)@676: {1}, {0}
    //#test_vector(void addNetworkDir(StringBuffer, StringBuffer, String)): java.io.File:isDirectory(...)@672: {1}, {0}
    //#test_vector(void addNetworkDir(StringBuffer, StringBuffer, String)): java.io.File:mkdirs(...)@676: {1}, {0}
			return;
		}
	
		final String network = sanitise(networkName.toLowerCase());
		
		boolean prependNetwork = false;
		
		// Check dir exists
		final File dir = new File(directory.toString()+network+System.getProperty("file.separator"));
		if (dir.exists() && !dir.isDirectory()) {
			Logger.userError(ErrorLevel.LOW, "Unable to create networkfolders dir (file exists instead)");
    //#LoggingPlugin.java:673: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void addNetworkDir(StringBuffer, StringBuffer, String)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			// Prepend network name to file instead.
			prependNetwork = true;
		} else if (!dir.exists() && !dir.mkdirs()) {
			Logger.userError(ErrorLevel.LOW, "Unable to create networkfolders dir");
    //#LoggingPlugin.java:677: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: void addNetworkDir(StringBuffer, StringBuffer, String)
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
			prependNetwork = true;
		}
		
		if (prependNetwork) {
			file.insert(0, " -- ");
			file.insert(0, network);
		} else {
			directory.append(network);
			directory.append(System.getProperty("file.separator"));
		}
	}
    //#LoggingPlugin.java:688: end of method: void com.dmdirc.addons.logging.LoggingPlugin.addNetworkDir(StringBuffer, StringBuffer, String)

	/**
	 * Sanitise a string to be used as a filename.
	 *
	 * @param name String to sanitise
	 * @return Sanitised version of name that can be used as a filename.
	 */
	protected static String sanitise(final String name) {
		// Replace illegal chars with
		return name.replaceAll("[^\\w\\.\\s\\-\\#\\&\\_]", "_");
    //#LoggingPlugin.java:698: method: String com.dmdirc.addons.logging.LoggingPlugin.sanitise(String)
    //#input(String sanitise(String)): name
    //#output(String sanitise(String)): return_value
    //#pre[1] (String sanitise(String)): name != null
    //#post(String sanitise(String)): return_value != null
    //#LoggingPlugin.java:698: end of method: String com.dmdirc.addons.logging.LoggingPlugin.sanitise(String)
	}

	/**
	 * Get the md5 hash of a string.
	 *
	 * @param string String to hash
	 * @return md5 hash of given string
	 */
	protected static String md5(final String string) {
		try {
			final MessageDigest m = MessageDigest.getInstance("MD5");
    //#LoggingPlugin.java:709: method: String com.dmdirc.addons.logging.LoggingPlugin.md5(String)
    //#input(String md5(String)): string
    //#output(String md5(String)): return_value
    //#pre[1] (String md5(String)): (soft) string != null
    //#presumption(String md5(String)): java.security.MessageDigest:getInstance(...)@709 != null
    //#post(String md5(String)): return_value != null
			m.update(string.getBytes(), 0, string.length());
			return new BigInteger(1, m.digest()).toString(16);
		} catch (NoSuchAlgorithmException e) {
			return "";
    //#LoggingPlugin.java:713: end of method: String com.dmdirc.addons.logging.LoggingPlugin.md5(String)
		}
	}
	
	/**
	 * Get name to display for client.
	 *
	 * @param client The client to get the display name for
	 * @return name to display
	 */
	protected String getDisplayName(final ClientInfo client) {
		return getDisplayName(client, "");
    //#LoggingPlugin.java:724: method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ClientInfo)
    //#input(String getDisplayName(ClientInfo)): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(String getDisplayName(ClientInfo)): __Descendant_Table[others]
    //#input(String getDisplayName(ClientInfo)): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#input(String getDisplayName(ClientInfo)): client
    //#input(String getDisplayName(ClientInfo)): this
    //#input(String getDisplayName(ClientInfo)): this.__Tag
    //#output(String getDisplayName(ClientInfo)): return_value
    //#pre[3] (String getDisplayName(ClientInfo)): this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#post(String getDisplayName(ClientInfo)): init'ed(return_value)
    //#unanalyzed(String getDisplayName(ClientInfo)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(String getDisplayName(ClientInfo)): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getNickname
    //#LoggingPlugin.java:724: end of method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ClientInfo)
	}

	/**
	 * Get name to display for client.
	 *
	 * @param client The client to get the display name for
	 * @param overrideNick Nickname to display instead of real nickname
	 * @return name to display
	 */
	protected String getDisplayName(final ClientInfo client, final String overrideNick) {
		if (overrideNick.isEmpty()) {
    //#LoggingPlugin.java:735: method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ClientInfo, String)
    //#input(String getDisplayName(ClientInfo, String)): client
    //#input(String getDisplayName(ClientInfo, String)): overrideNick
    //#output(String getDisplayName(ClientInfo, String)): return_value
    //#pre[2] (String getDisplayName(ClientInfo, String)): overrideNick != null
    //#post(String getDisplayName(ClientInfo, String)): init'ed(return_value)
    //#test_vector(String getDisplayName(ClientInfo, String)): java.lang.String:isEmpty(...)@735: {0}, {1}
			return (client == null) ? "Unknown Client" : client.getNickname() ;
    //#LoggingPlugin.java:736: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:getNickname()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getDisplayName(ClientInfo, String)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:getNickname()
		} else {
			return overrideNick;
    //#LoggingPlugin.java:738: end of method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ClientInfo, String)
		}
	}

	/**
	 * Get name to display for channelClient (Taking into account the channelmodeprefix setting).
	 *
	 * @param channelClient The client to get the display name for
	 * @return name to display
	 */
	protected String getDisplayName(final ChannelClientInfo channelClient) {
		return getDisplayName(channelClient, "");
    //#LoggingPlugin.java:749: method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ChannelClientInfo)
    //#input(String getDisplayName(ChannelClientInfo)): ""._tainted
    //#input(String getDisplayName(ChannelClientInfo)): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(String getDisplayName(ChannelClientInfo)): __Descendant_Table[others]
    //#input(String getDisplayName(ChannelClientInfo)): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#input(String getDisplayName(ChannelClientInfo)): channelClient
    //#input(String getDisplayName(ChannelClientInfo)): channelClient._tainted
    //#input(String getDisplayName(ChannelClientInfo)): this
    //#input(String getDisplayName(ChannelClientInfo)): this.__Tag
    //#output(String getDisplayName(ChannelClientInfo)): com.dmdirc.parser.irc.ChannelClientInfo:toString(...)._tainted
    //#output(String getDisplayName(ChannelClientInfo)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String getDisplayName(ChannelClientInfo)): return_value
    //#new obj(String getDisplayName(ChannelClientInfo)): com.dmdirc.parser.irc.ChannelClientInfo:toString(...)
    //#new obj(String getDisplayName(ChannelClientInfo)): java.lang.StringBuilder:toString(...)
    //#pre[4] (String getDisplayName(ChannelClientInfo)): this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#post(String getDisplayName(ChannelClientInfo)): init'ed(com.dmdirc.parser.irc.ChannelClientInfo:toString(...)._tainted)
    //#post(String getDisplayName(ChannelClientInfo)): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String getDisplayName(ChannelClientInfo)): init'ed(return_value)
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:com.dmdirc.addons.logging.LoggingPlugin:getDomain
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:toString
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:getNickname
    //#unanalyzed(String getDisplayName(ChannelClientInfo)): Effects-of-calling:com.dmdirc.parser.irc.ChannelClientInfo:getImportantModePrefix
    //#LoggingPlugin.java:749: end of method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ChannelClientInfo)
	}

	/**
	 * Get name to display for channelClient (Taking into account the channelmodeprefix setting).
	 *
	 * @param channelClient The client to get the display name for
	 * @param overrideNick Nickname to display instead of real nickname
	 * @return name to display
	 */
	protected String getDisplayName(final ChannelClientInfo channelClient, final String overrideNick) {
		final boolean addModePrefix = (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "general.channelmodeprefix"));
    //#LoggingPlugin.java:760: method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ChannelClientInfo, String)
    //#LoggingPlugin.java:760: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getDisplayName(ChannelClientInfo, String)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:760: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getDisplayName(ChannelClientInfo, String)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:760: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getDisplayName(ChannelClientInfo, String)
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#input(String getDisplayName(ChannelClientInfo, String)): channelClient
    //#input(String getDisplayName(ChannelClientInfo, String)): channelClient._tainted
    //#input(String getDisplayName(ChannelClientInfo, String)): overrideNick
    //#input(String getDisplayName(ChannelClientInfo, String)): overrideNick._tainted
    //#input(String getDisplayName(ChannelClientInfo, String)): this
    //#output(String getDisplayName(ChannelClientInfo, String)): com.dmdirc.parser.irc.ChannelClientInfo:toString(...)._tainted
    //#output(String getDisplayName(ChannelClientInfo, String)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String getDisplayName(ChannelClientInfo, String)): return_value
    //#new obj(String getDisplayName(ChannelClientInfo, String)): com.dmdirc.parser.irc.ChannelClientInfo:toString(...)
    //#new obj(String getDisplayName(ChannelClientInfo, String)): java.lang.StringBuilder:toString(...)
    //#pre[3] (String getDisplayName(ChannelClientInfo, String)): overrideNick != null
    //#presumption(String getDisplayName(ChannelClientInfo, String)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@760 != null
    //#post(String getDisplayName(ChannelClientInfo, String)): init'ed(com.dmdirc.parser.irc.ChannelClientInfo:toString(...)._tainted)
    //#post(String getDisplayName(ChannelClientInfo, String)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(String getDisplayName(ChannelClientInfo, String)): init'ed(return_value)
    //#test_vector(String getDisplayName(ChannelClientInfo, String)): channelClient: Inverse{null}, Addr_Set{null}
    //#test_vector(String getDisplayName(ChannelClientInfo, String)): com.dmdirc.config.ConfigManager:getOptionBool(...)@760: {1}, {0}
    //#test_vector(String getDisplayName(ChannelClientInfo, String)): java.lang.String:isEmpty(...)@764: {0}, {1}
		
		if (channelClient == null) {
			return (overrideNick.isEmpty()) ? "Unknown Client" : overrideNick;
		} else if (overrideNick.isEmpty()) {
			return (addModePrefix) ? channelClient.toString() : channelClient.getNickname();
    //#LoggingPlugin.java:765: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelClientInfo:getNickname()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getDisplayName(ChannelClientInfo, String)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelClientInfo:getNickname()
    //#LoggingPlugin.java:765: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelClientInfo:toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getDisplayName(ChannelClientInfo, String)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelClientInfo:toString()
		} else {
			return (addModePrefix) ? channelClient.getImportantModePrefix() + overrideNick : overrideNick;
    //#LoggingPlugin.java:767: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ChannelClientInfo:getImportantModePrefix()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: String getDisplayName(ChannelClientInfo, String)
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ChannelClientInfo:getImportantModePrefix()
    //#LoggingPlugin.java:767: end of method: String com.dmdirc.addons.logging.LoggingPlugin.getDisplayName(ChannelClientInfo, String)
		}
	}

	/**
	 * Shows the history window for the specified target, if available.
	 *
	 * @param target The window whose history we're trying to open
	 * @return True if the history is available, false otherwise
	 */
	protected boolean showHistory(final InputWindow target) {
		Object component;

		if (target.getContainer() instanceof Channel) {
    //#LoggingPlugin.java:780: method: bool com.dmdirc.addons.logging.LoggingPlugin.showHistory(InputWindow)
    //#LoggingPlugin.java:780: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#input(bool showHistory(InputWindow)): ""._tainted
    //#input(bool showHistory(InputWindow)): ".log"._tainted
    //#input(bool showHistory(InputWindow)): "null.log"._tainted
    //#input(bool showHistory(InputWindow)): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#input(bool showHistory(InputWindow)): __Descendant_Table[others]
    //#input(bool showHistory(InputWindow)): __Dispatch_Table.addNetworkDir(Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/String;)V
    //#input(bool showHistory(InputWindow)): __Dispatch_Table.getLogFile(Ljava/lang/Object;)Ljava/lang/String;
    //#input(bool showHistory(InputWindow)): com.dmdirc.logger.ErrorLevel.LOW
    //#input(bool showHistory(InputWindow)): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[com/dmdirc/addons/logging/ReverseFileReader]
    //#input(bool showHistory(InputWindow)): com/dmdirc/addons/logging/ReverseFileReader.__Descendant_Table[others]
    //#input(bool showHistory(InputWindow)): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getLinesAsString(I)Ljava/lang/String;
    //#input(bool showHistory(InputWindow)): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.getNextLine()Ljava/lang/String;
    //#input(bool showHistory(InputWindow)): com/dmdirc/addons/logging/ReverseFileReader.__Dispatch_Table.reset()V
    //#input(bool showHistory(InputWindow)): java.io.File.separatorChar
    //#input(bool showHistory(InputWindow)): target
    //#input(bool showHistory(InputWindow)): this
    //#input(bool showHistory(InputWindow)): this.__Tag
    //#output(bool showHistory(InputWindow)): return_value
    //#pre[1] (bool showHistory(InputWindow)): target != null
    //#pre[3] (bool showHistory(InputWindow)): (soft) this.__Tag == com/dmdirc/addons/logging/LoggingPlugin
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.Query:getServer(...)@783 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.Server:getParser(...)@783 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.WritableFrameContainer:getServer(...)@789 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@814 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.ui.interfaces.InputWindow:getContainer(...)@781 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.ui.interfaces.InputWindow:getContainer(...)@783 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.ui.interfaces.InputWindow:getContainer(...)@784 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.ui.interfaces.InputWindow:getContainer(...)@786 != null
    //#presumption(bool showHistory(InputWindow)): com.dmdirc.ui.interfaces.InputWindow:getContainer(...)@789 != null
    //#post(bool showHistory(InputWindow)): init'ed(return_value)
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.text.SimpleDateFormat
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.addons.logging.LoggingPlugin:getDomain
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.System:getProperty
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.config.ConfigManager:getOption
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.File
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.String:replaceAll
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.String:toLowerCase
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuffer:insert
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getNickname
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.security.MessageDigest:getInstance
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.String:getBytes
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.security.MessageDigest:update
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.security.MessageDigest:digest
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.math.BigInteger
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.math.BigInteger:toString
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.util.Date
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.RandomAccessFile:seek
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.RandomAccessFile:length
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.RandomAccessFile
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.ui.interfaces.Window:getConfigManager
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.FrameContainer
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.Main:getUI
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.ui.interfaces.UIController:getWindow
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.ui.WindowManager:addWindow
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.ui.interfaces.Window:setTitle
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.ui.interfaces.Window:open
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionInt
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.Math:min
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.RandomAccessFile:getFilePointer
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.io.RandomAccessFile:read
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.Byte:valueOf
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.util.ArrayList:add
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.util.ArrayList:size
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.util.ArrayList:get
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.Byte:byteValue
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.String
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuilder:insert
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuilder:charAt
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuilder:deleteCharAt
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.ui.interfaces.Window:addLine
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuffer:length
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.StringBuffer:charAt
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:instanceof
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getParser
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getNetworkName
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.parser.irc.ChannelInfo:getName
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:instanceof
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getParser
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.lang.Object:toString
    //#unanalyzed(bool showHistory(InputWindow)): Effects-of-calling:java.text.SimpleDateFormat:format
    //#test_vector(bool showHistory(InputWindow)): com.dmdirc.parser.irc.IRCParser:getClientInfo(...)@784: Inverse{null}, Addr_Set{null}
    //#test_vector(bool showHistory(InputWindow)): java.io.File:exists(...)@797: {1}, {0}
			component = ((Channel) target.getContainer()).getChannelInfo();
    //#LoggingPlugin.java:781: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#LoggingPlugin.java:781: Warning: method not available - call not analyzed
    //#    call on ChannelInfo com.dmdirc.Channel:getChannelInfo()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: ChannelInfo com.dmdirc.Channel:getChannelInfo()
		} else if (target.getContainer() instanceof Query) {
    //#LoggingPlugin.java:782: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
			final IRCParser parser = ((Query) target.getContainer()).getServer().getParser();
    //#LoggingPlugin.java:783: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#LoggingPlugin.java:783: Warning: method not available - call not analyzed
    //#    call on Server com.dmdirc.Query:getServer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: Server com.dmdirc.Query:getServer()
    //#LoggingPlugin.java:783: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
			component = parser.getClientInfo(((Query) target.getContainer()).getHost());
    //#LoggingPlugin.java:784: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#LoggingPlugin.java:784: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.Query:getHost()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: String com.dmdirc.Query:getHost()
    //#LoggingPlugin.java:784: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.IRCParser:getClientInfo(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.IRCParser:getClientInfo(String)
			if (component == null) {
				component = new ClientInfo(parser, ((Query) target.getContainer()).getHost()).setFake(true);
    //#LoggingPlugin.java:786: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#LoggingPlugin.java:786: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.Query:getHost()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: String com.dmdirc.Query:getHost()
    //#LoggingPlugin.java:786: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.parser.irc.ClientInfo(IRCParser, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: void com.dmdirc.parser.irc.ClientInfo(IRCParser, String)
    //#LoggingPlugin.java:786: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.ClientInfo:setFake(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.ClientInfo:setFake(bool)
			}
		} else if (target.getContainer() instanceof Server) {
    //#LoggingPlugin.java:788: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
			component = target.getContainer().getServer().getParser();
    //#LoggingPlugin.java:789: Warning: method not available - call not analyzed
    //#    call on WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: WritableFrameContainer com.dmdirc.ui.interfaces.InputWindow:getContainer()
    //#LoggingPlugin.java:789: Warning: method not available - call not analyzed
    //#    call on Server com.dmdirc.WritableFrameContainer:getServer()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: Server com.dmdirc.WritableFrameContainer:getServer()
    //#LoggingPlugin.java:789: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
		} else {
			// Unknown component
			return false;
		}

		final String log = getLogFile(component);
    //#LoggingPlugin.java:795: Warning: unused assignment in callee
    //#    Unused assignment to (java.lang.StringBuilder:toString(...)._tainted) in getLogFile
    //#    severity: LOW
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)

		if (!new File(log).exists()) {
			// File doesn't exist
			return false;
		}

		ReverseFileReader reader;

		try {
			reader = new ReverseFileReader(log);
		} catch (FileNotFoundException ex) {
			return false;
		} catch (IOException ex) {
			return false;
		} catch (SecurityException ex) {
			return false;
		}

		new HistoryWindow("History", reader, target,
    //#LoggingPlugin.java:814: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#LoggingPlugin.java:814: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: String com.dmdirc.addons.logging.LoggingPlugin:getDomain()
    //#LoggingPlugin.java:814: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.config.ConfigManager:getOptionInt(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.logging.LoggingPlugin
    //#    method: bool showHistory(InputWindow)
    //#    unanalyzed callee: int com.dmdirc.config.ConfigManager:getOptionInt(String, String)
                IdentityManager.getGlobalConfig().getOptionInt(getDomain(), "history.lines"));

		return true;
    //#LoggingPlugin.java:817: end of method: bool com.dmdirc.addons.logging.LoggingPlugin.showHistory(InputWindow)
	}
}
    //#LoggingPlugin.java:: end of class: com.dmdirc.addons.logging.LoggingPlugin$2
    //#output(com.dmdirc.addons.logging.LoggingPlugin$OpenFile__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile]
    //#post(com.dmdirc.addons.logging.LoggingPlugin$OpenFile__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$OpenFile] == &__Dispatch_Table
    //#LoggingPlugin.java:: end of method: com.dmdirc.addons.logging.LoggingPlugin$OpenFile.com.dmdirc.addons.logging.LoggingPlugin$OpenFile__static_init
    //#LoggingPlugin.java:: end of class: com.dmdirc.addons.logging.LoggingPlugin$OpenFile
    //#output(com.dmdirc.addons.logging.LoggingPlugin$1__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$1]
    //#output(com.dmdirc.addons.logging.LoggingPlugin$1__static_init): __Dispatch_Table.run()V
    //#post(com.dmdirc.addons.logging.LoggingPlugin$1__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin$1] == &__Dispatch_Table
    //#post(com.dmdirc.addons.logging.LoggingPlugin$1__static_init): __Dispatch_Table.run()V == &run
    //#LoggingPlugin.java:: end of method: com.dmdirc.addons.logging.LoggingPlugin$1.com.dmdirc.addons.logging.LoggingPlugin$1__static_init
    //#LoggingPlugin.java:: end of class: com.dmdirc.addons.logging.LoggingPlugin$1
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin]
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.addNetworkDir(Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/String;)V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;)Z
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Z
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.domainUpdated()V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;)Ljava/lang/String;
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;)Ljava/lang/String;
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;Ljava/lang/String;)Ljava/lang/String;
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getLogFile(Ljava/lang/Object;)Ljava/lang/String;
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.handleChannelEvent(Lcom/dmdirc/actions/CoreActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.handleQueryEvent(Lcom/dmdirc/actions/CoreActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.onLoad()V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.onUnload()V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.processEvent(Lcom/dmdirc/actions/interfaces/ActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.showBackBuffer(Lcom/dmdirc/ui/interfaces/Window;Ljava/lang/String;)V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.showConfig(Lcom/dmdirc/config/prefs/PreferencesManager;)V
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.showHistory(Lcom/dmdirc/ui/interfaces/InputWindow;)Z
    //#output(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.timerTask()V
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Descendant_Table[com/dmdirc/addons/logging/LoggingPlugin] == &__Dispatch_Table
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.addNetworkDir(Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/String;)V == &addNetworkDir
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;)Z == &appendLine
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.appendLine(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Z == &appendLine
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.domainUpdated()V == &domainUpdated
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;)Ljava/lang/String; == &getDisplayName
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ChannelClientInfo;Ljava/lang/String;)Ljava/lang/String; == &getDisplayName
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;)Ljava/lang/String; == &getDisplayName
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getDisplayName(Lcom/dmdirc/parser/irc/ClientInfo;Ljava/lang/String;)Ljava/lang/String; == &getDisplayName
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.getLogFile(Ljava/lang/Object;)Ljava/lang/String; == &getLogFile
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.handleChannelEvent(Lcom/dmdirc/actions/CoreActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V == &handleChannelEvent
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.handleQueryEvent(Lcom/dmdirc/actions/CoreActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V == &handleQueryEvent
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.onLoad()V == &onLoad
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.onUnload()V == &onUnload
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.processEvent(Lcom/dmdirc/actions/interfaces/ActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V == &processEvent
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.showBackBuffer(Lcom/dmdirc/ui/interfaces/Window;Ljava/lang/String;)V == &showBackBuffer
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.showConfig(Lcom/dmdirc/config/prefs/PreferencesManager;)V == &showConfig
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.showHistory(Lcom/dmdirc/ui/interfaces/InputWindow;)Z == &showHistory
    //#post(com.dmdirc.addons.logging.LoggingPlugin__static_init): __Dispatch_Table.timerTask()V == &timerTask
    //#LoggingPlugin.java:: end of method: com.dmdirc.addons.logging.LoggingPlugin.com.dmdirc.addons.logging.LoggingPlugin__static_init
    //#LoggingPlugin.java:: end of class: com.dmdirc.addons.logging.LoggingPlugin
