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

package com.dmdirc.addons.ui_swing.dialogs.serversetting;

import com.dmdirc.Server;
import com.dmdirc.addons.ui_swing.UIUtilities;
import com.dmdirc.parser.irc.IRCParser;

import java.awt.Insets;
import java.util.Hashtable;
import java.util.Map;

import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import javax.swing.JPanel;

import net.miginfocom.swing.MigLayout;

/** User mode panel. */
public final class UserModesPane extends JPanel {

    /**
     * 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 = 1;
    /** Parent server. */
    private final Server server;
    /** The checkboxes used for user modes. */
    private Map<String, JCheckBox> modeCheckBoxes;

    /**
     * Creates a new instance of UserModesPane.
     *
     * @param server Parent server
     */
    public UserModesPane(final Server server) {
        super();
    //#UserModesPane.java:59: method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)
    //#input(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): ": "._tainted
    //#input(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): ": Unknown"._tainted
    //#input(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): "Mode "._tainted
    //#input(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): "umode"._tainted
    //#input(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): server
    //#input(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): this
    //#output(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): new Hashtable(initModesPanel#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): this.modeCheckBoxes
    //#output(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): this.server
    //#new obj(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): new Hashtable(initModesPanel#1)
    //#pre[1] (void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): server != null
    //#post(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): this.modeCheckBoxes == &new Hashtable(initModesPanel#1)
    //#post(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): this.server == server
    //#post(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): this.server != null
    //#post(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): new Hashtable(initModesPanel#1) num objects == 1
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.Server:getParser
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getUserModeString
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getMyself
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getUserModeStr
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.util.Hashtable
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.String:subSequence
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.String:contains
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.Server:getConfigManager
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.config.ConfigManager:hasOptionString
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.config.ConfigManager:getOption
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JCheckBox
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JCheckBox:setMargin
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JCheckBox:setToolTipText
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JCheckBox:setOpaque
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.util.Map:values
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.util.Collection:iterator
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JPanel:add
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.BorderFactory:createTitledBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JPanel:setBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:javax.swing.JPanel:setOpaque
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:add

        this.server = server;

        this.setOpaque(UIUtilities.getTabbedPaneOpaque());
    //#UserModesPane.java:63: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)
    //#    unanalyzed callee: bool com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque()
    //#UserModesPane.java:63: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setOpaque(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setOpaque(bool)
        initModesPanel();
        layoutComponents();

        setVisible(true);
    //#UserModesPane.java:67: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setVisible(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setVisible(bool)
    }
    //#UserModesPane.java:68: end of method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane(Server)

    /** Updates the panel. */
    public void update() {
        setVisible(false);
    //#UserModesPane.java:72: method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.update()
    //#UserModesPane.java:72: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setVisible(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void update()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setVisible(bool)
    //#input(void update()): ": "._tainted
    //#input(void update()): ": Unknown"._tainted
    //#input(void update()): "Mode "._tainted
    //#input(void update()): "umode"._tainted
    //#input(void update()): this
    //#input(void update()): this.server
    //#output(void update()): new Hashtable(initModesPanel#1) num objects
    //#output(void update()): this.modeCheckBoxes
    //#new obj(void update()): new Hashtable(initModesPanel#1)
    //#pre[2] (void update()): this.server != null
    //#post(void update()): this.modeCheckBoxes == &new Hashtable(initModesPanel#1)
    //#post(void update()): new Hashtable(initModesPanel#1) num objects == 1
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.Server:getParser
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getUserModeString
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.parser.irc.IRCParser:getMyself
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.parser.irc.ClientInfo:getUserModeStr
    //#unanalyzed(void update()): Effects-of-calling:java.util.Hashtable
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque
    //#unanalyzed(void update()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void update()): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void update()): Effects-of-calling:java.lang.String:split
    //#unanalyzed(void update()): Effects-of-calling:java.lang.String:subSequence
    //#unanalyzed(void update()): Effects-of-calling:java.lang.String:contains
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.Server:getConfigManager
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionBool
    //#unanalyzed(void update()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void update()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void update()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.config.ConfigManager:hasOptionString
    //#unanalyzed(void update()): Effects-of-calling:com.dmdirc.config.ConfigManager:getOption
    //#unanalyzed(void update()): Effects-of-calling:javax.swing.JCheckBox
    //#unanalyzed(void update()): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void update()): Effects-of-calling:javax.swing.JCheckBox:setMargin
    //#unanalyzed(void update()): Effects-of-calling:javax.swing.JCheckBox:setToolTipText
    //#unanalyzed(void update()): Effects-of-calling:javax.swing.JCheckBox:setOpaque
    //#unanalyzed(void update()): Effects-of-calling:java.util.Map:put
        removeAll();
    //#UserModesPane.java:73: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:removeAll()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void update()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:removeAll()
        initModesPanel();
        setVisible(true);
    //#UserModesPane.java:75: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setVisible(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void update()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setVisible(bool)
    }
    //#UserModesPane.java:76: end of method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.update()

    /** Initialises the modes panel. */
    private void initModesPanel() {
        final IRCParser parser = server.getParser();
    //#UserModesPane.java:80: method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.initModesPanel()
    //#UserModesPane.java:80: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
    //#input(void initModesPanel()): ": "._tainted
    //#input(void initModesPanel()): ": Unknown"._tainted
    //#input(void initModesPanel()): "Mode "._tainted
    //#input(void initModesPanel()): "umode"._tainted
    //#input(void initModesPanel()): this
    //#input(void initModesPanel()): this.server
    //#output(void initModesPanel()): new Hashtable(initModesPanel#1) num objects
    //#output(void initModesPanel()): this.modeCheckBoxes
    //#new obj(void initModesPanel()): new Hashtable(initModesPanel#1)
    //#pre[2] (void initModesPanel()): this.server != null
    //#presumption(void initModesPanel()): com.dmdirc.Server:getConfigManager(...)@101 != null
    //#presumption(void initModesPanel()): com.dmdirc.Server:getConfigManager(...)@107 != null
    //#presumption(void initModesPanel()): com.dmdirc.Server:getConfigManager(...)@108 != null
    //#presumption(void initModesPanel()): com.dmdirc.Server:getConfigManager(...)@99 != null
    //#presumption(void initModesPanel()): com.dmdirc.Server:getConfigManager(...)@99 != null
    //#presumption(void initModesPanel()): com.dmdirc.Server:getParser(...)@80 != null
    //#presumption(void initModesPanel()): com.dmdirc.parser.irc.ClientInfo:getUserModeStr(...)@83 != null
    //#presumption(void initModesPanel()): com.dmdirc.parser.irc.IRCParser:getMyself(...)@83 != null
    //#presumption(void initModesPanel()): com.dmdirc.parser.irc.IRCParser:getUserModeString(...)@82 != null
    //#post(void initModesPanel()): this.modeCheckBoxes == &new Hashtable(initModesPanel#1)
    //#post(void initModesPanel()): new Hashtable(initModesPanel#1) num objects == 1
    //#test_vector(void initModesPanel()): com.dmdirc.config.ConfigManager:getOptionBool(...)@99: {0}, {1}
    //#test_vector(void initModesPanel()): com.dmdirc.config.ConfigManager:hasOptionString(...)@107: {0}, {1}
    //#test_vector(void initModesPanel()): com.dmdirc.config.ConfigManager:hasOptionString(...)@99: {0}, {1}

        final String userModes = parser.getUserModeString();
    //#UserModesPane.java:82: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.IRCParser:getUserModeString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: String com.dmdirc.parser.irc.IRCParser:getUserModeString()
        final String ourUserModes = parser.getMyself().getUserModeStr();
    //#UserModesPane.java:83: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#UserModesPane.java:83: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:getUserModeStr()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:getUserModeStr()

        modeCheckBoxes =
                new Hashtable<String, JCheckBox>();

        final boolean opaque = UIUtilities.getTabbedPaneOpaque();
    //#UserModesPane.java:88: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: bool com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque()

        // Lay out all the boolean mode checkboxes
        for (int i = 0; i < userModes.length();
                i++) {
            final String mode = userModes.substring(i, i + 1);
            final boolean state =
    //#UserModesPane.java:94: ?use of default init
    //#    init'ed(java/lang/String:split(...).length)
    //#    severity: LOW
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    basic block: bb_3
    //#    assertion: init'ed(java/lang/String:split(...).length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#UserModesPane.java:94: ?use of default init
    //#    init'ed(java/lang/String:split(...)[0])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    basic block: bb_3
    //#    assertion: init'ed(java/lang/String:split(...)[0])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#UserModesPane.java:94: ?null dereference
    //#    not_init'ed(java/lang/String:split(...)[0])
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    basic block: bb_3
    //#    assertion: not_init'ed(java/lang/String:split(...)[0])
    //#    VN: undefined
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
                    ourUserModes.split(" ")[0].contains(mode.subSequence(0, 1));
            String text;
            String tooltip;

            if (server.getConfigManager().getOptionBool("server", "friendlymodes") &&
    //#UserModesPane.java:99: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.Server:getConfigManager()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: ConfigManager com.dmdirc.Server:getConfigManager()
    //#UserModesPane.java:99: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#UserModesPane.java:99: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:hasOptionString(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:hasOptionString(String, String)
                    server.getConfigManager().hasOptionString("server", "umode" + mode)) {
                text =  server.getConfigManager().
    //#UserModesPane.java:101: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.Server:getConfigManager()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: ConfigManager com.dmdirc.Server:getConfigManager()
    //#UserModesPane.java:101: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: String com.dmdirc.config.ConfigManager:getOption(String, String)
                        getOption("server", "umode" + mode);
            } else {
                text = "Mode " + mode;
            }

            if (server.getConfigManager().hasOptionString("server", "umode" + mode)) {
    //#UserModesPane.java:107: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.Server:getConfigManager()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: ConfigManager com.dmdirc.Server:getConfigManager()
    //#UserModesPane.java:107: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:hasOptionString(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:hasOptionString(String, String)
                tooltip = "Mode " + mode + ": " + server.getConfigManager().
    //#UserModesPane.java:108: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.Server:getConfigManager()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: ConfigManager com.dmdirc.Server:getConfigManager()
    //#UserModesPane.java:108: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.config.ConfigManager:getOption(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void initModesPanel()
    //#    unanalyzed callee: String com.dmdirc.config.ConfigManager:getOption(String, String)
                        getOption("server", "umode" + mode);
            } else {
                tooltip = "Mode " + mode + ": Unknown";
            }

            final JCheckBox checkBox = new JCheckBox(text, state);
            checkBox.setMargin(new Insets(0, 0, 0, 0));
            checkBox.setToolTipText(tooltip);
            checkBox.setOpaque(opaque);

            modeCheckBoxes.put(mode, checkBox);
        }
    }
    //#UserModesPane.java:121: end of method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.initModesPanel()

    /** Lays out the components. */
    private void layoutComponents() {
        final JPanel userModes =
    //#UserModesPane.java:125: method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.layoutComponents()
    //#UserModesPane.java:125: Warning: method not available - call not analyzed
    //#    call on void net.miginfocom.swing.MigLayout(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void net.miginfocom.swing.MigLayout(String)
    //#input(void layoutComponents()): this
    //#input(void layoutComponents()): this.modeCheckBoxes
    //#pre[2] (void layoutComponents()): this.modeCheckBoxes != null
    //#presumption(void layoutComponents()): java.util.Map:values(...)@127 != null
    //#test_vector(void layoutComponents()): java.util.Iterator:hasNext(...)@127: {0}, {1}
                new JPanel(new MigLayout("wrap 2, fillx"));
        for (JCheckBox checkBox : modeCheckBoxes.values()) {
            userModes.add(checkBox);
        }

        userModes.setBorder(BorderFactory.createTitledBorder("User modes"));
        userModes.setOpaque(UIUtilities.getTabbedPaneOpaque());
    //#UserModesPane.java:132: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void layoutComponents()
    //#    unanalyzed callee: bool com.dmdirc.addons.ui_swing.UIUtilities:getTabbedPaneOpaque()
        
        setLayout(new MigLayout("flowy, fillx", "fill", ""));
    //#UserModesPane.java:134: Warning: method not available - call not analyzed
    //#    call on void net.miginfocom.swing.MigLayout(String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void net.miginfocom.swing.MigLayout(String, String, String)
    //#UserModesPane.java:134: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setLayout(LayoutManager)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:setLayout(LayoutManager)
        add(userModes);
    //#UserModesPane.java:135: Warning: method not available - call not analyzed
    //#    call on Component com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:add(Component)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void layoutComponents()
    //#    unanalyzed callee: Component com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane:add(Component)
    }
    //#UserModesPane.java:136: end of method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.layoutComponents()

    /**
     * Sends changed modes to the server.
     */
    public void save() {
        if (server == null || server.getParser() == null) {
    //#UserModesPane.java:142: method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.save()
    //#UserModesPane.java:142: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
    //#input(void save()): this
    //#input(void save()): this.modeCheckBoxes
    //#input(void save()): this.server
    //#pre[2] (void save()): (soft) this.modeCheckBoxes != null
    //#presumption(void save()): com.dmdirc.Server:getParser(...)@146 != null
    //#presumption(void save()): com.dmdirc.Server:getParser(...)@159 != null
    //#presumption(void save()): com.dmdirc.Server:getParser(...)@165 != null
    //#presumption(void save()): com.dmdirc.parser.irc.ClientInfo:getUserModeStr(...)@148 != null
    //#presumption(void save()): com.dmdirc.parser.irc.IRCParser:getMyself(...)@148 != null
    //#presumption(void save()): com.dmdirc.parser.irc.IRCParser:getMyself(...)@159 != null
    //#presumption(void save()): com.dmdirc.parser.irc.IRCParser:getMyself(...)@165 != null
    //#presumption(void save()): com.dmdirc.parser.irc.IRCParser:getUserModeString(...)@147 != null
    //#presumption(void save()): java.lang.String:toCharArray(...).length@159 >= 1
    //#presumption(void save()): java.util.Map:get(...)@156 != null
    //#presumption(void save()): java.util.Map:get(...)@159 != null
    //#test_vector(void save()): this.server: Addr_Set{null}, Inverse{null}
    //#test_vector(void save()): com.dmdirc.Server:getParser(...)@142: Inverse{null}, Addr_Set{null}
    //#test_vector(void save()): java.util.Map:get(...)@156: Addr_Set{null}, Inverse{null}
            return;
        }
        boolean changed = false;
        final IRCParser parser = server.getParser();
    //#UserModesPane.java:146: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
        final String userModes = parser.getUserModeString();
    //#UserModesPane.java:147: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.IRCParser:getUserModeString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: String com.dmdirc.parser.irc.IRCParser:getUserModeString()
        final String ourUserModes = parser.getMyself().getUserModeStr();
    //#UserModesPane.java:148: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#UserModesPane.java:148: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.parser.irc.ClientInfo:getUserModeStr()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: String com.dmdirc.parser.irc.ClientInfo:getUserModeStr()

        for (int i = 0; i < userModes.length();
                i++) {
            final String mode = userModes.substring(i, i + 1);
            final boolean state =
    //#UserModesPane.java:153: ?use of default init
    //#    init'ed(java/lang/String:split(...).length)
    //#    severity: LOW
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    basic block: bb_6
    //#    assertion: init'ed(java/lang/String:split(...).length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#UserModesPane.java:153: ?use of default init
    //#    init'ed(java/lang/String:split(...)[0])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    basic block: bb_6
    //#    assertion: init'ed(java/lang/String:split(...)[0])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#UserModesPane.java:153: ?null dereference
    //#    not_init'ed(java/lang/String:split(...)[0])
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    basic block: bb_6
    //#    assertion: not_init'ed(java/lang/String:split(...)[0])
    //#    VN: undefined
    //#    Expected: Inverse{null} or Invalid
    //#    Bad: Addr_Set{null}
    //#    Attribs:  Ptr  null in Bad
                    ourUserModes.split(" ")[0].contains(mode.subSequence(0, 1));

            if (modeCheckBoxes.get(mode) != null &&
                    state != modeCheckBoxes.get(mode).isSelected()) {
                changed = true;
                server.getParser().getMyself().
    //#UserModesPane.java:159: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
    //#UserModesPane.java:159: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#UserModesPane.java:159: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.parser.irc.ClientInfo:alterMode(bool, Character)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: void com.dmdirc.parser.irc.ClientInfo:alterMode(bool, Character)
                        alterMode(modeCheckBoxes.get(mode).isSelected(),
                        mode.toCharArray()[0]);
            }
        }
        if (changed) {
            server.getParser().getMyself().sendModes();
    //#UserModesPane.java:165: Warning: method not available - call not analyzed
    //#    call on IRCParser com.dmdirc.Server:getParser()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: IRCParser com.dmdirc.Server:getParser()
    //#UserModesPane.java:165: Warning: method not available - call not analyzed
    //#    call on ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: ClientInfo com.dmdirc.parser.irc.IRCParser:getMyself()
    //#UserModesPane.java:165: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.parser.irc.ClientInfo:sendModes()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
    //#    method: void save()
    //#    unanalyzed callee: void com.dmdirc.parser.irc.ClientInfo:sendModes()
        }
    }
    //#UserModesPane.java:167: end of method: void com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.save()
}
    //#output(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/dialogs/serversetting/UserModesPane]
    //#output(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.initModesPanel()V
    //#output(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.layoutComponents()V
    //#output(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.save()V
    //#output(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.update()V
    //#post(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/dialogs/serversetting/UserModesPane] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.initModesPanel()V == &initModesPanel
    //#post(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.layoutComponents()V == &layoutComponents
    //#post(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.save()V == &save
    //#post(com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init): __Dispatch_Table.update()V == &update
    //#UserModesPane.java:: end of method: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane.com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane__static_init
    //#UserModesPane.java:: end of class: com.dmdirc.addons.ui_swing.dialogs.serversetting.UserModesPane
