//# 2 errors, 854 messages
//#
/*
    //#ConfigManager.java:1:1: class: com.dmdirc.config.ConfigManager$1
    //#ConfigManager.java:1:1: class: com.dmdirc.config.ConfigManager
 * 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.config;

import com.dmdirc.interfaces.ConfigChangeListener;
import com.dmdirc.util.MapList;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

/**
 * The config manager manages the various config sources for each entity.
 *
 * @author chris
 */
public class ConfigManager extends ConfigSource implements Serializable,
        ConfigChangeListener {

    /**
     * A version number for this class. It should be changed whenever the class
     * structure is changed (or anything else that would prevent serialized
     * objects being unserialized with the new class).
     */
    private static final long serialVersionUID = 4;

    /** Temporary map for lookup stats. */
    private static final Map<String, Integer> stats = new TreeMap<String, Integer>();
    //#ConfigManager.java:54: method: com.dmdirc.config.ConfigManager.com.dmdirc.config.ConfigManager__static_init
    //#output(com.dmdirc.config.ConfigManager__static_init): __Descendant_Table[com/dmdirc/config/ConfigManager]
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.addChangeListener(Ljava/lang/String;Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.addChangeListener(Ljava/lang/String;Ljava/lang/String;Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.addListener(Ljava/lang/String;Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.checkIdentity(Lcom/dmdirc/config/Identity;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.configChanged(Ljava/lang/String;Ljava/lang/String;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getDomains()Ljava/util/Set;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOption(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionBool(Ljava/lang/String;Ljava/lang/String;)Z
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionChar(Ljava/lang/String;Ljava/lang/String;)C
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionColour(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Ljava/awt/Color;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionInt(Ljava/lang/String;Ljava/lang/String;)I
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionList(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionList(Ljava/lang/String;Ljava/lang/String;Z)Ljava/util/List;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptions(Ljava/lang/String;)Ljava/util/Map;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getScope(Ljava/lang/String;Ljava/lang/String;)Lcom/dmdirc/config/Identity;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getSources()Ljava/util/List;
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionChar(Ljava/lang/String;Ljava/lang/String;)Z
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionColour(Ljava/lang/String;Ljava/lang/String;)Z
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionInt(Ljava/lang/String;Ljava/lang/String;)Z
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionString(Ljava/lang/String;Ljava/lang/String;)Z
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.identityApplies(Lcom/dmdirc/config/Identity;)Z
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.migrate(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.migrate(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.removeIdentity(Lcom/dmdirc/config/Identity;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.removeListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#output(com.dmdirc.config.ConfigManager__static_init): com/dmdirc/config/ConfigSource.__Descendant_Table[com/dmdirc/config/ConfigManager]
    //#output(com.dmdirc.config.ConfigManager__static_init): new TreeMap(ConfigManager__static_init#1) num objects
    //#output(com.dmdirc.config.ConfigManager__static_init): stats
    //#new obj(com.dmdirc.config.ConfigManager__static_init): new TreeMap(ConfigManager__static_init#1)
    //#post(com.dmdirc.config.ConfigManager__static_init): __Descendant_Table[com/dmdirc/config/ConfigManager] == &__Dispatch_Table
    //#post(com.dmdirc.config.ConfigManager__static_init): com/dmdirc/config/ConfigSource.__Descendant_Table[com/dmdirc/config/ConfigManager] == &__Dispatch_Table
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.addChangeListener(Ljava/lang/String;Lcom/dmdirc/interfaces/ConfigChangeListener;)V == &addChangeListener
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.addChangeListener(Ljava/lang/String;Ljava/lang/String;Lcom/dmdirc/interfaces/ConfigChangeListener;)V == &addChangeListener
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.addListener(Ljava/lang/String;Lcom/dmdirc/interfaces/ConfigChangeListener;)V == &addListener
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.checkIdentity(Lcom/dmdirc/config/Identity;)V == &checkIdentity
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.configChanged(Ljava/lang/String;Ljava/lang/String;)V == &configChanged
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getDomains()Ljava/util/Set; == &getDomains
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOption(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; == &getOption
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionBool(Ljava/lang/String;Ljava/lang/String;)Z == &com/dmdirc/config/ConfigSource.getOptionBool
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionChar(Ljava/lang/String;Ljava/lang/String;)C == &com/dmdirc/config/ConfigSource.getOptionChar
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionColour(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Ljava/awt/Color; == &com/dmdirc/config/ConfigSource.getOptionColour
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionInt(Ljava/lang/String;Ljava/lang/String;)I == &com/dmdirc/config/ConfigSource.getOptionInt
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionList(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; == &com/dmdirc/config/ConfigSource.getOptionList
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptionList(Ljava/lang/String;Ljava/lang/String;Z)Ljava/util/List; == &com/dmdirc/config/ConfigSource.getOptionList
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getOptions(Ljava/lang/String;)Ljava/util/Map; == &getOptions
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getScope(Ljava/lang/String;Ljava/lang/String;)Lcom/dmdirc/config/Identity; == &getScope
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.getSources()Ljava/util/List; == &getSources
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z == &hasOption
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionChar(Ljava/lang/String;Ljava/lang/String;)Z == &com/dmdirc/config/ConfigSource.hasOptionChar
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionColour(Ljava/lang/String;Ljava/lang/String;)Z == &com/dmdirc/config/ConfigSource.hasOptionColour
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionInt(Ljava/lang/String;Ljava/lang/String;)Z == &com/dmdirc/config/ConfigSource.hasOptionInt
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.hasOptionString(Ljava/lang/String;Ljava/lang/String;)Z == &com/dmdirc/config/ConfigSource.hasOptionString
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.identityApplies(Lcom/dmdirc/config/Identity;)Z == &identityApplies
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.migrate(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V == &migrate
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.migrate(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V == &migrate
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.removeIdentity(Lcom/dmdirc/config/Identity;)V == &removeIdentity
    //#post(com.dmdirc.config.ConfigManager__static_init): __Dispatch_Table.removeListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V == &removeListener
    //#post(com.dmdirc.config.ConfigManager__static_init): stats == &new TreeMap(ConfigManager__static_init#1)
    //#post(com.dmdirc.config.ConfigManager__static_init): new TreeMap(ConfigManager__static_init#1) num objects == 1
    //#ConfigManager.java:54: end of method: com.dmdirc.config.ConfigManager.com.dmdirc.config.ConfigManager__static_init

    /** A list of sources for this config manager. */
    private final List<Identity> sources;

    /** The listeners registered for this manager. */
    private final MapList<String, ConfigChangeListener> listeners
    //#ConfigManager.java:60: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.util.MapList()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void com.dmdirc.config.ConfigManager(String, String, String, String)
    //#    unanalyzed callee: void com.dmdirc.util.MapList()
            = new MapList<String, ConfigChangeListener>();

    /** The ircd this manager is for. */
    private String ircd;
    /** The network this manager is for. */
    private String network;
    /** The server this manager is for. */
    private String server;
    /** The channel this manager is for. */
    private String channel;

    /**
     * Creates a new instance of ConfigManager.
     *
     * @param ircd The name of the ircd for this manager
     * @param network The name of the network for this manager
     * @param server The name of the server for this manager
     */
    public ConfigManager(final String ircd, final String network,
            final String server) {
        this(ircd, network, server, "<Unknown>");
    //#ConfigManager.java:81: method: void com.dmdirc.config.ConfigManager.com.dmdirc.config.ConfigManager(String, String, String)
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): "<Unknown>"._tainted
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): "@"._tainted
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): __Descendant_Table[com/dmdirc/config/ConfigManager]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): __Descendant_Table[others]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): __Dispatch_Table.identityApplies(Lcom/dmdirc/config/Identity;)Z
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1).length
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/ConfigManager$1.$SwitchMap$com$dmdirc$config$ConfigTarget$TYPE
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[com/dmdirc/config/ConfigTarget]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[others]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getData()Ljava/lang/String;
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getType()Lcom/dmdirc/config/ConfigTarget$TYPE;
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.addListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getTarget()Lcom/dmdirc/config/ConfigTarget;
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/IdentityManager.identities
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): com/dmdirc/config/IdentityManager.managers
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): ircd
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): network
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): network._tainted
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): server
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): this
    //#input(void com.dmdirc.config.ConfigManager(String, String, String)): this.__Tag
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): java.lang.StringBuilder:toString(...)._tainted
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): new ArrayList(getSources#1) num objects
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): new MapList(ConfigManager#1) num objects
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): this.__Tag
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): this.channel
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): this.ircd
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): this.listeners
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): this.network
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): this.server
    //#output(void com.dmdirc.config.ConfigManager(String, String, String)): this.sources
    //#new obj(void com.dmdirc.config.ConfigManager(String, String, String)): java.lang.StringBuilder:toString(...)
    //#new obj(void com.dmdirc.config.ConfigManager(String, String, String)): new ArrayList(getSources#1)
    //#new obj(void com.dmdirc.config.ConfigManager(String, String, String)): new MapList(ConfigManager#1)
    //#pre[1] (void com.dmdirc.config.ConfigManager(String, String, String)): (soft) init'ed(com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295])
    //#pre[7] (void com.dmdirc.config.ConfigManager(String, String, String)): (soft) this.__Tag == com/dmdirc/config/ConfigManager
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): java.lang.StringBuilder:toString(...)._tainted == network._tainted
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): this.__Tag == com/dmdirc/config/ConfigManager
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): this.channel == &java.lang.StringBuilder:toString(...)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): this.ircd == ircd
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): init'ed(this.ircd)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): this.listeners == &new MapList(ConfigManager#1)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): this.network == network
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): init'ed(this.network)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): this.server == server
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): init'ed(this.server)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): this.sources == &new ArrayList(getSources#1)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): new ArrayList(getSources#1) num objects == 1
    //#post(void com.dmdirc.config.ConfigManager(String, String, String)): new MapList(ConfigManager#1) num objects == 1
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:getTarget
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:com.dmdirc.config.ConfigTarget$TYPE:ordinal
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:getSources
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:addListener
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:com.dmdirc.config.ConfigSource
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:com.dmdirc.util.MapList
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:addConfigManager
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:java.util.Collections:sort
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String)): Effects-of-calling:com.dmdirc.logger.Logger:assertTrue
    }
    //#ConfigManager.java:82: end of method: void com.dmdirc.config.ConfigManager.com.dmdirc.config.ConfigManager(String, String, String)

    /**
     * Creates a new instance of ConfigManager.
     *
     * @param ircd The name of the ircd for this manager
     * @param network The name of the network for this manager
     * @param server The name of the server for this manager
     * @param channel The name of the channel for this manager
     */
    public ConfigManager(final String ircd, final String network,
            final String server, final String channel) {
    //#ConfigManager.java:93: method: void com.dmdirc.config.ConfigManager.com.dmdirc.config.ConfigManager(String, String, String, String)
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): "@"._tainted
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): __Descendant_Table[com/dmdirc/config/ConfigManager]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): __Descendant_Table[others]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): __Dispatch_Table.identityApplies(Lcom/dmdirc/config/Identity;)Z
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): channel
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): channel._tainted
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1).length
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/ConfigManager$1.$SwitchMap$com$dmdirc$config$ConfigTarget$TYPE
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[com/dmdirc/config/ConfigTarget]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[others]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getData()Ljava/lang/String;
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getType()Lcom/dmdirc/config/ConfigTarget$TYPE;
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.addListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getTarget()Lcom/dmdirc/config/ConfigTarget;
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/IdentityManager.identities
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): com/dmdirc/config/IdentityManager.managers
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): ircd
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): network
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): network._tainted
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): server
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): this
    //#input(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.__Tag
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): java.lang.StringBuilder:toString(...)._tainted
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): new ArrayList(getSources#1) num objects
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): new MapList(ConfigManager#1) num objects
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.__Tag
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.channel
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.ircd
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.listeners
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.network
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.server
    //#output(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.sources
    //#new obj(void com.dmdirc.config.ConfigManager(String, String, String, String)): java.lang.StringBuilder:toString(...)
    //#new obj(void com.dmdirc.config.ConfigManager(String, String, String, String)): new ArrayList(getSources#1)
    //#new obj(void com.dmdirc.config.ConfigManager(String, String, String, String)): new MapList(ConfigManager#1)
    //#pre[4] (void com.dmdirc.config.ConfigManager(String, String, String, String)): (soft) init'ed(com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295])
    //#pre[10] (void com.dmdirc.config.ConfigManager(String, String, String, String)): (soft) this.__Tag == com/dmdirc/config/ConfigManager
    //#presumption(void com.dmdirc.config.ConfigManager(String, String, String, String)): identity.listeners@102 != null
    //#presumption(void com.dmdirc.config.ConfigManager(String, String, String, String)): java.util.Iterator:next(...).__Tag@102 == com/dmdirc/config/Identity
    //#presumption(void com.dmdirc.config.ConfigManager(String, String, String, String)): java.util.Iterator:next(...)@102 != null
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): java.lang.StringBuilder:toString(...)._tainted == channel._tainted | network._tainted
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.__Tag == com/dmdirc/config/ConfigManager
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.channel == &java.lang.StringBuilder:toString(...)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.ircd == ircd
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): init'ed(this.ircd)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.listeners == &new MapList(ConfigManager#1)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.network == network
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): init'ed(this.network)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.server == server
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): init'ed(this.server)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): this.sources == &new ArrayList(getSources#1)
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): new ArrayList(getSources#1) num objects == 1
    //#post(void com.dmdirc.config.ConfigManager(String, String, String, String)): new MapList(ConfigManager#1) num objects == 1
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:getTarget
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:com.dmdirc.config.ConfigTarget$TYPE:ordinal
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:java.util.Collections:sort
    //#unanalyzed(void com.dmdirc.config.ConfigManager(String, String, String, String)): Effects-of-calling:com.dmdirc.logger.Logger:assertTrue
    //#test_vector(void com.dmdirc.config.ConfigManager(String, String, String, String)): java.util.Iterator:hasNext(...)@102: {0}, {1}
        final String chanName = channel + "@" + network;
        this.ircd = ircd;
        this.network = network;
        this.server = server;
        this.channel = chanName;
        
        sources = IdentityManager.getSources(this);

        for (Identity identity : sources) {
            identity.addListener(this);
        }

        IdentityManager.addConfigManager(this);
    }
    //#ConfigManager.java:107: end of method: void com.dmdirc.config.ConfigManager.com.dmdirc.config.ConfigManager(String, String, String, String)

    /** {@inheritDoc} */
    @Override
    public String getOption(final String domain, final String option) {
        doStats(domain, option);
    //#ConfigManager.java:112: method: String com.dmdirc.config.ConfigManager.getOption(String, String)
    //#input(String getOption(String, String)): "."._tainted
    //#input(String getOption(String, String)): "Config option not found: "._tainted
    //#input(String getOption(String, String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(String getOption(String, String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(String getOption(String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getOption(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#input(String getOption(String, String)): com/dmdirc/config/Identity.__Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(String getOption(String, String)): domain
    //#input(String getOption(String, String)): domain._tainted
    //#input(String getOption(String, String)): option
    //#input(String getOption(String, String)): option._tainted
    //#input(String getOption(String, String)): stats
    //#input(String getOption(String, String)): this
    //#input(String getOption(String, String)): this.sources
    //#input(String getOption(String, String)): this.sources.__Lock
    //#output(String getOption(String, String)): return_value
    //#pre[7] (String getOption(String, String)): this.sources != null
    //#presumption(String getOption(String, String)): java.util.Iterator:hasNext(...)@115 == 1
    //#presumption(String getOption(String, String)): java.util.Iterator:next(...).__Tag@115 == com/dmdirc/config/Identity
    //#presumption(String getOption(String, String)): java.util.Iterator:next(...)@115 != null
    //#presumption(String getOption(String, String)): source.file@115 != null
    //#post(String getOption(String, String)): init'ed(return_value)
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.util.Map:get
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.lang.Integer:intValue
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(String getOption(String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain

        synchronized (sources) {
            for (Identity source : sources) {
                if (source.hasOption(domain, option)) {
                    return source.getOption(domain, option);
                }
            }
        }

        throw new IllegalArgumentException("Config option not found: " + domain + "." + option);
    //#ConfigManager.java:122: end of method: String com.dmdirc.config.ConfigManager.getOption(String, String)
    }

    /** {@inheritDoc} */
    @Override
    protected boolean hasOption(final String domain, final String option) {
        doStats(domain, option);
    //#ConfigManager.java:128: method: bool com.dmdirc.config.ConfigManager.hasOption(String, String)
    //#input(bool hasOption(String, String)): "."._tainted
    //#input(bool hasOption(String, String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(bool hasOption(String, String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(bool hasOption(String, String)): com/dmdirc/config/Identity.__Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(bool hasOption(String, String)): domain
    //#input(bool hasOption(String, String)): domain._tainted
    //#input(bool hasOption(String, String)): option
    //#input(bool hasOption(String, String)): option._tainted
    //#input(bool hasOption(String, String)): stats
    //#input(bool hasOption(String, String)): this
    //#input(bool hasOption(String, String)): this.sources
    //#input(bool hasOption(String, String)): this.sources.__Lock
    //#output(bool hasOption(String, String)): return_value
    //#pre[6] (bool hasOption(String, String)): this.sources != null
    //#presumption(bool hasOption(String, String)): java.util.Iterator:next(...).__Tag@131 == com/dmdirc/config/Identity
    //#presumption(bool hasOption(String, String)): java.util.Iterator:next(...)@131 != null
    //#presumption(bool hasOption(String, String)): source.file@131 != null
    //#post(bool hasOption(String, String)): init'ed(return_value)
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.util.Map:get
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.lang.Integer:intValue
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(bool hasOption(String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain
    //#test_vector(bool hasOption(String, String)): java.util.Iterator:hasNext(...)@131: {1}, {0}

        synchronized (sources) {
            for (Identity source : sources) {
                if (source.hasOption(domain, option)) {
                    return true;
                }
            }
        }

        return false;
    //#ConfigManager.java:138: end of method: bool com.dmdirc.config.ConfigManager.hasOption(String, String)
    }

    /**
     * Returns the name of all the options in the specified domain. If the
     * domain doesn't exist, an empty list is returned.
     *
     * @param domain The domain to search
     * @return A list of options in the specified domain
     */
    public Map<String, String> getOptions(final String domain) {
        final Map<String, String> res = new HashMap<String, String>();
    //#ConfigManager.java:149: method: Map com.dmdirc.config.ConfigManager.getOptions(String)
    //#input(Map getOptions(String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(Map getOptions(String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(Map getOptions(String)): com/dmdirc/config/Identity.__Dispatch_Table.getOptions(Ljava/lang/String;)Ljava/util/Map;
    //#input(Map getOptions(String)): domain
    //#input(Map getOptions(String)): this
    //#input(Map getOptions(String)): this.sources
    //#input(Map getOptions(String)): this.sources.__Lock
    //#output(Map getOptions(String)): new HashMap(getOptions#1) num objects
    //#output(Map getOptions(String)): return_value
    //#new obj(Map getOptions(String)): new HashMap(getOptions#1)
    //#pre[3] (Map getOptions(String)): this.sources != null
    //#presumption(Map getOptions(String)): java.util.List:get(...).__Tag@153 == com/dmdirc/config/Identity
    //#presumption(Map getOptions(String)): java.util.List:get(...).file@153 != null
    //#presumption(Map getOptions(String)): java.util.List:get(...)@153 != null
    //#presumption(Map getOptions(String)): java.util.List:size(...)@152 >= -2_147_483_647
    //#post(Map getOptions(String)): return_value == &new HashMap(getOptions#1)
    //#post(Map getOptions(String)): new HashMap(getOptions#1) num objects == 1
    //#unanalyzed(Map getOptions(String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(Map getOptions(String)): Effects-of-calling:java.util.HashMap

        synchronized (sources) {
            for (int i = sources.size() - 1; i >= 0; i--) {
               res.putAll(sources.get(i).getOptions(domain));
            }
        }

        return res;
    //#ConfigManager.java:157: end of method: Map com.dmdirc.config.ConfigManager.getOptions(String)
    }

    /**
     * Removes the specified identity from this manager.
     *
     * @param identity The identity to be removed
     */
    public void removeIdentity(final Identity identity) {
        if (!sources.contains(identity)) {
    //#ConfigManager.java:166: method: void com.dmdirc.config.ConfigManager.removeIdentity(Identity)
    //#input(void removeIdentity(Identity)): "."._tainted
    //#input(void removeIdentity(Identity)): __Descendant_Table[com/dmdirc/config/ConfigManager]
    //#input(void removeIdentity(Identity)): __Descendant_Table[others]
    //#input(void removeIdentity(Identity)): __Dispatch_Table.configChanged(Ljava/lang/String;Ljava/lang/String;)V
    //#input(void removeIdentity(Identity)): __Dispatch_Table.getScope(Ljava/lang/String;Ljava/lang/String;)Lcom/dmdirc/config/Identity;
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.DOMAIN
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.equals(Ljava/lang/Object;)Z
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getDomains()Ljava/util/Set;
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getOption(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getOptions(Ljava/lang/String;)Ljava/util/Map;
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getTarget()Lcom/dmdirc/config/ConfigTarget;
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(void removeIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.removeListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void removeIdentity(Identity)): identity
    //#input(void removeIdentity(Identity)): identity.__Tag
    //#input(void removeIdentity(Identity)): identity.file
    //#input(void removeIdentity(Identity)): identity.listeners
    //#input(void removeIdentity(Identity)): identity.myTarget
    //#input(void removeIdentity(Identity)): this
    //#input(void removeIdentity(Identity)): this.__Tag
    //#input(void removeIdentity(Identity)): this.listeners
    //#input(void removeIdentity(Identity)): this.sources
    //#pre[10] (void removeIdentity(Identity)): this.sources != null
    //#pre[1] (void removeIdentity(Identity)): (soft) identity != null
    //#pre[3] (void removeIdentity(Identity)): (soft) identity.__Tag == com/dmdirc/config/Identity
    //#pre[4] (void removeIdentity(Identity)): (soft) identity.file != null
    //#pre[5] (void removeIdentity(Identity)): (soft) identity.listeners != null
    //#pre[8] (void removeIdentity(Identity)): (soft) this.__Tag == com/dmdirc/config/ConfigManager
    //#pre[9] (void removeIdentity(Identity)): (soft) this.listeners != null
    //#presumption(void removeIdentity(Identity)): java.util.Iterator:next(...)@187 != null
    //#presumption(void removeIdentity(Identity)): java.util.Map:keySet(...)@174 != null
    //#presumption(void removeIdentity(Identity)): setting.length@187 >= 2
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:com.dmdirc.util.MapList:containsKey
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:com.dmdirc.util.MapList:get
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:com.dmdirc.interfaces.ConfigChangeListener:configChanged
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:hasOption
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomains
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.Map:keySet
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.HashSet
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(void removeIdentity(Identity)): Effects-of-calling:java.util.List:remove
    //#test_vector(void removeIdentity(Identity)): java.util.Iterator:hasNext(...)@173: {0}, {1}
    //#test_vector(void removeIdentity(Identity)): java.util.Iterator:hasNext(...)@174: {0}, {1}
    //#test_vector(void removeIdentity(Identity)): java.util.Iterator:hasNext(...)@187: {0}, {1}
    //#test_vector(void removeIdentity(Identity)): java.util.List:contains(...)@166: {1}, {0}
            return;
        }

        final List<String[]> changed = new ArrayList<String[]>();

        // Determine which settings will have changed
        for (String domain : identity.getDomains()) {
            for (String option : identity.getOptions(domain).keySet()) {
                if (identity.equals(getScope(domain, option))) {
    //#ConfigManager.java:175: ?precondition failure
    //#    com/dmdirc/config/Identity.equals: (soft) obj.file != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void removeIdentity(Identity)
    //#    basic block: bb_7
    //#    assertion: (soft) getScope(...).file != null
    //#    callee: bool com/dmdirc/config/Identity.equals(Object)
    //#    callee assertion: (soft) obj.file != null
    //#    callee file: Identity.java
    //#    callee precondition index: [4]
    //#    callee srcpos: 590
    //#    VN: getScope(...).file
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null, Invalid}
    //#    Attribs:  Ptr  null in Bad  Soft
                    changed.add(new String[]{domain, option});
                }
            }
        }

        synchronized (sources) {
            identity.removeListener(this);
            sources.remove(identity);
        }

        // Fire change listeners
        for (String[] setting : changed) {
            configChanged(setting[0], setting[1]);
        }
    }
    //#ConfigManager.java:190: end of method: void com.dmdirc.config.ConfigManager.removeIdentity(Identity)

    /**
     * Retrieves the identity that currently defines the specified domain and
     * option.
     *
     * @param domain The domain to search for
     * @param option The option to search for
     * @return The identity that defines that setting, or null on failure
     */
    protected Identity getScope(final String domain, final String option) {
        synchronized (sources) {
    //#ConfigManager.java:201: method: Identity com.dmdirc.config.ConfigManager.getScope(String, String)
    //#input(Identity getScope(String, String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(Identity getScope(String, String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(Identity getScope(String, String)): com/dmdirc/config/Identity.__Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(Identity getScope(String, String)): domain
    //#input(Identity getScope(String, String)): option
    //#input(Identity getScope(String, String)): this
    //#input(Identity getScope(String, String)): this.sources
    //#input(Identity getScope(String, String)): this.sources.__Lock
    //#output(Identity getScope(String, String)): return_value
    //#pre[4] (Identity getScope(String, String)): this.sources != null
    //#presumption(Identity getScope(String, String)): java.util.Iterator:next(...).__Tag@202 == com/dmdirc/config/Identity
    //#presumption(Identity getScope(String, String)): java.util.Iterator:next(...)@202 != null
    //#presumption(Identity getScope(String, String)): source.file@202 != null
    //#post(Identity getScope(String, String)): init'ed(return_value)
    //#unanalyzed(Identity getScope(String, String)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(Identity getScope(String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(Identity getScope(String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain
    //#test_vector(Identity getScope(String, String)): java.util.Iterator:hasNext(...)@202: {1}, {0}
            for (Identity source : sources) {
                if (source.hasOption(domain, option)) {
                    return source;
                }
            }
        }

        return null;
    //#ConfigManager.java:209: end of method: Identity com.dmdirc.config.ConfigManager.getScope(String, String)
    }
    
    /**
     * Checks whether the specified identity applies to this config manager.
     * 
     * @param identity The identity to test
     * @return True if the identity applies, false otherwise
     */
    public boolean identityApplies(final Identity identity) {
        String comp;

        switch (identity.getTarget().getType()) {
    //#ConfigManager.java:221: method: com.dmdirc.config.ConfigManager$1.com.dmdirc.config.ConfigManager$1__static_init
    //#ConfigManager.java:221: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.config.ConfigTarget$TYPE:ordinal()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager$1
    //#    method: com.dmdirc.config.ConfigManager$1__static_init
    //#    unanalyzed callee: int com.dmdirc.config.ConfigTarget$TYPE:ordinal()
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com.dmdirc.config.ConfigTarget$TYPE__static_init.new ConfigTarget$TYPE[](ConfigTarget$TYPE__static_init#9).length
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com.dmdirc.config.ConfigTarget$TYPE__static_init.new ConfigTarget$TYPE[](ConfigTarget$TYPE__static_init#9)[0..8]
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com/dmdirc/config/ConfigTarget$TYPE.$VALUES
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com/dmdirc/config/ConfigTarget$TYPE.CHANNEL
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com/dmdirc/config/ConfigTarget$TYPE.IRCD
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com/dmdirc/config/ConfigTarget$TYPE.NETWORK
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com/dmdirc/config/ConfigTarget$TYPE.PROFILE
    //#input(com.dmdirc.config.ConfigManager$1__static_init): com/dmdirc/config/ConfigTarget$TYPE.SERVER
    //#output(com.dmdirc.config.ConfigManager$1__static_init): $SwitchMap$com$dmdirc$config$ConfigTarget$TYPE
    //#output(com.dmdirc.config.ConfigManager$1__static_init): __Descendant_Table[com/dmdirc/config/ConfigManager$1]
    //#output(com.dmdirc.config.ConfigManager$1__static_init): new int[](ConfigManager$1__static_init#1) num objects
    //#output(com.dmdirc.config.ConfigManager$1__static_init): $SwitchMap$com$dmdirc$config$ConfigTarget$TYPE.length
    //#output(com.dmdirc.config.ConfigManager$1__static_init): $SwitchMap$com$dmdirc$config$ConfigTarget$TYPE[0..4_294_967_295]
    //#new obj(com.dmdirc.config.ConfigManager$1__static_init): new int[](ConfigManager$1__static_init#1)
    //#pre[1] (com.dmdirc.config.ConfigManager$1__static_init): (soft) init'ed(com.dmdirc.config.ConfigTarget$TYPE__static_init.new ConfigTarget$TYPE[](ConfigTarget$TYPE__static_init#9)[0..8])
    //#presumption(com.dmdirc.config.ConfigManager$1__static_init): com.dmdirc.config.ConfigTarget_TYPE:ordinal(...)@221 in {0..7}
    //#presumption(com.dmdirc.config.ConfigManager$1__static_init): com.dmdirc.config.ConfigTarget_TYPE:ordinal(...)@221 in {0..7}
    //#presumption(com.dmdirc.config.ConfigManager$1__static_init): com.dmdirc.config.ConfigTarget_TYPE:ordinal(...)@221 in {0..7}
    //#presumption(com.dmdirc.config.ConfigManager$1__static_init): com.dmdirc.config.ConfigTarget_TYPE:ordinal(...)@221 in {0..7}
    //#presumption(com.dmdirc.config.ConfigManager$1__static_init): com.dmdirc.config.ConfigTarget_TYPE:ordinal(...)@221 in {0..7}
    //#post(com.dmdirc.config.ConfigManager$1__static_init): $SwitchMap$com$dmdirc$config$ConfigTarget$TYPE == &new int[](ConfigManager$1__static_init#1)
    //#post(com.dmdirc.config.ConfigManager$1__static_init): __Descendant_Table[com/dmdirc/config/ConfigManager$1] == &__Dispatch_Table
    //#post(com.dmdirc.config.ConfigManager$1__static_init): new int[](ConfigManager$1__static_init#1) num objects == 1
    //#post(com.dmdirc.config.ConfigManager$1__static_init): $SwitchMap$com$dmdirc$config$ConfigTarget$TYPE.length == 8
    //#post(com.dmdirc.config.ConfigManager$1__static_init): $SwitchMap$com$dmdirc$config$ConfigTarget$TYPE[0..4_294_967_295] in {0..5}, if init'ed
    //#ConfigManager.java:221: end of method: com.dmdirc.config.ConfigManager$1.com.dmdirc.config.ConfigManager$1__static_init
    //#ConfigManager.java:221: method: bool com.dmdirc.config.ConfigManager.identityApplies(Identity)
    //#ConfigManager.java:221: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.config.ConfigTarget$TYPE:ordinal()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: bool identityApplies(Identity)
    //#    unanalyzed callee: int com.dmdirc.config.ConfigTarget$TYPE:ordinal()
    //#input(bool identityApplies(Identity)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1).length
    //#input(bool identityApplies(Identity)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295]
    //#input(bool identityApplies(Identity)): com/dmdirc/config/ConfigManager$1.$SwitchMap$com$dmdirc$config$ConfigTarget$TYPE
    //#input(bool identityApplies(Identity)): com/dmdirc/config/ConfigTarget.__Descendant_Table[com/dmdirc/config/ConfigTarget]
    //#input(bool identityApplies(Identity)): com/dmdirc/config/ConfigTarget.__Descendant_Table[others]
    //#input(bool identityApplies(Identity)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getData()Ljava/lang/String;
    //#input(bool identityApplies(Identity)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getType()Lcom/dmdirc/config/ConfigTarget$TYPE;
    //#input(bool identityApplies(Identity)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(bool identityApplies(Identity)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(bool identityApplies(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getTarget()Lcom/dmdirc/config/ConfigTarget;
    //#input(bool identityApplies(Identity)): identity
    //#input(bool identityApplies(Identity)): identity.__Tag
    //#input(bool identityApplies(Identity)): identity.myTarget
    //#input(bool identityApplies(Identity)): identity.myTarget.__Tag
    //#input(bool identityApplies(Identity)): identity.myTarget.data
    //#input(bool identityApplies(Identity)): identity.myTarget.type
    //#input(bool identityApplies(Identity)): this
    //#input(bool identityApplies(Identity)): this.channel
    //#input(bool identityApplies(Identity)): this.ircd
    //#input(bool identityApplies(Identity)): this.network
    //#input(bool identityApplies(Identity)): this.server
    //#output(bool identityApplies(Identity)): return_value
    //#pre[2] (bool identityApplies(Identity)): identity != null
    //#pre[3] (bool identityApplies(Identity)): identity.__Tag == com/dmdirc/config/Identity
    //#pre[4] (bool identityApplies(Identity)): identity.myTarget != null
    //#pre[5] (bool identityApplies(Identity)): identity.myTarget.__Tag == com/dmdirc/config/ConfigTarget
    //#pre[7] (bool identityApplies(Identity)): identity.myTarget.type != null
    //#pre[1] (bool identityApplies(Identity)): (soft) init'ed(com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295])
    //#pre[6] (bool identityApplies(Identity)): (soft) init'ed(identity.myTarget.data)
    //#pre[9] (bool identityApplies(Identity)): (soft) init'ed(this.channel)
    //#pre[10] (bool identityApplies(Identity)): (soft) init'ed(this.ircd)
    //#pre[11] (bool identityApplies(Identity)): (soft) init'ed(this.network)
    //#pre[12] (bool identityApplies(Identity)): (soft) init'ed(this.server)
    //#presumption(bool identityApplies(Identity)): com.dmdirc.config.ConfigTarget_TYPE:ordinal(...)@221 in {0..7}
    //#post(bool identityApplies(Identity)): init'ed(return_value)
    //#test_vector(bool identityApplies(Identity)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295]: {1}, {2}, {3}, {4}, {5}, {-2_147_483_648..0, 6..4_294_967_295}
        case IRCD:
            comp = ircd;
            break;
        case NETWORK:
            comp = network;
            break;
        case SERVER:
            comp = server;
            break;
        case CHANNEL:
            comp = channel;
            break;
        case PROFILE:
            // We don't want profiles
            comp = null;
            break;
        default:
            comp = "";
            break;
        }

        return comp != null && comp.equalsIgnoreCase(identity.getTarget().getData());
    //#ConfigManager.java:243: end of method: bool com.dmdirc.config.ConfigManager.identityApplies(Identity)
    }

    /**
     * Called whenever there is a new identity available. Checks if the
     * identity is relevant for this manager, and adds it if it is.
     * 
     * @param identity The identity to be checked
     */
    public void checkIdentity(final Identity identity) {
        if (!sources.contains(identity) && identityApplies(identity)) {
    //#ConfigManager.java:253: method: void com.dmdirc.config.ConfigManager.checkIdentity(Identity)
    //#input(void checkIdentity(Identity)): "."._tainted
    //#input(void checkIdentity(Identity)): __Descendant_Table[com/dmdirc/config/ConfigManager]
    //#input(void checkIdentity(Identity)): __Descendant_Table[others]
    //#input(void checkIdentity(Identity)): __Dispatch_Table.configChanged(Ljava/lang/String;Ljava/lang/String;)V
    //#input(void checkIdentity(Identity)): __Dispatch_Table.getScope(Ljava/lang/String;Ljava/lang/String;)Lcom/dmdirc/config/Identity;
    //#input(void checkIdentity(Identity)): __Dispatch_Table.identityApplies(Lcom/dmdirc/config/Identity;)Z
    //#input(void checkIdentity(Identity)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1).length
    //#input(void checkIdentity(Identity)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295]
    //#input(void checkIdentity(Identity)): com/dmdirc/config/ConfigManager$1.$SwitchMap$com$dmdirc$config$ConfigTarget$TYPE
    //#input(void checkIdentity(Identity)): com/dmdirc/config/ConfigTarget.__Descendant_Table[com/dmdirc/config/ConfigTarget]
    //#input(void checkIdentity(Identity)): com/dmdirc/config/ConfigTarget.__Descendant_Table[others]
    //#input(void checkIdentity(Identity)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getData()Ljava/lang/String;
    //#input(void checkIdentity(Identity)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getType()Lcom/dmdirc/config/ConfigTarget$TYPE;
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.DOMAIN
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.addListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.equals(Ljava/lang/Object;)Z
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getDomains()Ljava/util/Set;
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getOption(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getOptions(Ljava/lang/String;)Ljava/util/Map;
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.getTarget()Lcom/dmdirc/config/ConfigTarget;
    //#input(void checkIdentity(Identity)): com/dmdirc/config/Identity.__Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(void checkIdentity(Identity)): identity
    //#input(void checkIdentity(Identity)): identity.__Tag
    //#input(void checkIdentity(Identity)): identity.file
    //#input(void checkIdentity(Identity)): identity.listeners
    //#input(void checkIdentity(Identity)): identity.myTarget
    //#input(void checkIdentity(Identity)): identity.myTarget.__Tag
    //#input(void checkIdentity(Identity)): identity.myTarget.data
    //#input(void checkIdentity(Identity)): identity.myTarget.type
    //#input(void checkIdentity(Identity)): this
    //#input(void checkIdentity(Identity)): this.__Tag
    //#input(void checkIdentity(Identity)): this.channel
    //#input(void checkIdentity(Identity)): this.ircd
    //#input(void checkIdentity(Identity)): this.listeners
    //#input(void checkIdentity(Identity)): this.network
    //#input(void checkIdentity(Identity)): this.server
    //#input(void checkIdentity(Identity)): this.sources
    //#pre[18] (void checkIdentity(Identity)): this.sources != null
    //#pre[1] (void checkIdentity(Identity)): (soft) init'ed(com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295])
    //#pre[2] (void checkIdentity(Identity)): (soft) identity != null
    //#pre[4] (void checkIdentity(Identity)): (soft) identity.__Tag == com/dmdirc/config/Identity
    //#pre[5] (void checkIdentity(Identity)): (soft) identity.file != null
    //#pre[6] (void checkIdentity(Identity)): (soft) identity.listeners != null
    //#pre[7] (void checkIdentity(Identity)): (soft) identity.myTarget != null
    //#pre[8] (void checkIdentity(Identity)): (soft) identity.myTarget.__Tag == com/dmdirc/config/ConfigTarget
    //#pre[9] (void checkIdentity(Identity)): (soft) init'ed(identity.myTarget.data)
    //#pre[10] (void checkIdentity(Identity)): (soft) identity.myTarget.type != null
    //#pre[12] (void checkIdentity(Identity)): (soft) this.__Tag == com/dmdirc/config/ConfigManager
    //#pre[13] (void checkIdentity(Identity)): (soft) init'ed(this.channel)
    //#pre[14] (void checkIdentity(Identity)): (soft) init'ed(this.ircd)
    //#pre[15] (void checkIdentity(Identity)): (soft) this.listeners != null
    //#pre[16] (void checkIdentity(Identity)): (soft) init'ed(this.network)
    //#pre[17] (void checkIdentity(Identity)): (soft) init'ed(this.server)
    //#presumption(void checkIdentity(Identity)): java.util.Map:keySet(...)@262 != null
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:com.dmdirc.util.MapList:containsKey
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:com.dmdirc.util.MapList:get
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:com.dmdirc.interfaces.ConfigChangeListener:configChanged
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:hasOption
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:getTarget
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:com.dmdirc.config.ConfigTarget$TYPE:ordinal
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomains
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.Map:keySet
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.HashSet
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void checkIdentity(Identity)): Effects-of-calling:java.lang.String:equals
    //#test_vector(void checkIdentity(Identity)): java.util.Iterator:hasNext(...)@261: {0}, {1}
    //#test_vector(void checkIdentity(Identity)): java.util.Iterator:hasNext(...)@262: {0}, {1}
    //#test_vector(void checkIdentity(Identity)): java.util.List:contains(...)@253: {1}, {0}
            synchronized (sources) {
                sources.add(identity);
                identity.addListener(this);
                Collections.sort(sources);
            }
            
            // Determine which settings will have changed
            for (String domain : identity.getDomains()) {
                for (String option : identity.getOptions(domain).keySet()) {
                    if (identity.equals(getScope(domain, option))) {
    //#ConfigManager.java:263: ?precondition failure
    //#    com/dmdirc/config/Identity.equals: (soft) obj.file != null
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void checkIdentity(Identity)
    //#    basic block: bb_10
    //#    assertion: (soft) getScope(...).file != null
    //#    callee: bool com/dmdirc/config/Identity.equals(Object)
    //#    callee assertion: (soft) obj.file != null
    //#    callee file: Identity.java
    //#    callee precondition index: [4]
    //#    callee srcpos: 590
    //#    VN: getScope(...).file
    //#    Expected: Inverse{null}
    //#    Bad: Addr_Set{null, Invalid}
    //#    Attribs:  Ptr  null in Bad  Soft
                        configChanged(domain, option);
                    }
                }
            }            
        }
    }
    //#ConfigManager.java:269: end of method: void com.dmdirc.config.ConfigManager.checkIdentity(Identity)

    /**
     * Returns the name of all domains known by this manager.
     *
     * @return A list of domains known to this manager
     */
    public Set<String> getDomains() {
        final Set<String> res = new HashSet<String>();
    //#ConfigManager.java:277: method: Set com.dmdirc.config.ConfigManager.getDomains()
    //#input(Set getDomains()): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(Set getDomains()): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(Set getDomains()): com/dmdirc/config/Identity.__Dispatch_Table.getDomains()Ljava/util/Set;
    //#input(Set getDomains()): this
    //#input(Set getDomains()): this.sources
    //#input(Set getDomains()): this.sources.__Lock
    //#output(Set getDomains()): new HashSet(getDomains#1) num objects
    //#output(Set getDomains()): return_value
    //#new obj(Set getDomains()): new HashSet(getDomains#1)
    //#pre[2] (Set getDomains()): this.sources != null
    //#presumption(Set getDomains()): java.util.Iterator:next(...).__Tag@280 == com/dmdirc/config/Identity
    //#presumption(Set getDomains()): java.util.Iterator:next(...)@280 != null
    //#presumption(Set getDomains()): source.file@280 != null
    //#post(Set getDomains()): return_value == &new HashSet(getDomains#1)
    //#post(Set getDomains()): new HashSet(getDomains#1) num objects == 1
    //#unanalyzed(Set getDomains()): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomains
    //#unanalyzed(Set getDomains()): Effects-of-calling:java.util.Map:keySet
    //#unanalyzed(Set getDomains()): Effects-of-calling:java.util.HashSet
    //#test_vector(Set getDomains()): java.util.Iterator:hasNext(...)@280: {1}, {0}

        synchronized (sources) {
            for (Identity source : sources) {
                res.addAll(source.getDomains());
            }
        }
        
        return res;
    //#ConfigManager.java:285: end of method: Set com.dmdirc.config.ConfigManager.getDomains()
    }

    /**
     * Retrieves a list of sources for this config manager.
     * @return This config manager's sources.
     */
    public List<Identity> getSources() {
        return new ArrayList<Identity>(sources);
    //#ConfigManager.java:293: method: List com.dmdirc.config.ConfigManager.getSources()
    //#input(List getSources()): this
    //#input(List getSources()): this.sources
    //#output(List getSources()): new ArrayList(getSources#1) num objects
    //#output(List getSources()): return_value
    //#new obj(List getSources()): new ArrayList(getSources#1)
    //#post(List getSources()): return_value == &new ArrayList(getSources#1)
    //#post(List getSources()): new ArrayList(getSources#1) num objects == 1
    //#ConfigManager.java:293: end of method: List com.dmdirc.config.ConfigManager.getSources()
    }

    /**
     * Migrates this ConfigManager from its current configuration to the
     * appropriate one for the specified new parameters, firing listeners where
     * settings have changed.
     *
     * @param ircd The new name of the ircd for this manager
     * @param network The new name of the network for this manager
     * @param server The new name of the server for this manager
     */
    public void migrate(final String ircd, final String network, final String server) {
        migrate(ircd, network, server, "<Unknown>");
    //#ConfigManager.java:306: method: void com.dmdirc.config.ConfigManager.migrate(String, String, String)
    //#input(void migrate(String, String, String)): "."._tainted
    //#input(void migrate(String, String, String)): "<Unknown>"._tainted
    //#input(void migrate(String, String, String)): "@"._tainted
    //#input(void migrate(String, String, String)): __Descendant_Table[com/dmdirc/config/ConfigManager]
    //#input(void migrate(String, String, String)): __Descendant_Table[others]
    //#input(void migrate(String, String, String)): __Dispatch_Table.checkIdentity(Lcom/dmdirc/config/Identity;)V
    //#input(void migrate(String, String, String)): __Dispatch_Table.configChanged(Ljava/lang/String;Ljava/lang/String;)V
    //#input(void migrate(String, String, String)): __Dispatch_Table.getScope(Ljava/lang/String;Ljava/lang/String;)Lcom/dmdirc/config/Identity;
    //#input(void migrate(String, String, String)): __Dispatch_Table.identityApplies(Lcom/dmdirc/config/Identity;)Z
    //#input(void migrate(String, String, String)): __Dispatch_Table.migrate(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    //#input(void migrate(String, String, String)): __Dispatch_Table.removeIdentity(Lcom/dmdirc/config/Identity;)V
    //#input(void migrate(String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1).length
    //#input(void migrate(String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295]
    //#input(void migrate(String, String, String)): com/dmdirc/config/ConfigManager$1.$SwitchMap$com$dmdirc$config$ConfigTarget$TYPE
    //#input(void migrate(String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[com/dmdirc/config/ConfigTarget]
    //#input(void migrate(String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[others]
    //#input(void migrate(String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getData()Ljava/lang/String;
    //#input(void migrate(String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getType()Lcom/dmdirc/config/ConfigTarget$TYPE;
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.DOMAIN
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.addListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.equals(Ljava/lang/Object;)Z
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getDomains()Ljava/util/Set;
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getOption(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getOptions(Ljava/lang/String;)Ljava/util/Map;
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getTarget()Lcom/dmdirc/config/ConfigTarget;
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(void migrate(String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.removeListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void migrate(String, String, String)): com/dmdirc/config/IdentityManager.identities
    //#input(void migrate(String, String, String)): ircd
    //#input(void migrate(String, String, String)): network
    //#input(void migrate(String, String, String)): network._tainted
    //#input(void migrate(String, String, String)): server
    //#input(void migrate(String, String, String)): this
    //#input(void migrate(String, String, String)): this.__Tag
    //#input(void migrate(String, String, String)): this.listeners
    //#input(void migrate(String, String, String)): this.sources
    //#output(void migrate(String, String, String)): java.lang.StringBuilder:toString(...)._tainted
    //#output(void migrate(String, String, String)): this.channel
    //#output(void migrate(String, String, String)): this.ircd
    //#output(void migrate(String, String, String)): this.network
    //#output(void migrate(String, String, String)): this.server
    //#new obj(void migrate(String, String, String)): java.lang.StringBuilder:toString(...)
    //#pre[8] (void migrate(String, String, String)): this.__Tag == com/dmdirc/config/ConfigManager
    //#pre[1] (void migrate(String, String, String)): (soft) init'ed(com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295])
    //#pre[9] (void migrate(String, String, String)): (soft) this.listeners != null
    //#pre[10] (void migrate(String, String, String)): (soft) this.sources != null
    //#post(void migrate(String, String, String)): java.lang.StringBuilder:toString(...)._tainted == network._tainted
    //#post(void migrate(String, String, String)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(void migrate(String, String, String)): this.channel == &java.lang.StringBuilder:toString(...)
    //#post(void migrate(String, String, String)): this.ircd == ircd
    //#post(void migrate(String, String, String)): init'ed(this.ircd)
    //#post(void migrate(String, String, String)): this.network == network
    //#post(void migrate(String, String, String)): init'ed(this.network)
    //#post(void migrate(String, String, String)): this.server == server
    //#post(void migrate(String, String, String)): init'ed(this.server)
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:com.dmdirc.util.MapList:containsKey
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:com.dmdirc.util.MapList:get
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:com.dmdirc.interfaces.ConfigChangeListener:configChanged
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:hasOption
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:getTarget
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:com.dmdirc.config.ConfigTarget$TYPE:ordinal
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.ArrayList:iterator
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:removeIdentity
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:getSources
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:checkIdentity
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:getDomains
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.List:contains
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:addListener
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.Collections:sort
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.Set:iterator
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:getOptions
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.Map:keySet
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:equals
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:removeListener
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.List:remove
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomains
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.HashSet
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void migrate(String, String, String)): Effects-of-calling:java.lang.String:equals
    }
    //#ConfigManager.java:307: end of method: void com.dmdirc.config.ConfigManager.migrate(String, String, String)

    /**
     * Migrates this ConfigManager from its current configuration to the
     * appropriate one for the specified new parameters, firing listeners where
     * settings have changed.
     *
     * @param ircd The new name of the ircd for this manager
     * @param network The new name of the network for this manager
     * @param server The new name of the server for this manager
     * @param channel The new name of the channel for this manager
     */
    public void migrate(final String ircd, final String network, final String server,
            final String channel) {
        this.ircd = ircd;
    //#ConfigManager.java:321: method: void com.dmdirc.config.ConfigManager.migrate(String, String, String, String)
    //#input(void migrate(String, String, String, String)): "."._tainted
    //#input(void migrate(String, String, String, String)): "@"._tainted
    //#input(void migrate(String, String, String, String)): __Descendant_Table[com/dmdirc/config/ConfigManager]
    //#input(void migrate(String, String, String, String)): __Descendant_Table[others]
    //#input(void migrate(String, String, String, String)): __Dispatch_Table.checkIdentity(Lcom/dmdirc/config/Identity;)V
    //#input(void migrate(String, String, String, String)): __Dispatch_Table.configChanged(Ljava/lang/String;Ljava/lang/String;)V
    //#input(void migrate(String, String, String, String)): __Dispatch_Table.getScope(Ljava/lang/String;Ljava/lang/String;)Lcom/dmdirc/config/Identity;
    //#input(void migrate(String, String, String, String)): __Dispatch_Table.identityApplies(Lcom/dmdirc/config/Identity;)Z
    //#input(void migrate(String, String, String, String)): __Dispatch_Table.removeIdentity(Lcom/dmdirc/config/Identity;)V
    //#input(void migrate(String, String, String, String)): channel
    //#input(void migrate(String, String, String, String)): channel._tainted
    //#input(void migrate(String, String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1).length
    //#input(void migrate(String, String, String, String)): com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295]
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/ConfigManager$1.$SwitchMap$com$dmdirc$config$ConfigTarget$TYPE
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[com/dmdirc/config/ConfigTarget]
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Descendant_Table[others]
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getData()Ljava/lang/String;
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/ConfigTarget.__Dispatch_Table.getType()Lcom/dmdirc/config/ConfigTarget$TYPE;
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.DOMAIN
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[com/dmdirc/config/Identity]
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Descendant_Table[others]
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.addListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.equals(Ljava/lang/Object;)Z
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getDomains()Ljava/util/Set;
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getOption(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getOptions(Ljava/lang/String;)Ljava/util/Map;
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.getTarget()Lcom/dmdirc/config/ConfigTarget;
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.hasOption(Ljava/lang/String;Ljava/lang/String;)Z
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/Identity.__Dispatch_Table.removeListener(Lcom/dmdirc/interfaces/ConfigChangeListener;)V
    //#input(void migrate(String, String, String, String)): com/dmdirc/config/IdentityManager.identities
    //#input(void migrate(String, String, String, String)): ircd
    //#input(void migrate(String, String, String, String)): network
    //#input(void migrate(String, String, String, String)): network._tainted
    //#input(void migrate(String, String, String, String)): server
    //#input(void migrate(String, String, String, String)): this
    //#input(void migrate(String, String, String, String)): this.__Tag
    //#input(void migrate(String, String, String, String)): this.listeners
    //#input(void migrate(String, String, String, String)): this.sources
    //#output(void migrate(String, String, String, String)): java.lang.StringBuilder:toString(...)._tainted
    //#output(void migrate(String, String, String, String)): this.channel
    //#output(void migrate(String, String, String, String)): this.ircd
    //#output(void migrate(String, String, String, String)): this.network
    //#output(void migrate(String, String, String, String)): this.server
    //#new obj(void migrate(String, String, String, String)): java.lang.StringBuilder:toString(...)
    //#pre[3] (void migrate(String, String, String, String)): (soft) init'ed(com.dmdirc.config.ConfigManager$1__static_init.new int[](ConfigManager$1__static_init#1)[0..4_294_967_295])
    //#pre[10] (void migrate(String, String, String, String)): (soft) this.__Tag == com/dmdirc/config/ConfigManager
    //#pre[11] (void migrate(String, String, String, String)): (soft) this.listeners != null
    //#pre[12] (void migrate(String, String, String, String)): (soft) this.sources != null
    //#presumption(void migrate(String, String, String, String)): identity.file@326 != null
    //#presumption(void migrate(String, String, String, String)): identity.file@333 != null
    //#presumption(void migrate(String, String, String, String)): identity.listeners@326 != null
    //#presumption(void migrate(String, String, String, String)): identity.listeners@333 != null
    //#presumption(void migrate(String, String, String, String)): identity.myTarget.__Tag@326 == com/dmdirc/config/ConfigTarget
    //#presumption(void migrate(String, String, String, String)): identity.myTarget.__Tag@333 == com/dmdirc/config/ConfigTarget
    //#presumption(void migrate(String, String, String, String)): identity.myTarget.type@326 != null
    //#presumption(void migrate(String, String, String, String)): identity.myTarget.type@333 != null
    //#presumption(void migrate(String, String, String, String)): identity.myTarget@326 != null
    //#presumption(void migrate(String, String, String, String)): identity.myTarget@333 != null
    //#presumption(void migrate(String, String, String, String)): java.util.ArrayList:iterator(...)@326 != null
    //#presumption(void migrate(String, String, String, String)): java.util.Iterator:next(...).__Tag@326 == com/dmdirc/config/Identity
    //#presumption(void migrate(String, String, String, String)): java.util.Iterator:next(...).__Tag@333 == com/dmdirc/config/Identity
    //#presumption(void migrate(String, String, String, String)): java.util.Iterator:next(...)@326 != null
    //#presumption(void migrate(String, String, String, String)): java.util.Iterator:next(...)@333 != null
    //#post(void migrate(String, String, String, String)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(void migrate(String, String, String, String)): this.channel == &java.lang.StringBuilder:toString(...)
    //#post(void migrate(String, String, String, String)): this.ircd == ircd
    //#post(void migrate(String, String, String, String)): init'ed(this.ircd)
    //#post(void migrate(String, String, String, String)): this.network == network
    //#post(void migrate(String, String, String, String)): init'ed(this.network)
    //#post(void migrate(String, String, String, String)): this.server == server
    //#post(void migrate(String, String, String, String)): init'ed(this.server)
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:com.dmdirc.util.MapList:containsKey
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:com.dmdirc.util.MapList:get
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:com.dmdirc.interfaces.ConfigChangeListener:configChanged
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:hasOption
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:getTarget
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:com.dmdirc.config.ConfigTarget$TYPE:ordinal
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.lang.String:equalsIgnoreCase
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:getDomains
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.List:contains
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:addListener
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.Collections:sort
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.Set:iterator
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:getOptions
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.Map:keySet
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:equals
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:removeListener
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.List:remove
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomains
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.HashSet
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void migrate(String, String, String, String)): Effects-of-calling:java.lang.String:equals
    //#test_vector(void migrate(String, String, String, String)): java.util.Iterator:hasNext(...)@326: {0}, {1}
    //#test_vector(void migrate(String, String, String, String)): java.util.Iterator:hasNext(...)@333: {0}, {1}
        this.network = network;
        this.server = server;
        this.channel = channel + "@" + network;

        for (Identity identity : new ArrayList<Identity>(sources)) {
            if (!identityApplies(identity)) {
                removeIdentity(identity);
            }
        }

        final List<Identity> newSources = IdentityManager.getSources(this);
        for (Identity identity : newSources) {
            checkIdentity(identity);
        }
    }
    //#ConfigManager.java:336: end of method: void com.dmdirc.config.ConfigManager.migrate(String, String, String, String)

    /**
     * Records the lookup request for the specified domain & option.
     *
     * @param domain The domain that is being looked up
     * @param option The option that is being looked up
     */
    protected static void doStats(final String domain, final String option) {
        final String key = domain + "." + option;
    //#ConfigManager.java:345: method: void com.dmdirc.config.ConfigManager.doStats(String, String)
    //#input(void doStats(String, String)): "."._tainted
    //#input(void doStats(String, String)): domain
    //#input(void doStats(String, String)): domain._tainted
    //#input(void doStats(String, String)): option
    //#input(void doStats(String, String)): option._tainted
    //#input(void doStats(String, String)): stats
    //#presumption(void doStats(String, String)): java.lang.Integer:intValue(...)@348 <= 4_294_967_294
    //#presumption(void doStats(String, String)): java.util.Map:get(...)@348 != null

        try {
            stats.put(key, 1 + (stats.containsKey(key) ? stats.get(key) : 0));
        } catch (NullPointerException ex) {
            // JVM bugs ftl.
        }
    }
    //#ConfigManager.java:352: end of method: void com.dmdirc.config.ConfigManager.doStats(String, String)

    /**
     * Retrieves the statistic map.
     *
     * @return A map of config options to lookup counts
     */
    public static Map<String, Integer> getStats() {
        return stats;
    //#ConfigManager.java:360: method: Map com.dmdirc.config.ConfigManager.getStats()
    //#input(Map getStats()): stats
    //#output(Map getStats()): return_value
    //#post(Map getStats()): return_value == &new TreeMap(ConfigManager__static_init#1)
    //#ConfigManager.java:360: end of method: Map com.dmdirc.config.ConfigManager.getStats()
    }

    /**
     * Adds a change listener for the specified domain.
     *
     * @param domain The domain to be monitored
     * @param listener The listener to register
     */
    public void addChangeListener(final String domain,
            final ConfigChangeListener listener) {
        addListener(domain, listener);
    //#ConfigManager.java:371: method: void com.dmdirc.config.ConfigManager.addChangeListener(String, ConfigChangeListener)
    //#input(void addChangeListener(String, ConfigChangeListener)): domain
    //#input(void addChangeListener(String, ConfigChangeListener)): listener
    //#input(void addChangeListener(String, ConfigChangeListener)): this
    //#input(void addChangeListener(String, ConfigChangeListener)): this.listeners
    //#pre[4] (void addChangeListener(String, ConfigChangeListener)): this.listeners != null
    //#unanalyzed(void addChangeListener(String, ConfigChangeListener)): Effects-of-calling:com.dmdirc.util.MapList:add
    //#unanalyzed(void addChangeListener(String, ConfigChangeListener)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    }
    //#ConfigManager.java:372: end of method: void com.dmdirc.config.ConfigManager.addChangeListener(String, ConfigChangeListener)

    /**
     * Adds a change listener for the specified domain and key.
     *
     * @param domain The domain of the option
     * @param key The option to be monitored
     * @param listener The listener to register
     */
    public void addChangeListener(final String domain, final String key,
            final ConfigChangeListener listener) {
        addListener(domain + "." + key, listener);
    //#ConfigManager.java:383: method: void com.dmdirc.config.ConfigManager.addChangeListener(String, String, ConfigChangeListener)
    //#input(void addChangeListener(String, String, ConfigChangeListener)): "."._tainted
    //#input(void addChangeListener(String, String, ConfigChangeListener)): domain
    //#input(void addChangeListener(String, String, ConfigChangeListener)): domain._tainted
    //#input(void addChangeListener(String, String, ConfigChangeListener)): key
    //#input(void addChangeListener(String, String, ConfigChangeListener)): key._tainted
    //#input(void addChangeListener(String, String, ConfigChangeListener)): listener
    //#input(void addChangeListener(String, String, ConfigChangeListener)): this
    //#input(void addChangeListener(String, String, ConfigChangeListener)): this.listeners
    //#pre[8] (void addChangeListener(String, String, ConfigChangeListener)): this.listeners != null
    //#unanalyzed(void addChangeListener(String, String, ConfigChangeListener)): Effects-of-calling:com.dmdirc.util.MapList:add
    //#unanalyzed(void addChangeListener(String, String, ConfigChangeListener)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    }
    //#ConfigManager.java:384: end of method: void com.dmdirc.config.ConfigManager.addChangeListener(String, String, ConfigChangeListener)

    /**
     * Removes the specified listener for all domains and options.
     *
     * @param listener The listener to be removed
     */
    public void removeListener(final ConfigChangeListener listener) {
        synchronized (listeners) {
    //#ConfigManager.java:392: method: void com.dmdirc.config.ConfigManager.removeListener(ConfigChangeListener)
    //#input(void removeListener(ConfigChangeListener)): listener
    //#input(void removeListener(ConfigChangeListener)): this
    //#input(void removeListener(ConfigChangeListener)): this.listeners
    //#input(void removeListener(ConfigChangeListener)): this.listeners.__Lock
    //#pre[3] (void removeListener(ConfigChangeListener)): this.listeners != null
            listeners.removeFromAll(listener);
    //#ConfigManager.java:393: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.util.MapList:removeFromAll(Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void removeListener(ConfigChangeListener)
    //#    unanalyzed callee: void com.dmdirc.util.MapList:removeFromAll(Object)
        }
    }
    //#ConfigManager.java:395: end of method: void com.dmdirc.config.ConfigManager.removeListener(ConfigChangeListener)

    /**
     * Adds the specified listener to the internal map/list.
     *
     * @param key The key to use (domain or domain.key)
     * @param listener The listener to register
     */
    private void addListener(final String key,
            final ConfigChangeListener listener) {
        synchronized (listeners) {
    //#ConfigManager.java:405: method: void com.dmdirc.config.ConfigManager.addListener(String, ConfigChangeListener)
    //#input(void addListener(String, ConfigChangeListener)): key
    //#input(void addListener(String, ConfigChangeListener)): listener
    //#input(void addListener(String, ConfigChangeListener)): this
    //#input(void addListener(String, ConfigChangeListener)): this.listeners
    //#input(void addListener(String, ConfigChangeListener)): this.listeners.__Lock
    //#pre[4] (void addListener(String, ConfigChangeListener)): this.listeners != null
            listeners.add(key, listener);
    //#ConfigManager.java:406: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.util.MapList:add(Object, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void addListener(String, ConfigChangeListener)
    //#    unanalyzed callee: void com.dmdirc.util.MapList:add(Object, Object)
        }
    }
    //#ConfigManager.java:408: end of method: void com.dmdirc.config.ConfigManager.addListener(String, ConfigChangeListener)

    /** {@inheritDoc} */
    @Override
    public void configChanged(final String domain, final String key) {
        final List<ConfigChangeListener> targets
    //#ConfigManager.java:413: method: void com.dmdirc.config.ConfigManager.configChanged(String, String)
    //#input(void configChanged(String, String)): "."._tainted
    //#input(void configChanged(String, String)): domain
    //#input(void configChanged(String, String)): domain._tainted
    //#input(void configChanged(String, String)): key
    //#input(void configChanged(String, String)): key._tainted
    //#input(void configChanged(String, String)): this
    //#input(void configChanged(String, String)): this.listeners
    //#pre[7] (void configChanged(String, String)): this.listeners != null
    //#presumption(void configChanged(String, String)): java.util.Iterator:next(...)@424 != null
    //#test_vector(void configChanged(String, String)): com.dmdirc.util.MapList:containsKey(...)@416: {0}, {1}
    //#test_vector(void configChanged(String, String)): com.dmdirc.util.MapList:containsKey(...)@420: {0}, {1}
    //#test_vector(void configChanged(String, String)): java.util.Iterator:hasNext(...)@424: {0}, {1}
                = new ArrayList<ConfigChangeListener>();

        if (listeners.containsKey(domain)) {
    //#ConfigManager.java:416: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.util.MapList:containsKey(Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void configChanged(String, String)
    //#    unanalyzed callee: bool com.dmdirc.util.MapList:containsKey(Object)
            targets.addAll(listeners.get(domain));
    //#ConfigManager.java:417: Warning: method not available - call not analyzed
    //#    call on List com.dmdirc.util.MapList:get(Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void configChanged(String, String)
    //#    unanalyzed callee: List com.dmdirc.util.MapList:get(Object)
        }

        if (listeners.containsKey(domain + "." + key)) {
    //#ConfigManager.java:420: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.util.MapList:containsKey(Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void configChanged(String, String)
    //#    unanalyzed callee: bool com.dmdirc.util.MapList:containsKey(Object)
            targets.addAll(listeners.get(domain + "." + key));
    //#ConfigManager.java:421: Warning: method not available - call not analyzed
    //#    call on List com.dmdirc.util.MapList:get(Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void configChanged(String, String)
    //#    unanalyzed callee: List com.dmdirc.util.MapList:get(Object)
        }

        for (ConfigChangeListener listener : targets) {
            listener.configChanged(domain, key);
    //#ConfigManager.java:425: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.interfaces.ConfigChangeListener:configChanged(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.config.ConfigManager
    //#    method: void configChanged(String, String)
    //#    unanalyzed callee: void com.dmdirc.interfaces.ConfigChangeListener:configChanged(String, String)
        }
    }
    //#ConfigManager.java:427: end of method: void com.dmdirc.config.ConfigManager.configChanged(String, String)
}
    //#ConfigManager.java:: end of class: com.dmdirc.config.ConfigManager$1
    //#ConfigManager.java:: end of class: com.dmdirc.config.ConfigManager
