//# 0 errors, 327 messages
//#
/*
    //#CommandArguments.java:1:1: class: com.dmdirc.commandparser.CommandArguments
    //#CommandArguments.java:1:1: method: com.dmdirc.commandparser.CommandArguments.com.dmdirc.commandparser.CommandArguments__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.commandparser;

import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Represents a command and its arguments. In this class, input is split into
 * 'words' which are separated by any number of whitespace characters;
 * 'arguments' are the same but exclude the first word, which will normally be
 * the command name.
 *
 * @since 0.6.3m1
 * @author chris
 */
public class CommandArguments {

    /** The raw line that was input. */
    private final String line;

    /** The line split into whitespace-delimited words. */
    private String[] words;

    /**
     * Creates a new command arguments parser for the specified line.
     *
     * @param line The line to be parsed
     */
    public CommandArguments(final String line) {
    //#CommandArguments.java:51: method: void com.dmdirc.commandparser.CommandArguments.com.dmdirc.commandparser.CommandArguments(String)
    //#input(void com.dmdirc.commandparser.CommandArguments(String)): line
    //#input(void com.dmdirc.commandparser.CommandArguments(String)): this
    //#output(void com.dmdirc.commandparser.CommandArguments(String)): this.line
    //#post(void com.dmdirc.commandparser.CommandArguments(String)): this.line == line
    //#post(void com.dmdirc.commandparser.CommandArguments(String)): init'ed(this.line)
        this.line = line;
    }
    //#CommandArguments.java:53: end of method: void com.dmdirc.commandparser.CommandArguments.com.dmdirc.commandparser.CommandArguments(String)

    /**
     * Retrieves the raw line that was input, including any command character(s)
     * and names.
     *
     * @return The raw line entered
     */
    public String getLine() {
        return line;
    //#CommandArguments.java:62: method: String com.dmdirc.commandparser.CommandArguments.getLine()
    //#input(String getLine()): this
    //#input(String getLine()): this.line
    //#output(String getLine()): return_value
    //#post(String getLine()): return_value == this.line
    //#post(String getLine()): init'ed(return_value)
    //#CommandArguments.java:62: end of method: String com.dmdirc.commandparser.CommandArguments.getLine()
    }

    /**
     * Retrieves the raw line that was input, including the command name but
     * stripped of any command characters.
     *
     * @return The raw line entered, without command chars
     */
    public String getStrippedLine() {
        final int offset = isCommand() ? isSilent() ? 2 : 1 : 0;
    //#CommandArguments.java:72: method: String com.dmdirc.commandparser.CommandArguments.getStrippedLine()
    //#input(String getStrippedLine()): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(String getStrippedLine()): __Descendant_Table[others]
    //#input(String getStrippedLine()): __Dispatch_Table.isCommand()Z
    //#input(String getStrippedLine()): __Dispatch_Table.isSilent()Z
    //#input(String getStrippedLine()): com/dmdirc/commandparser/CommandManager.commandChar
    //#input(String getStrippedLine()): com/dmdirc/commandparser/CommandManager.silenceChar
    //#input(String getStrippedLine()): this
    //#input(String getStrippedLine()): this.__Tag
    //#input(String getStrippedLine()): this.line
    //#input(String getStrippedLine()): this.line._tainted
    //#output(String getStrippedLine()): java.lang.String:substring(...)._tainted
    //#output(String getStrippedLine()): return_value
    //#new obj(String getStrippedLine()): java.lang.String:substring(...)
    //#pre[4] (String getStrippedLine()): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[5] (String getStrippedLine()): this.line != null
    //#pre[1] (String getStrippedLine()): (soft) init'ed(com/dmdirc/commandparser/CommandManager.commandChar)
    //#pre[2] (String getStrippedLine()): (soft) init'ed(com/dmdirc/commandparser/CommandManager.silenceChar)
    //#post(String getStrippedLine()): java.lang.String:substring(...)._tainted == this.line._tainted
    //#post(String getStrippedLine()): init'ed(java.lang.String:substring(...)._tainted)
    //#post(String getStrippedLine()): return_value == &java.lang.String:substring(...)
    //#unanalyzed(String getStrippedLine()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(String getStrippedLine()): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(String getStrippedLine()): Effects-of-calling:java.lang.String:length

        return line.substring(offset);
    //#CommandArguments.java:74: end of method: String com.dmdirc.commandparser.CommandArguments.getStrippedLine()
    }

    /**
     * Retrieves the input split into distinct, whitespace-separated words. The
     * first item in the array will be the command name complete with any
     * command characters.
     *
     * @return An array of 'words' that make up the input
     */
    public String[] getWords() {
        parse();
    //#CommandArguments.java:85: method: String[] com.dmdirc.commandparser.CommandArguments.getWords()
    //#input(String[] getWords()): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(String[] getWords()): __Descendant_Table[others]
    //#input(String[] getWords()): __Dispatch_Table.parse()V
    //#input(String[] getWords()): this
    //#input(String[] getWords()): this.__Tag
    //#input(String[] getWords()): this.line
    //#input(String[] getWords()): this.line._tainted
    //#input(String[] getWords()): this.words
    //#output(String[] getWords()): java.lang.String:split(...)._tainted
    //#output(String[] getWords()): return_value
    //#output(String[] getWords()): this.words
    //#new obj(String[] getWords()): java.lang.String:split(...)
    //#pre[1] (String[] getWords()): init'ed(this.words)
    //#pre[4] (String[] getWords()): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[5] (String[] getWords()): (soft) this.line != null
    //#post(String[] getWords()): init'ed(java.lang.String:split(...)._tainted)
    //#post(String[] getWords()): return_value == One-of{old this.words, &java.lang.String:split(...)}
    //#post(String[] getWords()): return_value != null
    //#post(String[] getWords()): this.words == return_value
    //#unanalyzed(String[] getWords()): Effects-of-calling:java.lang.String:split
        
        return words;
    //#CommandArguments.java:87: end of method: String[] com.dmdirc.commandparser.CommandArguments.getWords()
    }

    /**
     * Retrieves the arguments to the command split into disticnt,
     * whitespace-separated words.
     *
     * @return An array of 'words' that make up the command's arguments
     */
    public String[] getArguments() {
        parse();
    //#CommandArguments.java:97: method: String[] com.dmdirc.commandparser.CommandArguments.getArguments()
    //#input(String[] getArguments()): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(String[] getArguments()): __Descendant_Table[others]
    //#input(String[] getArguments()): __Dispatch_Table.parse()V
    //#input(String[] getArguments()): this
    //#input(String[] getArguments()): this.__Tag
    //#input(String[] getArguments()): this.line
    //#input(String[] getArguments()): this.line._tainted
    //#input(String[] getArguments()): this.words
    //#input(String[] getArguments()): this.words.length
    //#output(String[] getArguments()): java.lang.String:split(...)._tainted
    //#output(String[] getArguments()): java.lang.String:split(...).length
    //#output(String[] getArguments()): return_value
    //#output(String[] getArguments()): this.words
    //#new obj(String[] getArguments()): java.lang.String:split(...)
    //#pre[1] (String[] getArguments()): init'ed(this.words)
    //#pre[4] (String[] getArguments()): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[5] (String[] getArguments()): (soft) this.line != null
    //#presumption(String[] getArguments()): this.words.length@97 <= 4_294_967_295
    //#post(String[] getArguments()): init'ed(java.lang.String:split(...)._tainted)
    //#post(String[] getArguments()): init'ed(java.lang.String:split(...).length)
    //#post(String[] getArguments()): init'ed(return_value)
    //#post(String[] getArguments()): this.words == One-of{old this.words, &java.lang.String:split(...)}
    //#post(String[] getArguments()): this.words != null
    //#unanalyzed(String[] getArguments()): Effects-of-calling:java.lang.String:split

        return Arrays.copyOfRange(words, 1, words.length);
    //#CommandArguments.java:99: end of method: String[] com.dmdirc.commandparser.CommandArguments.getArguments()
    }

    /**
     * Retrieves all the arguments to the command (i.e., not including the
     * command name) with their original whitespace separation preserved.
     *
     * @return A String representation of the command arguments
     */
    public String getArgumentsAsString() {
        parse();
    //#CommandArguments.java:109: method: String com.dmdirc.commandparser.CommandArguments.getArgumentsAsString()
    //#input(String getArgumentsAsString()): "((\S+\s*){"._tainted
    //#input(String getArgumentsAsString()): "(\S+\s*){"._tainted
    //#input(String getArgumentsAsString()): "}"._tainted
    //#input(String getArgumentsAsString()): "}).*?"._tainted
    //#input(String getArgumentsAsString()): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(String getArgumentsAsString()): __Descendant_Table[others]
    //#input(String getArgumentsAsString()): __Dispatch_Table.getArgumentsAsString(I)Ljava/lang/String;
    //#input(String getArgumentsAsString()): __Dispatch_Table.getWordsAsString(I)Ljava/lang/String;
    //#input(String getArgumentsAsString()): __Dispatch_Table.getWordsAsString(II)Ljava/lang/String;
    //#input(String getArgumentsAsString()): __Dispatch_Table.parse()V
    //#input(String getArgumentsAsString()): this
    //#input(String getArgumentsAsString()): this.__Tag
    //#input(String getArgumentsAsString()): this.line
    //#input(String getArgumentsAsString()): this.line._tainted
    //#input(String getArgumentsAsString()): this.words
    //#input(String getArgumentsAsString()): this.words.length
    //#output(String getArgumentsAsString()): java.lang.String:split(...)._tainted
    //#output(String getArgumentsAsString()): java.lang.String:split(...).length
    //#output(String getArgumentsAsString()): return_value
    //#output(String getArgumentsAsString()): this.words
    //#new obj(String getArgumentsAsString()): java.lang.String:split(...)
    //#pre[1] (String getArgumentsAsString()): init'ed(this.words)
    //#pre[4] (String getArgumentsAsString()): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[5] (String getArgumentsAsString()): (soft) this.line != null
    //#post(String getArgumentsAsString()): init'ed(java.lang.String:split(...)._tainted)
    //#post(String getArgumentsAsString()): java.lang.String:split(...)._tainted == 0
    //#post(String getArgumentsAsString()): init'ed(java.lang.String:split(...).length)
    //#post(String getArgumentsAsString()): init'ed(return_value)
    //#post(String getArgumentsAsString()): this.words != null
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.util.regex.Pattern:compile
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.util.regex.Pattern:matcher
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.util.regex.Matcher:matches
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.util.regex.Matcher:group
    //#unanalyzed(String getArgumentsAsString()): Effects-of-calling:java.lang.String:split
        
        return getArgumentsAsString(0);
    //#CommandArguments.java:111: end of method: String com.dmdirc.commandparser.CommandArguments.getArgumentsAsString()
    }

    /**
     * Retrieves arguments to the command (i.e., not including the
     * command name) starting with the specified argument, with their original
     * whitespace separation preserved.
     *
     * @param start The index of the first argument to include
     * @return A String representation of the command arguments
     */
    public String getArgumentsAsString(final int start) {
        parse();
    //#CommandArguments.java:123: method: String com.dmdirc.commandparser.CommandArguments.getArgumentsAsString(int)
    //#input(String getArgumentsAsString(int)): "((\S+\s*){"._tainted
    //#input(String getArgumentsAsString(int)): "(\S+\s*){"._tainted
    //#input(String getArgumentsAsString(int)): "}"._tainted
    //#input(String getArgumentsAsString(int)): "}).*?"._tainted
    //#input(String getArgumentsAsString(int)): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(String getArgumentsAsString(int)): __Descendant_Table[others]
    //#input(String getArgumentsAsString(int)): __Dispatch_Table.getWordsAsString(I)Ljava/lang/String;
    //#input(String getArgumentsAsString(int)): __Dispatch_Table.getWordsAsString(II)Ljava/lang/String;
    //#input(String getArgumentsAsString(int)): __Dispatch_Table.parse()V
    //#input(String getArgumentsAsString(int)): start
    //#input(String getArgumentsAsString(int)): this
    //#input(String getArgumentsAsString(int)): this.__Tag
    //#input(String getArgumentsAsString(int)): this.line
    //#input(String getArgumentsAsString(int)): this.line._tainted
    //#input(String getArgumentsAsString(int)): this.words
    //#input(String getArgumentsAsString(int)): this.words.length
    //#output(String getArgumentsAsString(int)): java.lang.String:split(...)._tainted
    //#output(String getArgumentsAsString(int)): java.lang.String:split(...).length
    //#output(String getArgumentsAsString(int)): return_value
    //#output(String getArgumentsAsString(int)): this.words
    //#new obj(String getArgumentsAsString(int)): java.lang.String:split(...)
    //#pre[1] (String getArgumentsAsString(int)): init'ed(this.words)
    //#pre[2] (String getArgumentsAsString(int)): start <= 4_294_967_294
    //#pre[5] (String getArgumentsAsString(int)): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[6] (String getArgumentsAsString(int)): (soft) this.line != null
    //#presumption(String getArgumentsAsString(int)): this.words.length@123 <= 4_294_967_295
    //#presumption(String getArgumentsAsString(int)): this.words.length@123 - start in {-2_147_483_647..4_294_967_296}
    //#post(String getArgumentsAsString(int)): init'ed(java.lang.String:split(...)._tainted)
    //#post(String getArgumentsAsString(int)): init'ed(java.lang.String:split(...).length)
    //#post(String getArgumentsAsString(int)): init'ed(return_value)
    //#post(String getArgumentsAsString(int)): this.words == One-of{old this.words, &java.lang.String:split(...)}
    //#post(String getArgumentsAsString(int)): this.words != null
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.util.regex.Pattern:compile
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.util.regex.Pattern:matcher
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.util.regex.Matcher:matches
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.util.regex.Matcher:group
    //#unanalyzed(String getArgumentsAsString(int)): Effects-of-calling:java.lang.String:split

        return getWordsAsString(start + 1);
    //#CommandArguments.java:125: end of method: String com.dmdirc.commandparser.CommandArguments.getArgumentsAsString(int)
    }

    /**
     * Retrieves the specified words with their original whitespace separation
     * preserved.
     *
     * @param start The index of the first word to include (starting at 0)
     * @return A String representation of the requested words
     */
    public String getWordsAsString(final int start) {
        return getWordsAsString(start, words.length);
    //#CommandArguments.java:136: method: String com.dmdirc.commandparser.CommandArguments.getWordsAsString(int)
    //#input(String getWordsAsString(int)): "((\S+\s*){"._tainted
    //#input(String getWordsAsString(int)): "(\S+\s*){"._tainted
    //#input(String getWordsAsString(int)): "}"._tainted
    //#input(String getWordsAsString(int)): "}).*?"._tainted
    //#input(String getWordsAsString(int)): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(String getWordsAsString(int)): __Descendant_Table[others]
    //#input(String getWordsAsString(int)): __Dispatch_Table.getWordsAsString(II)Ljava/lang/String;
    //#input(String getWordsAsString(int)): start
    //#input(String getWordsAsString(int)): this
    //#input(String getWordsAsString(int)): this.__Tag
    //#input(String getWordsAsString(int)): this.line
    //#input(String getWordsAsString(int)): this.words
    //#input(String getWordsAsString(int)): this.words.length
    //#output(String getWordsAsString(int)): return_value
    //#pre[3] (String getWordsAsString(int)): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[5] (String getWordsAsString(int)): this.words != null
    //#pre[6] (String getWordsAsString(int)): this.words.length <= 4_294_967_295
    //#pre[7] (String getWordsAsString(int)): this.words.length - start in {-2_147_483_648..4_294_967_295}
    //#post(String getWordsAsString(int)): init'ed(return_value)
    //#unanalyzed(String getWordsAsString(int)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String getWordsAsString(int)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String getWordsAsString(int)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String getWordsAsString(int)): Effects-of-calling:java.util.regex.Pattern:compile
    //#unanalyzed(String getWordsAsString(int)): Effects-of-calling:java.util.regex.Pattern:matcher
    //#unanalyzed(String getWordsAsString(int)): Effects-of-calling:java.util.regex.Matcher:matches
    //#unanalyzed(String getWordsAsString(int)): Effects-of-calling:java.util.regex.Matcher:group
    //#CommandArguments.java:136: end of method: String com.dmdirc.commandparser.CommandArguments.getWordsAsString(int)
    }

    /**
     * Retrieves the specified words with their original whitespace separation
     * preserved.
     *
     * @param start The index of the first word to include (starting at 0)
     * @param end The index of the last word to include
     * @return A String representation of the requested words
     */
    public String getWordsAsString(final int start, final int end) {
        final Pattern pattern = Pattern.compile("(\\S+\\s*){" + (start) + "}"
    //#CommandArguments.java:148: method: String com.dmdirc.commandparser.CommandArguments.getWordsAsString(int, int)
    //#input(String getWordsAsString(int, int)): "((\S+\s*){"._tainted
    //#input(String getWordsAsString(int, int)): "(\S+\s*){"._tainted
    //#input(String getWordsAsString(int, int)): "}"._tainted
    //#input(String getWordsAsString(int, int)): "}).*?"._tainted
    //#input(String getWordsAsString(int, int)): end
    //#input(String getWordsAsString(int, int)): start
    //#input(String getWordsAsString(int, int)): this
    //#input(String getWordsAsString(int, int)): this.line
    //#output(String getWordsAsString(int, int)): return_value
    //#pre[2] (String getWordsAsString(int, int)): end - start in {-2_147_483_648..4_294_967_295}
    //#presumption(String getWordsAsString(int, int)): java.util.regex.Pattern:compile(...)@148 != null
    //#presumption(String getWordsAsString(int, int)): java.util.regex.Pattern:matcher(...)@150 != null
    //#post(String getWordsAsString(int, int)): init'ed(return_value)
                + "((\\S+\\s*){" + (end - start) + "}).*?");
        final Matcher matcher = pattern.matcher(line);

        return matcher.matches() ? matcher.group(2) : "";
    //#CommandArguments.java:152: end of method: String com.dmdirc.commandparser.CommandArguments.getWordsAsString(int, int)
    }

    /**
     * Parses the input into a set of words, if it has not been done before.
     */
    protected synchronized void parse() {
        if (words == null) {
    //#CommandArguments.java:159: method: void com.dmdirc.commandparser.CommandArguments.parse()
    //#input(void parse()): this
    //#input(void parse()): this.__Lock
    //#input(void parse()): this.line
    //#input(void parse()): this.line._tainted
    //#input(void parse()): this.words
    //#output(void parse()): java.lang.String:split(...)._tainted
    //#output(void parse()): this.words
    //#new obj(void parse()): java.lang.String:split(...)
    //#pre[1] (void parse()): init'ed(this.words)
    //#pre[3] (void parse()): (soft) this.line != null
    //#post(void parse()): init'ed(java.lang.String:split(...)._tainted)
    //#post(void parse()): this.words == One-of{old this.words, &java.lang.String:split(...)}
    //#post(void parse()): this.words != null
    //#test_vector(void parse()): this.words: Inverse{null}, Addr_Set{null}
            words = line.split("\\s+");
        }
    }
    //#CommandArguments.java:162: end of method: void com.dmdirc.commandparser.CommandArguments.parse()

    /**
     * Determines if the input was a command or not.
     *
     * @return True if the input was a command, false otherwise
     */
    public boolean isCommand() {
        return !line.isEmpty() && line.charAt(0) == CommandManager.getCommandChar();
    //#CommandArguments.java:170: method: bool com.dmdirc.commandparser.CommandArguments.isCommand()
    //#input(bool isCommand()): com/dmdirc/commandparser/CommandManager.commandChar
    //#input(bool isCommand()): this
    //#input(bool isCommand()): this.line
    //#output(bool isCommand()): return_value
    //#pre[3] (bool isCommand()): this.line != null
    //#pre[1] (bool isCommand()): (soft) init'ed(com/dmdirc/commandparser/CommandManager.commandChar)
    //#post(bool isCommand()): init'ed(return_value)
    //#CommandArguments.java:170: end of method: bool com.dmdirc.commandparser.CommandArguments.isCommand()
    }

    /**
     * Determines if the input was a silenced command or not.
     *
     * @return True if the input was a silenced command, false otherwise
     */
    public boolean isSilent() {
        return isCommand() && line.length() >= 2 &&
    //#CommandArguments.java:179: method: bool com.dmdirc.commandparser.CommandArguments.isSilent()
    //#input(bool isSilent()): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(bool isSilent()): __Descendant_Table[others]
    //#input(bool isSilent()): __Dispatch_Table.isCommand()Z
    //#input(bool isSilent()): com/dmdirc/commandparser/CommandManager.commandChar
    //#input(bool isSilent()): com/dmdirc/commandparser/CommandManager.silenceChar
    //#input(bool isSilent()): this
    //#input(bool isSilent()): this.__Tag
    //#input(bool isSilent()): this.line
    //#output(bool isSilent()): return_value
    //#pre[4] (bool isSilent()): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[5] (bool isSilent()): this.line != null
    //#pre[1] (bool isSilent()): (soft) init'ed(com/dmdirc/commandparser/CommandManager.commandChar)
    //#pre[2] (bool isSilent()): (soft) init'ed(com/dmdirc/commandparser/CommandManager.silenceChar)
    //#post(bool isSilent()): init'ed(return_value)
    //#unanalyzed(bool isSilent()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(bool isSilent()): Effects-of-calling:java.lang.String:charAt
    //#CommandArguments.java:179: end of method: bool com.dmdirc.commandparser.CommandArguments.isSilent()
                line.charAt(1) == CommandManager.getSilenceChar();
    }

    /**
     * Retrieves the name of the command that was used.
     *
     * @return The command name used
     */
    public String getCommandName() {
        final int offset = isCommand() ? isSilent() ? 2 : 1 : 0;
    //#CommandArguments.java:189: method: String com.dmdirc.commandparser.CommandArguments.getCommandName()
    //#input(String getCommandName()): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#input(String getCommandName()): __Descendant_Table[others]
    //#input(String getCommandName()): __Dispatch_Table.getWords()[Ljava/lang/String;
    //#input(String getCommandName()): __Dispatch_Table.isCommand()Z
    //#input(String getCommandName()): __Dispatch_Table.isSilent()Z
    //#input(String getCommandName()): __Dispatch_Table.parse()V
    //#input(String getCommandName()): com/dmdirc/commandparser/CommandManager.commandChar
    //#input(String getCommandName()): com/dmdirc/commandparser/CommandManager.silenceChar
    //#input(String getCommandName()): this
    //#input(String getCommandName()): this.__Tag
    //#input(String getCommandName()): this.line
    //#input(String getCommandName()): this.line._tainted
    //#input(String getCommandName()): this.words
    //#input(String getCommandName()): this.words.length
    //#input(String getCommandName()): this.words[0]._tainted
    //#output(String getCommandName()): java.lang.String:split(...)._tainted
    //#output(String getCommandName()): java.lang.String:split(...).length
    //#output(String getCommandName()): java.lang.String:split(...)[0]
    //#output(String getCommandName()): java.lang.String:substring(...)._tainted
    //#output(String getCommandName()): return_value
    //#output(String getCommandName()): this.words
    //#new obj(String getCommandName()): java.lang.String:split(...)
    //#new obj(String getCommandName()): java.lang.String:substring(...)
    //#pre[3] (String getCommandName()): init'ed(this.words)
    //#pre[6] (String getCommandName()): this.__Tag == com/dmdirc/commandparser/CommandArguments
    //#pre[7] (String getCommandName()): this.line != null
    //#pre[1] (String getCommandName()): (soft) init'ed(com/dmdirc/commandparser/CommandManager.commandChar)
    //#pre[2] (String getCommandName()): (soft) init'ed(com/dmdirc/commandparser/CommandManager.silenceChar)
    //#presumption(String getCommandName()): getWords(...).length@190 >= 1
    //#presumption(String getCommandName()): getWords(...)[0]@190 != null
    //#post(String getCommandName()): init'ed(java.lang.String:split(...)._tainted)
    //#post(String getCommandName()): init'ed(java.lang.String:split(...).length)
    //#post(String getCommandName()): init'ed(java.lang.String:split(...)[0])
    //#post(String getCommandName()): init'ed(java.lang.String:substring(...)._tainted)
    //#post(String getCommandName()): return_value == &java.lang.String:substring(...)
    //#post(String getCommandName()): this.words == One-of{old this.words, &java.lang.String:split(...)}
    //#post(String getCommandName()): this.words != null
    //#unanalyzed(String getCommandName()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(String getCommandName()): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(String getCommandName()): Effects-of-calling:java.lang.String:split
    //#unanalyzed(String getCommandName()): Effects-of-calling:java.lang.String:length
        return getWords()[0].substring(offset);
    //#CommandArguments.java:190: end of method: String com.dmdirc.commandparser.CommandArguments.getCommandName()
    }

}
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Descendant_Table[com/dmdirc/commandparser/CommandArguments]
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getArguments()[Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getArgumentsAsString()Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getArgumentsAsString(I)Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getCommandName()Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getLine()Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getStrippedLine()Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getWords()[Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getWordsAsString(I)Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getWordsAsString(II)Ljava/lang/String;
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.isCommand()Z
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.isSilent()Z
    //#output(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.parse()V
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Descendant_Table[com/dmdirc/commandparser/CommandArguments] == &__Dispatch_Table
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getArguments()[Ljava/lang/String; == &getArguments
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getArgumentsAsString()Ljava/lang/String; == &getArgumentsAsString
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getArgumentsAsString(I)Ljava/lang/String; == &getArgumentsAsString
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getCommandName()Ljava/lang/String; == &getCommandName
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getLine()Ljava/lang/String; == &getLine
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getStrippedLine()Ljava/lang/String; == &getStrippedLine
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getWords()[Ljava/lang/String; == &getWords
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getWordsAsString(I)Ljava/lang/String; == &getWordsAsString
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.getWordsAsString(II)Ljava/lang/String; == &getWordsAsString
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.isCommand()Z == &isCommand
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.isSilent()Z == &isSilent
    //#post(com.dmdirc.commandparser.CommandArguments__static_init): __Dispatch_Table.parse()V == &parse
    //#CommandArguments.java:: end of method: com.dmdirc.commandparser.CommandArguments.com.dmdirc.commandparser.CommandArguments__static_init
    //#CommandArguments.java:: end of class: com.dmdirc.commandparser.CommandArguments
