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

package com.dmdirc.ui.themes;

import com.dmdirc.config.IdentityManager;
import com.dmdirc.config.InvalidIdentityFileException;
import com.dmdirc.logger.ErrorLevel;
import com.dmdirc.logger.Logger;
import com.dmdirc.util.ConfigFile;
import com.dmdirc.util.InvalidConfigFileException;
import com.dmdirc.util.resourcemanager.ZipResourceManager;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

/**
 * Represents one theme file.
 *
 * @author Chris
 */
public class Theme implements Comparable<Theme> {
    //#Theme.java:42: method: int com.dmdirc.ui.themes.Theme.compareTo(Object)
    //#input(int compareTo(Object)): __Descendant_Table[com/dmdirc/ui/themes/Theme]
    //#input(int compareTo(Object)): __Descendant_Table[others]
    //#input(int compareTo(Object)): __Dispatch_Table.compareTo(Lcom/dmdirc/ui/themes/Theme;)I
    //#input(int compareTo(Object)): __Dispatch_Table.getFileName(Z)Ljava/lang/String;
    //#input(int compareTo(Object)): __Dispatch_Table.getName()Ljava/lang/String;
    //#input(int compareTo(Object)): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(int compareTo(Object)): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(int compareTo(Object)): com/dmdirc/util/ConfigFile.__Dispatch_Table.getKeyDomain(Ljava/lang/String;)Ljava/util/Map;
    //#input(int compareTo(Object)): com/dmdirc/util/ConfigFile.__Dispatch_Table.isKeyDomain(Ljava/lang/String;)Z
    //#input(int compareTo(Object)): this
    //#input(int compareTo(Object)): this.__Tag
    //#input(int compareTo(Object)): this.file
    //#input(int compareTo(Object)): this.metadata
    //#input(int compareTo(Object)): this.metadata.__Tag
    //#input(int compareTo(Object)): this.metadata.automake
    //#input(int compareTo(Object)): this.metadata.domains
    //#input(int compareTo(Object)): this.metadata.keydomains
    //#input(int compareTo(Object)): x0
    //#input(int compareTo(Object)): x0.__Tag
    //#input(int compareTo(Object)): x0.file
    //#input(int compareTo(Object)): x0.metadata
    //#input(int compareTo(Object)): x0.metadata.__Tag
    //#input(int compareTo(Object)): x0.metadata.automake
    //#input(int compareTo(Object)): x0.metadata.domains
    //#input(int compareTo(Object)): x0.metadata.keydomains
    //#output(int compareTo(Object)): return_value
    //#pre[2] (int compareTo(Object)): this.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[3] (int compareTo(Object)): this.file != null
    //#pre[4] (int compareTo(Object)): init'ed(this.metadata)
    //#pre[9] (int compareTo(Object)): x0 != null
    //#pre[10] (int compareTo(Object)): x0.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[11] (int compareTo(Object)): x0.file != null
    //#pre[12] (int compareTo(Object)): init'ed(x0.metadata)
    //#pre[5] (int compareTo(Object)): (soft) this.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[6] (int compareTo(Object)): (soft) init'ed(this.metadata.automake)
    //#pre[7] (int compareTo(Object)): (soft) this.metadata.domains != null
    //#pre[8] (int compareTo(Object)): (soft) this.metadata.keydomains != null
    //#pre[13] (int compareTo(Object)): (soft) x0.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[14] (int compareTo(Object)): (soft) init'ed(x0.metadata.automake)
    //#pre[15] (int compareTo(Object)): (soft) x0.metadata.domains != null
    //#pre[16] (int compareTo(Object)): (soft) x0.metadata.keydomains != null
    //#post(int compareTo(Object)): init'ed(return_value)
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.io.File:getName
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:getName
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.lang.String:compareTo
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:getMetaData
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.util.List:add
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(int compareTo(Object)): Effects-of-calling:java.util.Map:get
    //#Theme.java:42: end of method: int com.dmdirc.ui.themes.Theme.compareTo(Object)

    /** The file to load the theme from. */
    private final File file;

    /** The config file containing theme meta-data. */
    private ConfigFile metadata;

    /** The resource manager we're using for this theme. */
    private ZipResourceManager rm;

    /** Whether or not this theme is enabled. */
    private boolean enabled;
    
    /** The Identity we've registered. */
    private ThemeIdentity identity;

    /**
     * Creates a new instance of Theme.
     *
     * @param file The file to load the theme from
     */
    public Theme(final File file) {
    //#Theme.java:64: method: void com.dmdirc.ui.themes.Theme.com.dmdirc.ui.themes.Theme(File)
    //#input(void com.dmdirc.ui.themes.Theme(File)): file
    //#input(void com.dmdirc.ui.themes.Theme(File)): this
    //#output(void com.dmdirc.ui.themes.Theme(File)): this.file
    //#post(void com.dmdirc.ui.themes.Theme(File)): this.file == file
    //#post(void com.dmdirc.ui.themes.Theme(File)): init'ed(this.file)
        this.file = file;
    }
    //#Theme.java:66: end of method: void com.dmdirc.ui.themes.Theme.com.dmdirc.ui.themes.Theme(File)

    /**
     * Determines if this theme is valid or not (i.e., it is a valid zip file,
     * and it contains one file).
     *
     * @return True if the theme is valid, false otherwise
     */
    public boolean isValidTheme() {
        if (rm == null) {
    //#Theme.java:75: method: bool com.dmdirc.ui.themes.Theme.isValidTheme()
    //#input(bool isValidTheme()): ": "._tainted
    //#input(bool isValidTheme()): "I.O error when loading theme: "._tainted
    //#input(bool isValidTheme()): "Unknown or unexpected line encountered: "._tainted
    //#input(bool isValidTheme()): com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(bool isValidTheme()): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(bool isValidTheme()): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(bool isValidTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.getLines()Ljava/util/List;
    //#input(bool isValidTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.read()V
    //#input(bool isValidTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.readLines()V
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Descendant_Table[com/dmdirc/util/MapList]
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Descendant_Table[com/dmdirc/util/WeakMapList]
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Descendant_Table[others]
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Dispatch_Table.add(Ljava/lang/Object;)V
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Dispatch_Table.add(Ljava/lang/Object;Ljava/lang/Object;)V
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Dispatch_Table.clear()V
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Dispatch_Table.containsKey(Ljava/lang/Object;)Z
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Dispatch_Table.containsValue(Ljava/lang/Object;Ljava/lang/Object;)Z
    //#input(bool isValidTheme()): com/dmdirc/util/MapList.__Dispatch_Table.safeGet(Ljava/lang/Object;)Ljava/util/List;
    //#input(bool isValidTheme()): com/dmdirc/util/TextFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(bool isValidTheme()): com/dmdirc/util/TextFile.__Descendant_Table[com/dmdirc/util/TextFile]
    //#input(bool isValidTheme()): com/dmdirc/util/TextFile.__Descendant_Table[others]
    //#input(bool isValidTheme()): com/dmdirc/util/TextFile.__Dispatch_Table.readLines()V
    //#input(bool isValidTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.add(Ljava/lang/Object;)V
    //#input(bool isValidTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.add(Ljava/lang/Object;Ljava/lang/Object;)V
    //#input(bool isValidTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.clear()V
    //#input(bool isValidTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.containsKey(Ljava/lang/Object;)Z
    //#input(bool isValidTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.containsValue(Ljava/lang/Object;Ljava/lang/Object;)Z
    //#input(bool isValidTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.safeGet(Ljava/lang/Object;)Ljava/util/List;
    //#input(bool isValidTheme()): com/dmdirc/util/resourcemanager/ZipResourceManager.__Class_Obj.__Lock
    //#input(bool isValidTheme()): this
    //#input(bool isValidTheme()): this.file
    //#input(bool isValidTheme()): this.metadata.__Tag
    //#input(bool isValidTheme()): this.metadata.charset
    //#input(bool isValidTheme()): this.metadata.domains
    //#input(bool isValidTheme()): this.metadata.file
    //#input(bool isValidTheme()): this.metadata.flatdomains
    //#input(bool isValidTheme()): this.metadata.flatdomains.__Tag
    //#input(bool isValidTheme()): this.metadata.flatdomains.map
    //#input(bool isValidTheme()): this.metadata.is
    //#input(bool isValidTheme()): this.metadata.keydomains
    //#input(bool isValidTheme()): this.rm
    //#input(bool isValidTheme()): this.rm.zipFile
    //#output(bool isValidTheme()): new ArrayList(ConfigFile#1) num objects
    //#output(bool isValidTheme()): new ArrayList(ZipResourceManager#2) num objects
    //#output(bool isValidTheme()): new ArrayList(readLines#4) num objects
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2) num objects
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).__Tag
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).charset
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).domains
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).file
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).flatdomains
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).is
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).keydomains
    //#output(bool isValidTheme()): new ConfigFile(isValidTheme#2).lines
    //#output(bool isValidTheme()): new HashMap(ConfigFile#3) num objects
    //#output(bool isValidTheme()): new HashMap(MapList#1) num objects
    //#output(bool isValidTheme()): new MapList(ConfigFile#2) num objects
    //#output(bool isValidTheme()): new MapList(ConfigFile#2).__Tag
    //#output(bool isValidTheme()): new MapList(ConfigFile#2).map
    //#output(bool isValidTheme()): new ZipFile(ZipResourceManager#1) num objects
    //#output(bool isValidTheme()): new ZipResourceManager(getInstance#1) num objects
    //#output(bool isValidTheme()): new ZipResourceManager(getInstance#1).__Tag
    //#output(bool isValidTheme()): new ZipResourceManager(getInstance#1).entries
    //#output(bool isValidTheme()): new ZipResourceManager(getInstance#1).zipFile
    //#output(bool isValidTheme()): return_value
    //#output(bool isValidTheme()): this.metadata
    //#output(bool isValidTheme()): this.metadata.lines
    //#output(bool isValidTheme()): this.rm
    //#new obj(bool isValidTheme()): new ArrayList(ConfigFile#1)
    //#new obj(bool isValidTheme()): new ArrayList(ZipResourceManager#2)
    //#new obj(bool isValidTheme()): new ArrayList(readLines#4)
    //#new obj(bool isValidTheme()): new ConfigFile(isValidTheme#2)
    //#new obj(bool isValidTheme()): new HashMap(ConfigFile#3)
    //#new obj(bool isValidTheme()): new HashMap(MapList#1)
    //#new obj(bool isValidTheme()): new MapList(ConfigFile#2)
    //#new obj(bool isValidTheme()): new ZipFile(ZipResourceManager#1)
    //#new obj(bool isValidTheme()): new ZipResourceManager(getInstance#1)
    //#pre[3] (bool isValidTheme()): init'ed(this.rm)
    //#pre[5] (bool isValidTheme()): (soft) this.file != null
    //#pre[6] (bool isValidTheme()): (soft) this.rm.zipFile != null
    //#presumption(bool isValidTheme()): init'ed(com.dmdirc.logger.ErrorLevel.MEDIUM)
    //#post(bool isValidTheme()): init'ed(return_value)
    //#post(bool isValidTheme()): this.metadata == One-of{old this.metadata, &new ConfigFile(isValidTheme#2), null}
    //#post(bool isValidTheme()): possibly_updated(this.metadata.lines)
    //#post(bool isValidTheme()): this.rm == One-of{old this.rm, &new ZipResourceManager(getInstance#1)}
    //#post(bool isValidTheme()): init'ed(this.rm)
    //#post(bool isValidTheme()): new ArrayList(ConfigFile#1) num objects <= 1
    //#post(bool isValidTheme()): new ArrayList(ZipResourceManager#2) num objects <= 1
    //#post(bool isValidTheme()): new ArrayList(readLines#4) num objects == 0
    //#post(bool isValidTheme()): new ConfigFile(isValidTheme#2) num objects <= 1
    //#post(bool isValidTheme()): new ConfigFile(isValidTheme#2).__Tag == com/dmdirc/util/ConfigFile
    //#post(bool isValidTheme()): init'ed(new ConfigFile(isValidTheme#2).charset)
    //#post(bool isValidTheme()): new ConfigFile(isValidTheme#2).domains == &new ArrayList(ConfigFile#1)
    //#post(bool isValidTheme()): init'ed(new ConfigFile(isValidTheme#2).file)
    //#post(bool isValidTheme()): new ConfigFile(isValidTheme#2).flatdomains == &new MapList(ConfigFile#2)
    //#post(bool isValidTheme()): init'ed(new ConfigFile(isValidTheme#2).is)
    //#post(bool isValidTheme()): new ConfigFile(isValidTheme#2).keydomains == &new HashMap(ConfigFile#3)
    //#post(bool isValidTheme()): init'ed(new ConfigFile(isValidTheme#2).lines)
    //#post(bool isValidTheme()): new HashMap(ConfigFile#3) num objects <= 1
    //#post(bool isValidTheme()): new HashMap(MapList#1) num objects <= 1
    //#post(bool isValidTheme()): new MapList(ConfigFile#2) num objects <= 1
    //#post(bool isValidTheme()): new MapList(ConfigFile#2).__Tag == com/dmdirc/util/MapList
    //#post(bool isValidTheme()): new MapList(ConfigFile#2).map == &new HashMap(MapList#1)
    //#post(bool isValidTheme()): new ZipFile(ZipResourceManager#1) num objects <= 1
    //#post(bool isValidTheme()): new ZipResourceManager(getInstance#1) num objects <= 1
    //#post(bool isValidTheme()): new ZipResourceManager(getInstance#1).__Tag == com/dmdirc/util/resourcemanager/ZipResourceManager
    //#post(bool isValidTheme()): new ZipResourceManager(getInstance#1).entries == &new ArrayList(ZipResourceManager#2)
    //#post(bool isValidTheme()): new ZipResourceManager(getInstance#1).zipFile == &new ZipFile(ZipResourceManager#1)
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.List:add
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.zip.ZipFile:getEntry
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.zip.ZipFile:getInputStream
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.zip.ZipFile
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.zip.ZipFile:entries
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Enumeration:hasMoreElements
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Enumeration:nextElement
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.zip.ZipEntry:getName
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.zip.ZipEntry:isDirectory
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.Map:clear
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.List:clear
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.io.InputStreamReader
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.io.BufferedReader
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.io.BufferedReader:readLine
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.io.BufferedReader:close
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.String:endsWith
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.util.List:contains
    //#unanalyzed(bool isValidTheme()): Effects-of-calling:java.lang.Exception
    //#test_vector(bool isValidTheme()): this.rm: Inverse{null}, Addr_Set{null}
            try {
                rm = ZipResourceManager.getInstance(file.getCanonicalPath());
            } catch (IOException ex) {
                Logger.userError(ErrorLevel.MEDIUM, "I/O error when loading theme: "
    //#Theme.java:79: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: bool isValidTheme()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
                        + file.getAbsolutePath() + ": " + ex.getMessage());

                return false;
            }

            if (rm != null && rm.resourceExists("theme.config")) {
    //#Theme.java:85: Warning: test always goes same way
    //#    Test predetermined because this.rm != null
    //#    severity: LOW
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: bool isValidTheme()
    //#    from bb: bb_5
    //#    live edge: bb_5-->bb_6
    //#    tested vn: 0
    //#    tested vn values: {0}
                metadata = new ConfigFile(rm.getResourceInputStream("theme.config"));
                
                try {
                    metadata.read();
                } catch (IOException ex) {
                    metadata = null;
                } catch (InvalidConfigFileException ex) {
                    metadata = null;
                }
            }
        }

        return rm != null && rm.resourceExists("config");
    //#Theme.java:98: end of method: bool com.dmdirc.ui.themes.Theme.isValidTheme()
    }

    /**
     * Applies this theme to the client.
     */
    public void applyTheme() {
        if (!isValidTheme() || rm == null || enabled) {
    //#Theme.java:105: method: void com.dmdirc.ui.themes.Theme.applyTheme()
    //#input(void applyTheme()): ": "._tainted
    //#input(void applyTheme()): "Error loading theme identity file: "._tainted
    //#input(void applyTheme()): "I.O error when loading theme: "._tainted
    //#input(void applyTheme()): "Unknown or unexpected line encountered: "._tainted
    //#input(void applyTheme()): __Descendant_Table[com/dmdirc/ui/themes/Theme]
    //#input(void applyTheme()): __Descendant_Table[others]
    //#input(void applyTheme()): __Dispatch_Table.isValidTheme()Z
    //#input(void applyTheme()): com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(void applyTheme()): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(void applyTheme()): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(void applyTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.getLines()Ljava/util/List;
    //#input(void applyTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.read()V
    //#input(void applyTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.readLines()V
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Descendant_Table[com/dmdirc/util/MapList]
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Descendant_Table[com/dmdirc/util/WeakMapList]
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Descendant_Table[others]
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Dispatch_Table.add(Ljava/lang/Object;)V
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Dispatch_Table.add(Ljava/lang/Object;Ljava/lang/Object;)V
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Dispatch_Table.clear()V
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Dispatch_Table.containsKey(Ljava/lang/Object;)Z
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Dispatch_Table.containsValue(Ljava/lang/Object;Ljava/lang/Object;)Z
    //#input(void applyTheme()): com/dmdirc/util/MapList.__Dispatch_Table.safeGet(Ljava/lang/Object;)Ljava/util/List;
    //#input(void applyTheme()): com/dmdirc/util/TextFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(void applyTheme()): com/dmdirc/util/TextFile.__Descendant_Table[com/dmdirc/util/TextFile]
    //#input(void applyTheme()): com/dmdirc/util/TextFile.__Descendant_Table[others]
    //#input(void applyTheme()): com/dmdirc/util/TextFile.__Dispatch_Table.readLines()V
    //#input(void applyTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.add(Ljava/lang/Object;)V
    //#input(void applyTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.add(Ljava/lang/Object;Ljava/lang/Object;)V
    //#input(void applyTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.clear()V
    //#input(void applyTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.containsKey(Ljava/lang/Object;)Z
    //#input(void applyTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.containsValue(Ljava/lang/Object;Ljava/lang/Object;)Z
    //#input(void applyTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.safeGet(Ljava/lang/Object;)Ljava/util/List;
    //#input(void applyTheme()): com/dmdirc/util/resourcemanager/ZipResourceManager.__Class_Obj.__Lock
    //#input(void applyTheme()): this
    //#input(void applyTheme()): this.__Tag
    //#input(void applyTheme()): this.enabled
    //#input(void applyTheme()): this.file
    //#input(void applyTheme()): this.metadata.__Tag
    //#input(void applyTheme()): this.metadata.charset
    //#input(void applyTheme()): this.metadata.domains
    //#input(void applyTheme()): this.metadata.flatdomains
    //#input(void applyTheme()): this.metadata.flatdomains.__Tag
    //#input(void applyTheme()): this.metadata.flatdomains.map
    //#input(void applyTheme()): this.metadata.keydomains
    //#input(void applyTheme()): this.rm
    //#input(void applyTheme()): this.rm.zipFile
    //#output(void applyTheme()): new ArrayList(ConfigFile#1) num objects
    //#output(void applyTheme()): new ArrayList(ZipResourceManager#2) num objects
    //#output(void applyTheme()): new ArrayList(readLines#4) num objects
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2) num objects
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).__Tag
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).charset
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).domains
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).file
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).flatdomains
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).is
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).keydomains
    //#output(void applyTheme()): new ConfigFile(isValidTheme#2).lines
    //#output(void applyTheme()): new HashMap(ConfigFile#3) num objects
    //#output(void applyTheme()): new HashMap(MapList#1) num objects
    //#output(void applyTheme()): new MapList(ConfigFile#2) num objects
    //#output(void applyTheme()): new MapList(ConfigFile#2).__Tag
    //#output(void applyTheme()): new MapList(ConfigFile#2).map
    //#output(void applyTheme()): new ThemeIdentity(applyTheme#1) num objects
    //#output(void applyTheme()): new ThemeIdentity(applyTheme#1).__Tag
    //#output(void applyTheme()): new ThemeIdentity(applyTheme#1).myTarget
    //#output(void applyTheme()): new ThemeIdentity(applyTheme#1).theme
    //#output(void applyTheme()): new ZipFile(ZipResourceManager#1) num objects
    //#output(void applyTheme()): new ZipResourceManager(getInstance#1) num objects
    //#output(void applyTheme()): new ZipResourceManager(getInstance#1).__Tag
    //#output(void applyTheme()): new ZipResourceManager(getInstance#1).entries
    //#output(void applyTheme()): new ZipResourceManager(getInstance#1).zipFile
    //#output(void applyTheme()): this.enabled
    //#output(void applyTheme()): this.identity
    //#output(void applyTheme()): this.metadata
    //#output(void applyTheme()): this.metadata.lines
    //#output(void applyTheme()): this.rm
    //#new obj(void applyTheme()): new ArrayList(ConfigFile#1)
    //#new obj(void applyTheme()): new ArrayList(ZipResourceManager#2)
    //#new obj(void applyTheme()): new ArrayList(readLines#4)
    //#new obj(void applyTheme()): new ConfigFile(isValidTheme#2)
    //#new obj(void applyTheme()): new HashMap(ConfigFile#3)
    //#new obj(void applyTheme()): new HashMap(MapList#1)
    //#new obj(void applyTheme()): new MapList(ConfigFile#2)
    //#new obj(void applyTheme()): new ThemeIdentity(applyTheme#1)
    //#new obj(void applyTheme()): new ZipFile(ZipResourceManager#1)
    //#new obj(void applyTheme()): new ZipResourceManager(getInstance#1)
    //#pre[7] (void applyTheme()): this.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[1] (void applyTheme()): (soft) init'ed(this.enabled)
    //#pre[5] (void applyTheme()): (soft) init'ed(this.rm)
    //#pre[8] (void applyTheme()): (soft) this.file != null
    //#pre[18] (void applyTheme()): (soft) this.rm.zipFile != null
    //#presumption(void applyTheme()): init'ed(com.dmdirc.logger.ErrorLevel.MEDIUM)
    //#presumption(void applyTheme()): this.rm.zipFile@105 != null
    //#post(void applyTheme()): init'ed(this.enabled)
    //#post(void applyTheme()): this.identity == One-of{old this.identity, &new ThemeIdentity(applyTheme#1)}
    //#post(void applyTheme()): this.metadata == One-of{old this.metadata, &new ConfigFile(isValidTheme#2), null}
    //#post(void applyTheme()): init'ed(this.metadata.lines)
    //#post(void applyTheme()): this.rm == One-of{old this.rm, &new ZipResourceManager(getInstance#1)}
    //#post(void applyTheme()): init'ed(this.rm)
    //#post(void applyTheme()): new ArrayList(ConfigFile#1) num objects <= 1
    //#post(void applyTheme()): new ConfigFile(isValidTheme#2) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void applyTheme()): new HashMap(ConfigFile#3) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void applyTheme()): new HashMap(MapList#1) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void applyTheme()): new MapList(ConfigFile#2) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void applyTheme()): new ArrayList(ZipResourceManager#2) num objects <= 1
    //#post(void applyTheme()): new ZipFile(ZipResourceManager#1) num objects == new ArrayList(ZipResourceManager#2) num objects
    //#post(void applyTheme()): new ZipResourceManager(getInstance#1) num objects == new ArrayList(ZipResourceManager#2) num objects
    //#post(void applyTheme()): new ArrayList(readLines#4) num objects == 0
    //#post(void applyTheme()): new ConfigFile(isValidTheme#2).__Tag == com/dmdirc/util/ConfigFile
    //#post(void applyTheme()): init'ed(new ConfigFile(isValidTheme#2).charset)
    //#post(void applyTheme()): new ConfigFile(isValidTheme#2).domains == &new ArrayList(ConfigFile#1)
    //#post(void applyTheme()): init'ed(new ConfigFile(isValidTheme#2).file)
    //#post(void applyTheme()): new ConfigFile(isValidTheme#2).flatdomains == &new MapList(ConfigFile#2)
    //#post(void applyTheme()): init'ed(new ConfigFile(isValidTheme#2).is)
    //#post(void applyTheme()): new ConfigFile(isValidTheme#2).keydomains == &new HashMap(ConfigFile#3)
    //#post(void applyTheme()): init'ed(new ConfigFile(isValidTheme#2).lines)
    //#post(void applyTheme()): new MapList(ConfigFile#2).__Tag == com/dmdirc/util/MapList
    //#post(void applyTheme()): new MapList(ConfigFile#2).map == &new HashMap(MapList#1)
    //#post(void applyTheme()): new ThemeIdentity(applyTheme#1) num objects <= 1
    //#post(void applyTheme()): init'ed(new ThemeIdentity(applyTheme#1).__Tag)
    //#post(void applyTheme()): init'ed(new ThemeIdentity(applyTheme#1).myTarget)
    //#post(void applyTheme()): init'ed(new ThemeIdentity(applyTheme#1).theme)
    //#post(void applyTheme()): new ZipResourceManager(getInstance#1).__Tag == com/dmdirc/util/resourcemanager/ZipResourceManager
    //#post(void applyTheme()): new ZipResourceManager(getInstance#1).entries == &new ArrayList(ZipResourceManager#2)
    //#post(void applyTheme()): new ZipResourceManager(getInstance#1).zipFile == &new ZipFile(ZipResourceManager#1)
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.List:add
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.zip.ZipFile:getEntry
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.zip.ZipFile:getInputStream
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void applyTheme()): Effects-of-calling:com.dmdirc.config.Identity
    //#unanalyzed(void applyTheme()): Effects-of-calling:com.dmdirc.config.ConfigTarget:setTheme
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void applyTheme()): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.IOException:getMessage
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.File:getCanonicalPath
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.zip.ZipFile
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.zip.ZipFile:entries
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Enumeration:hasMoreElements
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Enumeration:nextElement
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.zip.ZipEntry:getName
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.zip.ZipEntry:isDirectory
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.Map:clear
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.List:clear
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.InputStreamReader
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.BufferedReader
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.BufferedReader:readLine
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.BufferedReader:close
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.String:endsWith
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.util.List:contains
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.lang.Exception
    //#unanalyzed(void applyTheme()): Effects-of-calling:java.io.File:getAbsolutePath
    //#test_vector(void applyTheme()): this.enabled: {0}, {1}
            return;
        }

        enabled = true;

        final InputStream stream = rm.getResourceInputStream("config");

        if (stream != null) {
            try {
                identity = new ThemeIdentity(stream, this);
                IdentityManager.addIdentity(identity);
    //#Theme.java:116: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.IdentityManager:addIdentity(Identity)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: void applyTheme()
    //#    unanalyzed callee: void com.dmdirc.config.IdentityManager:addIdentity(Identity)
            } catch (InvalidIdentityFileException ex) {
                Logger.userError(ErrorLevel.MEDIUM, "Error loading theme identity file: "
    //#Theme.java:118: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.InvalidIdentityFileException:getMessage()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: void applyTheme()
    //#    unanalyzed callee: String com.dmdirc.config.InvalidIdentityFileException:getMessage()
    //#Theme.java:118: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: void applyTheme()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
                        + ex.getMessage());
            } catch (IOException ex) {
                Logger.userError(ErrorLevel.MEDIUM, "Error loading theme identity file: "
    //#Theme.java:121: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: void applyTheme()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
                        + ex.getMessage());
            }
        }
    }
    //#Theme.java:125: end of method: void com.dmdirc.ui.themes.Theme.applyTheme()
    
    /**
     * Removes the effects of this theme.
     */
    public void removeTheme() {
        if (!isValidTheme() || !enabled || identity == null) {
    //#Theme.java:131: method: void com.dmdirc.ui.themes.Theme.removeTheme()
    //#input(void removeTheme()): ": "._tainted
    //#input(void removeTheme()): "I.O error when loading theme: "._tainted
    //#input(void removeTheme()): "Unknown or unexpected line encountered: "._tainted
    //#input(void removeTheme()): __Descendant_Table[com/dmdirc/ui/themes/Theme]
    //#input(void removeTheme()): __Descendant_Table[others]
    //#input(void removeTheme()): __Dispatch_Table.isValidTheme()Z
    //#input(void removeTheme()): com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(void removeTheme()): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(void removeTheme()): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(void removeTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.getLines()Ljava/util/List;
    //#input(void removeTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.read()V
    //#input(void removeTheme()): com/dmdirc/util/ConfigFile.__Dispatch_Table.readLines()V
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Descendant_Table[com/dmdirc/util/MapList]
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Descendant_Table[com/dmdirc/util/WeakMapList]
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Descendant_Table[others]
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Dispatch_Table.add(Ljava/lang/Object;)V
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Dispatch_Table.add(Ljava/lang/Object;Ljava/lang/Object;)V
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Dispatch_Table.clear()V
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Dispatch_Table.containsKey(Ljava/lang/Object;)Z
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Dispatch_Table.containsValue(Ljava/lang/Object;Ljava/lang/Object;)Z
    //#input(void removeTheme()): com/dmdirc/util/MapList.__Dispatch_Table.safeGet(Ljava/lang/Object;)Ljava/util/List;
    //#input(void removeTheme()): com/dmdirc/util/TextFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(void removeTheme()): com/dmdirc/util/TextFile.__Descendant_Table[com/dmdirc/util/TextFile]
    //#input(void removeTheme()): com/dmdirc/util/TextFile.__Descendant_Table[others]
    //#input(void removeTheme()): com/dmdirc/util/TextFile.__Dispatch_Table.readLines()V
    //#input(void removeTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.add(Ljava/lang/Object;)V
    //#input(void removeTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.add(Ljava/lang/Object;Ljava/lang/Object;)V
    //#input(void removeTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.clear()V
    //#input(void removeTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.containsKey(Ljava/lang/Object;)Z
    //#input(void removeTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.containsValue(Ljava/lang/Object;Ljava/lang/Object;)Z
    //#input(void removeTheme()): com/dmdirc/util/WeakMapList.__Dispatch_Table.safeGet(Ljava/lang/Object;)Ljava/util/List;
    //#input(void removeTheme()): com/dmdirc/util/resourcemanager/ZipResourceManager.__Class_Obj.__Lock
    //#input(void removeTheme()): this
    //#input(void removeTheme()): this.__Tag
    //#input(void removeTheme()): this.enabled
    //#input(void removeTheme()): this.file
    //#input(void removeTheme()): this.identity
    //#input(void removeTheme()): this.metadata.__Tag
    //#input(void removeTheme()): this.metadata.charset
    //#input(void removeTheme()): this.metadata.domains
    //#input(void removeTheme()): this.metadata.flatdomains
    //#input(void removeTheme()): this.metadata.flatdomains.__Tag
    //#input(void removeTheme()): this.metadata.flatdomains.map
    //#input(void removeTheme()): this.metadata.keydomains
    //#input(void removeTheme()): this.rm
    //#input(void removeTheme()): this.rm.zipFile
    //#output(void removeTheme()): new ArrayList(ConfigFile#1) num objects
    //#output(void removeTheme()): new ArrayList(ZipResourceManager#2) num objects
    //#output(void removeTheme()): new ArrayList(readLines#4) num objects
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2) num objects
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).__Tag
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).charset
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).domains
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).file
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).flatdomains
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).is
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).keydomains
    //#output(void removeTheme()): new ConfigFile(isValidTheme#2).lines
    //#output(void removeTheme()): new HashMap(ConfigFile#3) num objects
    //#output(void removeTheme()): new HashMap(MapList#1) num objects
    //#output(void removeTheme()): new MapList(ConfigFile#2) num objects
    //#output(void removeTheme()): new MapList(ConfigFile#2).__Tag
    //#output(void removeTheme()): new MapList(ConfigFile#2).map
    //#output(void removeTheme()): new ZipFile(ZipResourceManager#1) num objects
    //#output(void removeTheme()): new ZipResourceManager(getInstance#1) num objects
    //#output(void removeTheme()): new ZipResourceManager(getInstance#1).__Tag
    //#output(void removeTheme()): new ZipResourceManager(getInstance#1).entries
    //#output(void removeTheme()): new ZipResourceManager(getInstance#1).zipFile
    //#output(void removeTheme()): this.enabled
    //#output(void removeTheme()): this.metadata
    //#output(void removeTheme()): this.metadata.lines
    //#output(void removeTheme()): this.rm
    //#new obj(void removeTheme()): new ArrayList(ConfigFile#1)
    //#new obj(void removeTheme()): new ArrayList(ZipResourceManager#2)
    //#new obj(void removeTheme()): new ArrayList(readLines#4)
    //#new obj(void removeTheme()): new ConfigFile(isValidTheme#2)
    //#new obj(void removeTheme()): new HashMap(ConfigFile#3)
    //#new obj(void removeTheme()): new HashMap(MapList#1)
    //#new obj(void removeTheme()): new MapList(ConfigFile#2)
    //#new obj(void removeTheme()): new ZipFile(ZipResourceManager#1)
    //#new obj(void removeTheme()): new ZipResourceManager(getInstance#1)
    //#pre[4] (void removeTheme()): init'ed(this.rm)
    //#pre[6] (void removeTheme()): this.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[1] (void removeTheme()): (soft) init'ed(this.enabled)
    //#pre[7] (void removeTheme()): (soft) this.file != null
    //#pre[8] (void removeTheme()): (soft) init'ed(this.identity)
    //#pre[18] (void removeTheme()): (soft) this.rm.zipFile != null
    //#post(void removeTheme()): init'ed(this.enabled)
    //#post(void removeTheme()): this.metadata == One-of{old this.metadata, &new ConfigFile(isValidTheme#2), null}
    //#post(void removeTheme()): init'ed(this.metadata.lines)
    //#post(void removeTheme()): this.rm == One-of{old this.rm, &new ZipResourceManager(getInstance#1)}
    //#post(void removeTheme()): init'ed(this.rm)
    //#post(void removeTheme()): new ArrayList(ConfigFile#1) num objects <= 1
    //#post(void removeTheme()): new ConfigFile(isValidTheme#2) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void removeTheme()): new HashMap(ConfigFile#3) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void removeTheme()): new HashMap(MapList#1) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void removeTheme()): new MapList(ConfigFile#2) num objects == new ArrayList(ConfigFile#1) num objects
    //#post(void removeTheme()): new ArrayList(ZipResourceManager#2) num objects <= 1
    //#post(void removeTheme()): new ZipFile(ZipResourceManager#1) num objects == new ArrayList(ZipResourceManager#2) num objects
    //#post(void removeTheme()): new ZipResourceManager(getInstance#1) num objects == new ArrayList(ZipResourceManager#2) num objects
    //#post(void removeTheme()): new ArrayList(readLines#4) num objects == 0
    //#post(void removeTheme()): new ConfigFile(isValidTheme#2).__Tag == com/dmdirc/util/ConfigFile
    //#post(void removeTheme()): init'ed(new ConfigFile(isValidTheme#2).charset)
    //#post(void removeTheme()): new ConfigFile(isValidTheme#2).domains == &new ArrayList(ConfigFile#1)
    //#post(void removeTheme()): init'ed(new ConfigFile(isValidTheme#2).file)
    //#post(void removeTheme()): new ConfigFile(isValidTheme#2).flatdomains == &new MapList(ConfigFile#2)
    //#post(void removeTheme()): init'ed(new ConfigFile(isValidTheme#2).is)
    //#post(void removeTheme()): new ConfigFile(isValidTheme#2).keydomains == &new HashMap(ConfigFile#3)
    //#post(void removeTheme()): init'ed(new ConfigFile(isValidTheme#2).lines)
    //#post(void removeTheme()): new MapList(ConfigFile#2).__Tag == com/dmdirc/util/MapList
    //#post(void removeTheme()): new MapList(ConfigFile#2).map == &new HashMap(MapList#1)
    //#post(void removeTheme()): new ZipResourceManager(getInstance#1).__Tag == com/dmdirc/util/resourcemanager/ZipResourceManager
    //#post(void removeTheme()): new ZipResourceManager(getInstance#1).entries == &new ArrayList(ZipResourceManager#2)
    //#post(void removeTheme()): new ZipResourceManager(getInstance#1).zipFile == &new ZipFile(ZipResourceManager#1)
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.List:add
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.zip.ZipFile:getEntry
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.zip.ZipFile:getInputStream
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void removeTheme()): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.IOException:getMessage
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.File:getCanonicalPath
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.zip.ZipFile
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.zip.ZipFile:entries
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Enumeration:hasMoreElements
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Enumeration:nextElement
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.zip.ZipEntry:getName
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.zip.ZipEntry:isDirectory
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.nio.charset.Charset:forName
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.Map:clear
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.List:clear
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.InputStreamReader
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.BufferedReader
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.BufferedReader:readLine
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.BufferedReader:close
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.String:endsWith
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.util.List:contains
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.lang.Exception
    //#unanalyzed(void removeTheme()): Effects-of-calling:java.io.File:getAbsolutePath
    //#test_vector(void removeTheme()): this.enabled: {0}, {1}
    //#test_vector(void removeTheme()): this.identity: Inverse{null}, Addr_Set{null}
            return;
        }
        
        enabled = false;
        
        IdentityManager.removeIdentity(identity);
    //#Theme.java:137: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.IdentityManager:removeIdentity(Identity)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: void removeTheme()
    //#    unanalyzed callee: void com.dmdirc.config.IdentityManager:removeIdentity(Identity)
    }
    //#Theme.java:138: end of method: void com.dmdirc.ui.themes.Theme.removeTheme()

    /**
     * Determines if this theme is enabled or not.
     *
     * @return True if the theme is enabled, false otherwise.
     */
    public boolean isEnabled() {
        return enabled;
    //#Theme.java:146: method: bool com.dmdirc.ui.themes.Theme.isEnabled()
    //#input(bool isEnabled()): this
    //#input(bool isEnabled()): this.enabled
    //#output(bool isEnabled()): return_value
    //#pre[2] (bool isEnabled()): init'ed(this.enabled)
    //#post(bool isEnabled()): return_value == this.enabled
    //#post(bool isEnabled()): init'ed(return_value)
    //#Theme.java:146: end of method: bool com.dmdirc.ui.themes.Theme.isEnabled()
    }

    /**
     * Retrieves the name of this theme.
     *
     * @param includeExtension Whether or not to include the file extension
     * @return This theme's name
     */
    public String getFileName(final boolean includeExtension) {
        String result = file.getName();
    //#Theme.java:156: method: String com.dmdirc.ui.themes.Theme.getFileName(bool)
    //#input(String getFileName(bool)): includeExtension
    //#input(String getFileName(bool)): this
    //#input(String getFileName(bool)): this.file
    //#output(String getFileName(bool)): java.lang.String:substring(...)._tainted
    //#output(String getFileName(bool)): return_value
    //#new obj(String getFileName(bool)): java.lang.String:substring(...)
    //#pre[3] (String getFileName(bool)): this.file != null
    //#presumption(String getFileName(bool)): java.io.File:getName(...)@156 != null
    //#post(String getFileName(bool)): java.lang.String:substring(...)._tainted == 0
    //#post(String getFileName(bool)): return_value != null
    //#test_vector(String getFileName(bool)): includeExtension: {1}, {0}
        
        if (!includeExtension) {
            result = result.substring(0, result.length() - 4);
        }
        
        return result;
    //#Theme.java:162: end of method: String com.dmdirc.ui.themes.Theme.getFileName(bool)
    }
    
    /**
     * Retrieves the name of this theme.
     *
     * @return This theme's name, with file extension
     */
    public String getFileName() {
        return getFileName(true);
    //#Theme.java:171: method: String com.dmdirc.ui.themes.Theme.getFileName()
    //#input(String getFileName()): __Descendant_Table[com/dmdirc/ui/themes/Theme]
    //#input(String getFileName()): __Descendant_Table[others]
    //#input(String getFileName()): __Dispatch_Table.getFileName(Z)Ljava/lang/String;
    //#input(String getFileName()): this
    //#input(String getFileName()): this.__Tag
    //#input(String getFileName()): this.file
    //#output(String getFileName()): java.lang.String:substring(...)._tainted
    //#output(String getFileName()): return_value
    //#new obj(String getFileName()): java.lang.String:substring(...)
    //#pre[2] (String getFileName()): this.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[3] (String getFileName()): this.file != null
    //#post(String getFileName()): java.lang.String:substring(...)._tainted == 0
    //#post(String getFileName()): return_value != null
    //#unanalyzed(String getFileName()): Effects-of-calling:java.io.File:getName
    //#unanalyzed(String getFileName()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(String getFileName()): Effects-of-calling:java.lang.String:substring
    //#Theme.java:171: end of method: String com.dmdirc.ui.themes.Theme.getFileName()
    }    

    /**
     * Retrieves the name of this theme.
     * 
     * @return This theme's name
     */    
    public String getName() {
        return getMetaData("name", getFileName(false));
    //#Theme.java:180: method: String com.dmdirc.ui.themes.Theme.getName()
    //#input(String getName()): __Descendant_Table[com/dmdirc/ui/themes/Theme]
    //#input(String getName()): __Descendant_Table[others]
    //#input(String getName()): __Dispatch_Table.getFileName(Z)Ljava/lang/String;
    //#input(String getName()): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(String getName()): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(String getName()): com/dmdirc/util/ConfigFile.__Dispatch_Table.getKeyDomain(Ljava/lang/String;)Ljava/util/Map;
    //#input(String getName()): com/dmdirc/util/ConfigFile.__Dispatch_Table.isKeyDomain(Ljava/lang/String;)Z
    //#input(String getName()): this
    //#input(String getName()): this.__Tag
    //#input(String getName()): this.file
    //#input(String getName()): this.metadata
    //#input(String getName()): this.metadata.__Tag
    //#input(String getName()): this.metadata.automake
    //#input(String getName()): this.metadata.domains
    //#input(String getName()): this.metadata.keydomains
    //#output(String getName()): java.lang.String:substring(...)._tainted
    //#output(String getName()): return_value
    //#new obj(String getName()): java.lang.String:substring(...)
    //#pre[2] (String getName()): this.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[3] (String getName()): this.file != null
    //#pre[4] (String getName()): init'ed(this.metadata)
    //#pre[5] (String getName()): (soft) this.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[6] (String getName()): (soft) init'ed(this.metadata.automake)
    //#pre[7] (String getName()): (soft) this.metadata.domains != null
    //#pre[8] (String getName()): (soft) this.metadata.keydomains != null
    //#post(String getName()): java.lang.String:substring(...)._tainted == 0
    //#post(String getName()): init'ed(return_value)
    //#unanalyzed(String getName()): Effects-of-calling:java.io.File:getName
    //#unanalyzed(String getName()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(String getName()): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(String getName()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(String getName()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(String getName()): Effects-of-calling:java.util.List:add
    //#unanalyzed(String getName()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(String getName()): Effects-of-calling:java.util.Map:get
    //#Theme.java:180: end of method: String com.dmdirc.ui.themes.Theme.getName()
    }

    /**
     * Retrieves the version of this theme.
     * 
     * @return This theme's version
     */    
    public String getVersion() {
        return getMetaData("version", "?");
    //#Theme.java:189: method: String com.dmdirc.ui.themes.Theme.getVersion()
    //#input(String getVersion()): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(String getVersion()): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(String getVersion()): com/dmdirc/util/ConfigFile.__Dispatch_Table.getKeyDomain(Ljava/lang/String;)Ljava/util/Map;
    //#input(String getVersion()): com/dmdirc/util/ConfigFile.__Dispatch_Table.isKeyDomain(Ljava/lang/String;)Z
    //#input(String getVersion()): this
    //#input(String getVersion()): this.metadata
    //#input(String getVersion()): this.metadata.__Tag
    //#input(String getVersion()): this.metadata.automake
    //#input(String getVersion()): this.metadata.domains
    //#input(String getVersion()): this.metadata.keydomains
    //#output(String getVersion()): return_value
    //#pre[2] (String getVersion()): init'ed(this.metadata)
    //#pre[3] (String getVersion()): (soft) this.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[4] (String getVersion()): (soft) init'ed(this.metadata.automake)
    //#pre[5] (String getVersion()): (soft) this.metadata.domains != null
    //#pre[6] (String getVersion()): (soft) this.metadata.keydomains != null
    //#post(String getVersion()): init'ed(return_value)
    //#unanalyzed(String getVersion()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(String getVersion()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(String getVersion()): Effects-of-calling:java.util.List:add
    //#unanalyzed(String getVersion()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(String getVersion()): Effects-of-calling:java.util.Map:get
    //#Theme.java:189: end of method: String com.dmdirc.ui.themes.Theme.getVersion()
    }

    /**
     * Retrieves the author of this theme.
     * 
     * @return This theme's author
     */    
    public String getAuthor() {
        return getMetaData("author", "?");
    //#Theme.java:198: method: String com.dmdirc.ui.themes.Theme.getAuthor()
    //#input(String getAuthor()): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(String getAuthor()): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(String getAuthor()): com/dmdirc/util/ConfigFile.__Dispatch_Table.getKeyDomain(Ljava/lang/String;)Ljava/util/Map;
    //#input(String getAuthor()): com/dmdirc/util/ConfigFile.__Dispatch_Table.isKeyDomain(Ljava/lang/String;)Z
    //#input(String getAuthor()): this
    //#input(String getAuthor()): this.metadata
    //#input(String getAuthor()): this.metadata.__Tag
    //#input(String getAuthor()): this.metadata.automake
    //#input(String getAuthor()): this.metadata.domains
    //#input(String getAuthor()): this.metadata.keydomains
    //#output(String getAuthor()): return_value
    //#pre[2] (String getAuthor()): init'ed(this.metadata)
    //#pre[3] (String getAuthor()): (soft) this.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[4] (String getAuthor()): (soft) init'ed(this.metadata.automake)
    //#pre[5] (String getAuthor()): (soft) this.metadata.domains != null
    //#pre[6] (String getAuthor()): (soft) this.metadata.keydomains != null
    //#post(String getAuthor()): init'ed(return_value)
    //#unanalyzed(String getAuthor()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(String getAuthor()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(String getAuthor()): Effects-of-calling:java.util.List:add
    //#unanalyzed(String getAuthor()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(String getAuthor()): Effects-of-calling:java.util.Map:get
    //#Theme.java:198: end of method: String com.dmdirc.ui.themes.Theme.getAuthor()
    }

    /**
     * Retrieves the description of this theme.
     * 
     * @return This theme's description
     */
    public String getDescription() {
        return getMetaData("description", "?");
    //#Theme.java:207: method: String com.dmdirc.ui.themes.Theme.getDescription()
    //#input(String getDescription()): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(String getDescription()): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(String getDescription()): com/dmdirc/util/ConfigFile.__Dispatch_Table.getKeyDomain(Ljava/lang/String;)Ljava/util/Map;
    //#input(String getDescription()): com/dmdirc/util/ConfigFile.__Dispatch_Table.isKeyDomain(Ljava/lang/String;)Z
    //#input(String getDescription()): this
    //#input(String getDescription()): this.metadata
    //#input(String getDescription()): this.metadata.__Tag
    //#input(String getDescription()): this.metadata.automake
    //#input(String getDescription()): this.metadata.domains
    //#input(String getDescription()): this.metadata.keydomains
    //#output(String getDescription()): return_value
    //#pre[2] (String getDescription()): init'ed(this.metadata)
    //#pre[3] (String getDescription()): (soft) this.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[4] (String getDescription()): (soft) init'ed(this.metadata.automake)
    //#pre[5] (String getDescription()): (soft) this.metadata.domains != null
    //#pre[6] (String getDescription()): (soft) this.metadata.keydomains != null
    //#post(String getDescription()): init'ed(return_value)
    //#unanalyzed(String getDescription()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(String getDescription()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(String getDescription()): Effects-of-calling:java.util.List:add
    //#unanalyzed(String getDescription()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(String getDescription()): Effects-of-calling:java.util.Map:get
    //#Theme.java:207: end of method: String com.dmdirc.ui.themes.Theme.getDescription()
    }

    /** {@inheritDoc} */
    @Override
    public int compareTo(final Theme o) {
        return getName().compareTo(o.getName());
    //#Theme.java:213: method: int com.dmdirc.ui.themes.Theme.compareTo(Theme)
    //#Theme.java:213: Warning: unused assignment in callee
    //#    Unused assignment to (java.lang.String:substring(...)._tainted) in getName
    //#    severity: LOW
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: int compareTo(Theme)
    //#Theme.java:213: ?null dereference
    //#    getName(...) != null
    //#    severity: MEDIUM
    //#    class: com.dmdirc.ui.themes.Theme
    //#    method: int compareTo(Theme)
    //#    basic block: Entry_BB_1
    //#    assertion: getName(...) != null
    //#    VN: getName(...)
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
    //#input(int compareTo(Theme)): __Descendant_Table[com/dmdirc/ui/themes/Theme]
    //#input(int compareTo(Theme)): __Descendant_Table[others]
    //#input(int compareTo(Theme)): __Dispatch_Table.getFileName(Z)Ljava/lang/String;
    //#input(int compareTo(Theme)): __Dispatch_Table.getName()Ljava/lang/String;
    //#input(int compareTo(Theme)): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(int compareTo(Theme)): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(int compareTo(Theme)): com/dmdirc/util/ConfigFile.__Dispatch_Table.getKeyDomain(Ljava/lang/String;)Ljava/util/Map;
    //#input(int compareTo(Theme)): com/dmdirc/util/ConfigFile.__Dispatch_Table.isKeyDomain(Ljava/lang/String;)Z
    //#input(int compareTo(Theme)): o
    //#input(int compareTo(Theme)): o.__Tag
    //#input(int compareTo(Theme)): o.file
    //#input(int compareTo(Theme)): o.metadata
    //#input(int compareTo(Theme)): o.metadata.__Tag
    //#input(int compareTo(Theme)): o.metadata.automake
    //#input(int compareTo(Theme)): o.metadata.domains
    //#input(int compareTo(Theme)): o.metadata.keydomains
    //#input(int compareTo(Theme)): this
    //#input(int compareTo(Theme)): this.__Tag
    //#input(int compareTo(Theme)): this.file
    //#input(int compareTo(Theme)): this.metadata
    //#input(int compareTo(Theme)): this.metadata.__Tag
    //#input(int compareTo(Theme)): this.metadata.automake
    //#input(int compareTo(Theme)): this.metadata.domains
    //#input(int compareTo(Theme)): this.metadata.keydomains
    //#output(int compareTo(Theme)): return_value
    //#pre[1] (int compareTo(Theme)): o != null
    //#pre[2] (int compareTo(Theme)): o.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[3] (int compareTo(Theme)): o.file != null
    //#pre[4] (int compareTo(Theme)): init'ed(o.metadata)
    //#pre[10] (int compareTo(Theme)): this.__Tag == com/dmdirc/ui/themes/Theme
    //#pre[11] (int compareTo(Theme)): this.file != null
    //#pre[12] (int compareTo(Theme)): init'ed(this.metadata)
    //#pre[5] (int compareTo(Theme)): (soft) o.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[6] (int compareTo(Theme)): (soft) init'ed(o.metadata.automake)
    //#pre[7] (int compareTo(Theme)): (soft) o.metadata.domains != null
    //#pre[8] (int compareTo(Theme)): (soft) o.metadata.keydomains != null
    //#pre[13] (int compareTo(Theme)): (soft) this.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[14] (int compareTo(Theme)): (soft) init'ed(this.metadata.automake)
    //#pre[15] (int compareTo(Theme)): (soft) this.metadata.domains != null
    //#pre[16] (int compareTo(Theme)): (soft) this.metadata.keydomains != null
    //#post(int compareTo(Theme)): init'ed(return_value)
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.io.File:getName
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:getMetaData
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.util.List:add
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(int compareTo(Theme)): Effects-of-calling:java.util.Map:get
    //#Theme.java:213: end of method: int com.dmdirc.ui.themes.Theme.compareTo(Theme)
    }

    /**
     * Attempts to read the specified key from the 'data' keysection of the
     * theme's config file.
     * 
     * @param key The key to be read
     * @param fallback The value to use if the file, section or entry doesn't
     * exist
     * @return The relevant meta-data, or the fallback value
     */
    private String getMetaData(final String key, final String fallback) {
        if (metadata == null || !metadata.isKeyDomain("data") ||
    //#Theme.java:226: method: String com.dmdirc.ui.themes.Theme.getMetaData(String, String)
    //#input(String getMetaData(String, String)): com/dmdirc/util/ConfigFile.__Descendant_Table[com/dmdirc/util/ConfigFile]
    //#input(String getMetaData(String, String)): com/dmdirc/util/ConfigFile.__Descendant_Table[others]
    //#input(String getMetaData(String, String)): com/dmdirc/util/ConfigFile.__Dispatch_Table.getKeyDomain(Ljava/lang/String;)Ljava/util/Map;
    //#input(String getMetaData(String, String)): com/dmdirc/util/ConfigFile.__Dispatch_Table.isKeyDomain(Ljava/lang/String;)Z
    //#input(String getMetaData(String, String)): fallback
    //#input(String getMetaData(String, String)): key
    //#input(String getMetaData(String, String)): this
    //#input(String getMetaData(String, String)): this.metadata
    //#input(String getMetaData(String, String)): this.metadata.__Tag
    //#input(String getMetaData(String, String)): this.metadata.automake
    //#input(String getMetaData(String, String)): this.metadata.domains
    //#input(String getMetaData(String, String)): this.metadata.keydomains
    //#output(String getMetaData(String, String)): return_value
    //#pre[4] (String getMetaData(String, String)): init'ed(this.metadata)
    //#pre[5] (String getMetaData(String, String)): (soft) this.metadata.__Tag == com/dmdirc/util/ConfigFile
    //#pre[6] (String getMetaData(String, String)): (soft) init'ed(this.metadata.automake)
    //#pre[7] (String getMetaData(String, String)): (soft) this.metadata.domains != null
    //#pre[8] (String getMetaData(String, String)): (soft) this.metadata.keydomains != null
    //#presumption(String getMetaData(String, String)): java.util.Map:get(...)@236 != null
    //#presumption(String getMetaData(String, String)): java.util.Map:get(...)@236 != null
    //#post(String getMetaData(String, String)): init'ed(return_value)
    //#unanalyzed(String getMetaData(String, String)): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(String getMetaData(String, String)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(String getMetaData(String, String)): Effects-of-calling:java.util.List:add
    //#unanalyzed(String getMetaData(String, String)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(String getMetaData(String, String)): Effects-of-calling:java.util.Map:get
    //#test_vector(String getMetaData(String, String)): this.metadata: Addr_Set{null}, Inverse{null}
    //#test_vector(String getMetaData(String, String)): java.util.Map:containsKey(...)@226: {1}, {0}
    //#test_vector(String getMetaData(String, String)): java.util.Map:containsKey(...)@267: {0}, {1}
                !metadata.getKeyDomain("data").containsKey(key)) {
            return fallback;
        }
        
        return metadata.getKeyDomain("data").get(key);
    //#Theme.java:231: end of method: String com.dmdirc.ui.themes.Theme.getMetaData(String, String)
    }

}
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Descendant_Table[com/dmdirc/ui/themes/Theme]
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.applyTheme()V
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.compareTo(Lcom/dmdirc/ui/themes/Theme;)I
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.compareTo(Ljava/lang/Object;)I
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String;
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getDescription()Ljava/lang/String;
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getFileName()Ljava/lang/String;
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getFileName(Z)Ljava/lang/String;
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getMetaData(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getVersion()Ljava/lang/String;
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.isEnabled()Z
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.isValidTheme()Z
    //#output(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.removeTheme()V
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Descendant_Table[com/dmdirc/ui/themes/Theme] == &__Dispatch_Table
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.applyTheme()V == &applyTheme
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.compareTo(Lcom/dmdirc/ui/themes/Theme;)I == &compareTo
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.compareTo(Ljava/lang/Object;)I == &compareTo
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String; == &getAuthor
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getDescription()Ljava/lang/String; == &getDescription
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getFileName()Ljava/lang/String; == &getFileName
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getFileName(Z)Ljava/lang/String; == &getFileName
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getMetaData(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; == &getMetaData
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &getName
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.getVersion()Ljava/lang/String; == &getVersion
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.isEnabled()Z == &isEnabled
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.isValidTheme()Z == &isValidTheme
    //#post(com.dmdirc.ui.themes.Theme__static_init): __Dispatch_Table.removeTheme()V == &removeTheme
    //#Theme.java:: end of method: com.dmdirc.ui.themes.Theme.com.dmdirc.ui.themes.Theme__static_init
    //#Theme.java:: end of class: com.dmdirc.ui.themes.Theme
