//# 1 errors, 420 messages
//#
/*
    //#Alias.java:1:1: class: com.dmdirc.actions.wrappers.Alias
    //#Alias.java:1:1: method: com.dmdirc.actions.wrappers.Alias.com.dmdirc.actions.wrappers.Alias__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.actions.wrappers;

import com.dmdirc.actions.Action;
import com.dmdirc.actions.ActionCondition;
import com.dmdirc.actions.interfaces.ActionType;
import com.dmdirc.actions.CoreActionComparison;
import com.dmdirc.actions.CoreActionComponent;
import com.dmdirc.actions.CoreActionType;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Actions alias wrapper.
 */
public final class Alias implements Serializable {
    
    /**
     * 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;
    
    /** Alias command. */
    private String command;
    
    /** Alias arguments. */
    private List<ActionCondition> arguments;
    
    /** Alias response. */
    private String[] response;
    
    /**
     * Creates a new Alias wrapper.
     *
     * @param command Alias command
     */
    public Alias(final String command) {
    //#Alias.java:63: method: void com.dmdirc.actions.wrappers.Alias.com.dmdirc.actions.wrappers.Alias(String)
    //#input(void com.dmdirc.actions.wrappers.Alias(String)): com/dmdirc/actions/CoreActionComparison.STRING_EQUALS
    //#input(void com.dmdirc.actions.wrappers.Alias(String)): com/dmdirc/actions/CoreActionComponent.STRING_STRING
    //#input(void com.dmdirc.actions.wrappers.Alias(String)): command
    //#input(void com.dmdirc.actions.wrappers.Alias(String)): this
    //#output(void com.dmdirc.actions.wrappers.Alias(String)): new ArrayList(Alias#1) num objects
    //#output(void com.dmdirc.actions.wrappers.Alias(String)): new String[](Alias#3) num objects
    //#output(void com.dmdirc.actions.wrappers.Alias(String)): this.response.length
    //#output(void com.dmdirc.actions.wrappers.Alias(String)): this.response[0]
    //#output(void com.dmdirc.actions.wrappers.Alias(String)): this.arguments
    //#output(void com.dmdirc.actions.wrappers.Alias(String)): this.command
    //#output(void com.dmdirc.actions.wrappers.Alias(String)): this.response
    //#new obj(void com.dmdirc.actions.wrappers.Alias(String)): new ArrayList(Alias#1)
    //#new obj(void com.dmdirc.actions.wrappers.Alias(String)): new String[](Alias#3)
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): this.arguments == &new ArrayList(Alias#1)
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): this.command == command
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): init'ed(this.command)
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): this.response == &new String[](Alias#3)
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): new ArrayList(Alias#1) num objects == 1
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): new String[](Alias#3) num objects == 1
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): this.response.length == 1
    //#post(void com.dmdirc.actions.wrappers.Alias(String)): this.response[0] == &""
        this.command = command;
        this.arguments = new ArrayList<ActionCondition>();
        this.arguments.add(new ActionCondition(1, CoreActionComponent.STRING_STRING,
                CoreActionComparison.STRING_EQUALS, command));
        this.response = new String[]{"", };
    }
    //#Alias.java:69: end of method: void com.dmdirc.actions.wrappers.Alias.com.dmdirc.actions.wrappers.Alias(String)
    
    /**
     * Wraps an existing Action in an Alias.
     *
     * @param command Alias command
     * @param arguments List of arguments for the alias
     * @param response Response for the alias
     */
    public Alias(final String command, final List<ActionCondition> arguments,
            final String[] response) {
    //#Alias.java:79: method: void com.dmdirc.actions.wrappers.Alias.com.dmdirc.actions.wrappers.Alias(String, List, String[])
    //#input(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): arguments
    //#input(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): command
    //#input(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): response
    //#input(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): response.length
    //#input(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): response[0..+Inf]
    //#input(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this
    //#output(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): new ArrayList(Alias#1) num objects
    //#output(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): new String[](Alias#2) num objects
    //#output(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.response.length
    //#output(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.response[0..+Inf]
    //#output(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.arguments
    //#output(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.command
    //#output(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.response
    //#new obj(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): new ArrayList(Alias#1)
    //#new obj(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): new String[](Alias#2)
    //#pre[3] (void com.dmdirc.actions.wrappers.Alias(String, List, String[])): response != null
    //#pre[5] (void com.dmdirc.actions.wrappers.Alias(String, List, String[])): (soft) init'ed(response[0..+Inf])
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.arguments == &new ArrayList(Alias#1)
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.command == command
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): init'ed(this.command)
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.response == &new String[](Alias#2)
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): new ArrayList(Alias#1) num objects == 1
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): new String[](Alias#2) num objects == 1
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.response.length == response.length
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): init'ed(this.response.length)
    //#post(void com.dmdirc.actions.wrappers.Alias(String, List, String[])): this.response[0..+Inf] == One-of{response[0..+Inf], undefined}
        this.command = command;
        this.arguments = new ArrayList<ActionCondition>(arguments);
        this.response = response.clone();
    }
    //#Alias.java:83: end of method: void com.dmdirc.actions.wrappers.Alias.com.dmdirc.actions.wrappers.Alias(String, List, String[])
    
    /**
     * Returns the aliases command.
     *
     * @return Aliases command
     */
    public String getCommand() {
        return command;
    //#Alias.java:91: method: String com.dmdirc.actions.wrappers.Alias.getCommand()
    //#input(String getCommand()): this
    //#input(String getCommand()): this.command
    //#output(String getCommand()): return_value
    //#pre[2] (String getCommand()): init'ed(this.command)
    //#post(String getCommand()): return_value == this.command
    //#post(String getCommand()): init'ed(return_value)
    //#Alias.java:91: end of method: String com.dmdirc.actions.wrappers.Alias.getCommand()
    }
    
    /**
     * Sets the aliases command.
     *
     * @param command Command to give the alias
     */
    public void setCommand(final String command) {
        if (!this.command.equals(command)) {
    //#Alias.java:100: method: void com.dmdirc.actions.wrappers.Alias.setCommand(String)
    //#input(void setCommand(String)): com/dmdirc/actions/ActionCondition.__Descendant_Table[com/dmdirc/actions/ActionCondition]
    //#input(void setCommand(String)): com/dmdirc/actions/ActionCondition.__Descendant_Table[others]
    //#input(void setCommand(String)): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getComparison()Lcom/dmdirc/actions/interfaces/ActionComparison;
    //#input(void setCommand(String)): com/dmdirc/actions/ActionCondition.__Dispatch_Table.setTarget(Ljava/lang/String;)V
    //#input(void setCommand(String)): com/dmdirc/actions/CoreActionComparison.STRING_EQUALS
    //#input(void setCommand(String)): command
    //#input(void setCommand(String)): this
    //#input(void setCommand(String)): this.arguments
    //#input(void setCommand(String)): this.command
    //#output(void setCommand(String)): this.command
    //#pre[2] (void setCommand(String)): this.command != null
    //#pre[4] (void setCommand(String)): (soft) this.arguments != null
    //#presumption(void setCommand(String)): argument.__Tag@105 == com/dmdirc/actions/ActionCondition
    //#presumption(void setCommand(String)): java.util.List:get(...).__Tag@105 == com/dmdirc/actions/ActionCondition
    //#presumption(void setCommand(String)): java.util.List:get(...).__Tag@108 == com/dmdirc/actions/ActionCondition
    //#presumption(void setCommand(String)): java.util.List:get(...)@105 != null
    //#presumption(void setCommand(String)): java.util.List:get(...)@108 != null
    //#post(void setCommand(String)): this.command == One-of{old this.command, command}
    //#post(void setCommand(String)): init'ed(this.command)
    //#test_vector(void setCommand(String)): argument.comparison@105: Addr_Set{&com.dmdirc.actions.CoreActionComparison__static_init.new CoreActionComparison$2(CoreActionComparison__static_init#2)}, Inverse{&com.dmdirc.actions.CoreActionComparison__static_init.new CoreActionComparison$2(CoreActionComparison__static_init#2)}
    //#test_vector(void setCommand(String)): java.lang.String:equals(...)@100: {1}, {0}
            this.command = command;
            
            ActionCondition argument;
            
            argument = arguments.get(0);
            
            if (argument.getComparison() != CoreActionComparison.STRING_EQUALS) {
                argument = arguments.get(1);
            }
            
            argument.setTarget(command);
        }
    }
    //#Alias.java:113: end of method: void com.dmdirc.actions.wrappers.Alias.setCommand(String)
    
    /**
     * Returns the aliases name.
     *
     * @return Aliases name
     */
    public String getName() {
        final ActionCondition condition = getArgsArgument();
    //#Alias.java:121: method: String com.dmdirc.actions.wrappers.Alias.getName()
    //#input(String getName()): "-"._tainted
    //#input(String getName()): "-Any"._tainted
    //#input(String getName()): "equals"._tainted
    //#input(String getName()): "greater"._tainted
    //#input(String getName()): "less"._tainted
    //#input(String getName()): com/dmdirc/actions/ActionCondition.__Descendant_Table[com/dmdirc/actions/ActionCondition]
    //#input(String getName()): com/dmdirc/actions/ActionCondition.__Descendant_Table[others]
    //#input(String getName()): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getComparison()Lcom/dmdirc/actions/interfaces/ActionComparison;
    //#input(String getName()): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getTarget()Ljava/lang/String;
    //#input(String getName()): com/dmdirc/actions/CoreActionComparison.INT_EQUALS
    //#input(String getName()): com/dmdirc/actions/CoreActionComparison.INT_GREATER
    //#input(String getName()): com/dmdirc/actions/CoreActionComparison.INT_LESS
    //#input(String getName()): com/dmdirc/actions/CoreActionComparison.STRING_EQUALS
    //#input(String getName()): this
    //#input(String getName()): this.arguments
    //#input(String getName()): this.command
    //#input(String getName()): this.command._tainted
    //#output(String getName()): java.lang.StringBuilder:toString(...)._tainted
    //#output(String getName()): return_value
    //#new obj(String getName()): java.lang.StringBuilder:toString(...)
    //#pre[2] (String getName()): this.arguments != null
    //#pre[3] (String getName()): init'ed(this.command)
    //#presumption(String getName()): condition.__Tag == com/dmdirc/actions/ActionCondition
    //#presumption(String getName()): condition.comparison != null
    //#post(String getName()): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(String getName()): return_value in Addr_Set{&java.lang.StringBuilder:toString(...),&java.lang.StringBuilder:toString(...)}
    //#unanalyzed(String getName()): Effects-of-calling:java.util.List:get
    //#unanalyzed(String getName()): Effects-of-calling:java.util.List:size
    //#test_vector(String getName()): java.lang.Object:equals(...)@126: {0}, {1}
    //#test_vector(String getName()): java.lang.Object:equals(...)@128: {0}, {1}
    //#test_vector(String getName()): java.lang.Object:equals(...)@130: {0}, {1}
        if (condition == null) {
            return command + "-Any";
        } else {
            final String comparison;
            if (condition.getComparison().equals(CoreActionComparison.INT_EQUALS)) {
                comparison = "equals";
            } else if (condition.getComparison().equals(CoreActionComparison.INT_GREATER)) {
                comparison = "greater";
            } else if (condition.getComparison().equals(CoreActionComparison.INT_LESS)) {
                comparison = "less";
            } else {
                comparison = condition.getComparison().toString();
            }
            return command + "-" + comparison + "-" + condition.getTarget();
    //#Alias.java:135: end of method: String com.dmdirc.actions.wrappers.Alias.getName()
        }
    }
    
    /**
     * Gets the aliases arguments.
     *
     * @return Argument list
     */
    public List<ActionCondition> getArguments() {
        return new ArrayList<ActionCondition>(arguments);
    //#Alias.java:145: method: List com.dmdirc.actions.wrappers.Alias.getArguments()
    //#input(List getArguments()): this
    //#input(List getArguments()): this.arguments
    //#output(List getArguments()): new ArrayList(getArguments#1) num objects
    //#output(List getArguments()): return_value
    //#new obj(List getArguments()): new ArrayList(getArguments#1)
    //#pre[2] (List getArguments()): init'ed(this.arguments)
    //#post(List getArguments()): return_value == &new ArrayList(getArguments#1)
    //#post(List getArguments()): new ArrayList(getArguments#1) num objects == 1
    //#Alias.java:145: end of method: List com.dmdirc.actions.wrappers.Alias.getArguments()
    }
    
    /**
     * Gets the aliases number of arguments argument.
     *
     * @return Number of arguments ActionCondition or null
     */
    public ActionCondition getArgsArgument() {
        ActionCondition argument;
        
        argument = arguments.get(0);
    //#Alias.java:156: method: ActionCondition com.dmdirc.actions.wrappers.Alias.getArgsArgument()
    //#input(ActionCondition getArgsArgument()): com/dmdirc/actions/ActionCondition.__Descendant_Table[com/dmdirc/actions/ActionCondition]
    //#input(ActionCondition getArgsArgument()): com/dmdirc/actions/ActionCondition.__Descendant_Table[others]
    //#input(ActionCondition getArgsArgument()): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getComparison()Lcom/dmdirc/actions/interfaces/ActionComparison;
    //#input(ActionCondition getArgsArgument()): com/dmdirc/actions/CoreActionComparison.STRING_EQUALS
    //#input(ActionCondition getArgsArgument()): this
    //#input(ActionCondition getArgsArgument()): this.arguments
    //#output(ActionCondition getArgsArgument()): return_value
    //#pre[2] (ActionCondition getArgsArgument()): this.arguments != null
    //#presumption(ActionCondition getArgsArgument()): java.util.List:get(...).__Tag@156 == com/dmdirc/actions/ActionCondition
    //#presumption(ActionCondition getArgsArgument()): java.util.List:get(...).__Tag@160 == com/dmdirc/actions/ActionCondition
    //#presumption(ActionCondition getArgsArgument()): java.util.List:get(...)@156 != null
    //#post(ActionCondition getArgsArgument()): init'ed(return_value)
    //#test_vector(ActionCondition getArgsArgument()): argument.comparison@156: Inverse{&com.dmdirc.actions.CoreActionComparison__static_init.new CoreActionComparison$2(CoreActionComparison__static_init#2)}, Addr_Set{&com.dmdirc.actions.CoreActionComparison__static_init.new CoreActionComparison$2(CoreActionComparison__static_init#2)}
    //#test_vector(ActionCondition getArgsArgument()): java.util.List:size(...)@159: {-2_147_483_648..1}, {2..4_294_967_295}
        
        if (argument.getComparison() == CoreActionComparison.STRING_EQUALS) {
            if (arguments.size() > 1) {
                argument = arguments.get(1);
            } else {
                argument = null;
            }
        }
        
        return argument;
    //#Alias.java:166: end of method: ActionCondition com.dmdirc.actions.wrappers.Alias.getArgsArgument()
    }
    
    /**
     * Sets the aliases arguments.
     *
     * @param arguments A new list of arguments to set
     */
    public void setArguments(final List<ActionCondition> arguments) {
        if (!this.arguments.equals(arguments)) {
    //#Alias.java:175: method: void com.dmdirc.actions.wrappers.Alias.setArguments(List)
    //#input(void setArguments(List)): arguments
    //#input(void setArguments(List)): this
    //#input(void setArguments(List)): this.arguments
    //#output(void setArguments(List)): new ArrayList(setArguments#1) num objects
    //#output(void setArguments(List)): this.arguments
    //#new obj(void setArguments(List)): new ArrayList(setArguments#1)
    //#pre[2] (void setArguments(List)): this.arguments != null
    //#post(void setArguments(List)): this.arguments == One-of{old this.arguments, &new ArrayList(setArguments#1)}
    //#post(void setArguments(List)): this.arguments != null
    //#post(void setArguments(List)): new ArrayList(setArguments#1) num objects <= 1
    //#test_vector(void setArguments(List)): java.lang.Object:equals(...)@175: {1}, {0}
            this.arguments = new ArrayList<ActionCondition>(arguments);
        }
    }
    //#Alias.java:178: end of method: void com.dmdirc.actions.wrappers.Alias.setArguments(List)
    
    /**
     * Gets the aliases response.
     *
     * @return Response
     */
    public String[] getResponse() {
        return response.clone();
    //#Alias.java:186: method: String[] com.dmdirc.actions.wrappers.Alias.getResponse()
    //#input(String[] getResponse()): this
    //#input(String[] getResponse()): this.response
    //#input(String[] getResponse()): this.response.length
    //#input(String[] getResponse()): this.response[0..+Inf]
    //#output(String[] getResponse()): new String[](getResponse#1) num objects
    //#output(String[] getResponse()): return_value.length
    //#output(String[] getResponse()): return_value[0..+Inf]
    //#output(String[] getResponse()): return_value
    //#new obj(String[] getResponse()): new String[](getResponse#1)
    //#pre[2] (String[] getResponse()): this.response != null
    //#pre[4] (String[] getResponse()): (soft) init'ed(this.response[0..+Inf])
    //#post(String[] getResponse()): return_value == &new String[](getResponse#1)
    //#post(String[] getResponse()): new String[](getResponse#1) num objects == 1
    //#post(String[] getResponse()): return_value.length == this.response.length
    //#post(String[] getResponse()): init'ed(return_value.length)
    //#post(String[] getResponse()): return_value[0..+Inf] == One-of{this.response[0..+Inf], undefined}
    //#Alias.java:186: end of method: String[] com.dmdirc.actions.wrappers.Alias.getResponse()
    }
    
    /**
     * Sets the aliases response.
     *
     * @param response New Response
     */
    public void setResponse(final String[] response) {
        if (!Arrays.equals(this.response, response)) {
    //#Alias.java:195: method: void com.dmdirc.actions.wrappers.Alias.setResponse(String[])
    //#input(void setResponse(String[])): response
    //#input(void setResponse(String[])): response.length
    //#input(void setResponse(String[])): response[0..+Inf]
    //#input(void setResponse(String[])): this
    //#input(void setResponse(String[])): this.response
    //#output(void setResponse(String[])): new String[](setResponse#1) num objects
    //#output(void setResponse(String[])): new String[](setResponse#1).length
    //#output(void setResponse(String[])): new String[](setResponse#1)[0..+Inf]
    //#output(void setResponse(String[])): this.response
    //#new obj(void setResponse(String[])): new String[](setResponse#1)
    //#pre[1] (void setResponse(String[])): init'ed(this.response)
    //#pre[2] (void setResponse(String[])): (soft) response != null
    //#pre[4] (void setResponse(String[])): (soft) init'ed(response[0..+Inf])
    //#post(void setResponse(String[])): this.response == One-of{old this.response, &new String[](setResponse#1)}
    //#post(void setResponse(String[])): init'ed(this.response)
    //#post(void setResponse(String[])): new String[](setResponse#1) num objects <= 1
    //#post(void setResponse(String[])): new String[](setResponse#1).length == response.length
    //#post(void setResponse(String[])): init'ed(new String[](setResponse#1).length)
    //#post(void setResponse(String[])): possibly_updated(new String[](setResponse#1)[0..+Inf])
    //#test_vector(void setResponse(String[])): java.util.Arrays:equals(...)@195: {1}, {0}
            this.response = response.clone();
        }
    }
    //#Alias.java:198: end of method: void com.dmdirc.actions.wrappers.Alias.setResponse(String[])
    
    /**
     * Updates this alias with the details of another alias.
     *
     * @param alias Alias to retrieve details from
     */
    public void update(final Alias alias) {
        setArguments(alias.getArguments());
    //#Alias.java:206: method: void com.dmdirc.actions.wrappers.Alias.update(Alias)
    //#input(void update(Alias)): alias
    //#input(void update(Alias)): alias.arguments
    //#input(void update(Alias)): alias.command
    //#input(void update(Alias)): alias.response
    //#input(void update(Alias)): alias.response.length
    //#input(void update(Alias)): alias.response[0..+Inf]
    //#input(void update(Alias)): com/dmdirc/actions/ActionCondition.__Descendant_Table[com/dmdirc/actions/ActionCondition]
    //#input(void update(Alias)): com/dmdirc/actions/ActionCondition.__Descendant_Table[others]
    //#input(void update(Alias)): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getComparison()Lcom/dmdirc/actions/interfaces/ActionComparison;
    //#input(void update(Alias)): com/dmdirc/actions/ActionCondition.__Dispatch_Table.setTarget(Ljava/lang/String;)V
    //#input(void update(Alias)): com/dmdirc/actions/CoreActionComparison.STRING_EQUALS
    //#input(void update(Alias)): this
    //#input(void update(Alias)): this.arguments
    //#input(void update(Alias)): this.command
    //#input(void update(Alias)): this.response
    //#output(void update(Alias)): new ArrayList(setArguments#1) num objects
    //#output(void update(Alias)): new String[](setResponse#1) num objects
    //#output(void update(Alias)): new String[](setResponse#1).length
    //#output(void update(Alias)): new String[](setResponse#1)[0..+Inf]
    //#output(void update(Alias)): this.arguments
    //#output(void update(Alias)): this.command
    //#output(void update(Alias)): this.response
    //#new obj(void update(Alias)): new ArrayList(setArguments#1)
    //#new obj(void update(Alias)): new String[](setResponse#1)
    //#pre[1] (void update(Alias)): alias != null
    //#pre[2] (void update(Alias)): init'ed(alias.arguments)
    //#pre[3] (void update(Alias)): init'ed(alias.command)
    //#pre[4] (void update(Alias)): alias.response != null
    //#pre[7] (void update(Alias)): this.arguments != null
    //#pre[8] (void update(Alias)): this.command != null
    //#pre[9] (void update(Alias)): init'ed(this.response)
    //#pre[6] (void update(Alias)): (soft) init'ed(alias.response[0..+Inf])
    //#post(void update(Alias)): this.arguments == One-of{old this.arguments, &new ArrayList(setArguments#1)}
    //#post(void update(Alias)): this.arguments != null
    //#post(void update(Alias)): this.command == One-of{old this.command, alias.command}
    //#post(void update(Alias)): init'ed(this.command)
    //#post(void update(Alias)): this.response == One-of{old this.response, &new String[](setResponse#1)}
    //#post(void update(Alias)): init'ed(this.response)
    //#post(void update(Alias)): new ArrayList(setArguments#1) num objects <= 1
    //#post(void update(Alias)): new String[](setResponse#1) num objects <= 1
    //#post(void update(Alias)): new String[](setResponse#1).length == alias.response.length
    //#post(void update(Alias)): init'ed(new String[](setResponse#1).length)
    //#post(void update(Alias)): possibly_updated(new String[](setResponse#1)[0..+Inf])
    //#unanalyzed(void update(Alias)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void update(Alias)): Effects-of-calling:java.util.Arrays:equals
    //#unanalyzed(void update(Alias)): Effects-of-calling:java.lang.Object:equals
    //#unanalyzed(void update(Alias)): Effects-of-calling:java.util.List:get
    //#unanalyzed(void update(Alias)): Effects-of-calling:java.lang.String:equals
        setCommand(alias.getCommand());
        setResponse(alias.getResponse());
    //#Alias.java:208: ?precondition failure
    //#    com/dmdirc/actions/wrappers/Alias.setResponse: (soft) init'ed(response[0..+Inf])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.actions.wrappers.Alias
    //#    method: void update(Alias)
    //#    basic block: Entry_BB_1
    //#    assertion: (soft) init'ed(getResponse(...)[0..+Inf])
    //#    callee: void com/dmdirc/actions/wrappers/Alias.setResponse(String[])
    //#    callee assertion: (soft) init'ed(response[0..+Inf])
    //#    callee file: Alias.java
    //#    callee precondition index: [4]
    //#    callee srcpos: 195
    //#    VN: getResponse(...)[0..+Inf]
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Soft  Bad only invalid
    }
    //#Alias.java:209: end of method: void com.dmdirc.actions.wrappers.Alias.update(Alias)
    
    /**
     * Checks if the specified alias matches this one
     *
     * @param alias Alias to check a match with
     *
     * @return true iif the alias matches this one
     */
    public boolean matches(final Alias alias) {
        return alias.getCommand().equalsIgnoreCase(command) 
    //#Alias.java:219: method: bool com.dmdirc.actions.wrappers.Alias.matches(Alias)
    //#input(bool matches(Alias)): alias
    //#input(bool matches(Alias)): alias.arguments
    //#input(bool matches(Alias)): alias.command
    //#input(bool matches(Alias)): this
    //#input(bool matches(Alias)): this.arguments
    //#input(bool matches(Alias)): this.command
    //#output(bool matches(Alias)): return_value
    //#pre[1] (bool matches(Alias)): alias != null
    //#pre[3] (bool matches(Alias)): alias.command != null
    //#pre[6] (bool matches(Alias)): init'ed(this.command)
    //#pre[2] (bool matches(Alias)): (soft) init'ed(alias.arguments)
    //#pre[5] (bool matches(Alias)): (soft) init'ed(this.arguments)
    //#post(bool matches(Alias)): init'ed(return_value)
    //#unanalyzed(bool matches(Alias)): Effects-of-calling:java.util.ArrayList
    //#Alias.java:219: end of method: bool com.dmdirc.actions.wrappers.Alias.matches(Alias)
                && alias.getArguments().equals(arguments);
    }
    
    /**
     * Creates an action corresponding to this alias.
     * 
     * @return A new action for this alias.
     */
    public Action createAction() {
        return new Action(
    //#Alias.java:229: method: Action com.dmdirc.actions.wrappers.Alias.createAction()
    //#Alias.java:229: Warning: unused assignment in callee
    //#    Unused assignment to (java.lang.StringBuilder:toString(...)._tainted, java.lang.StringBuilder:toString(...)._tainted) in getName
    //#    severity: LOW
    //#    class: com.dmdirc.actions.wrappers.Alias
    //#    method: Action createAction()
    //#Alias.java:229: Warning: call too complex - analysis skipped
    //#    call on void com.dmdirc.actions.Action(String, String, ActionType[], String[], List, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.actions.wrappers.Alias
    //#    method: Action createAction()
    //#    unanalyzed callee: void com.dmdirc.actions.Action(String, String, ActionType[], String[], List, String)
    //#input(Action createAction()): "-"._tainted
    //#input(Action createAction()): "-Any"._tainted
    //#input(Action createAction()): "equals"._tainted
    //#input(Action createAction()): "greater"._tainted
    //#input(Action createAction()): "less"._tainted
    //#input(Action createAction()): com/dmdirc/actions/ActionCondition.__Descendant_Table[com/dmdirc/actions/ActionCondition]
    //#input(Action createAction()): com/dmdirc/actions/ActionCondition.__Descendant_Table[others]
    //#input(Action createAction()): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getComparison()Lcom/dmdirc/actions/interfaces/ActionComparison;
    //#input(Action createAction()): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getTarget()Ljava/lang/String;
    //#input(Action createAction()): com/dmdirc/actions/CoreActionComparison.INT_EQUALS
    //#input(Action createAction()): com/dmdirc/actions/CoreActionComparison.INT_GREATER
    //#input(Action createAction()): com/dmdirc/actions/CoreActionComparison.INT_LESS
    //#input(Action createAction()): com/dmdirc/actions/CoreActionComparison.STRING_EQUALS
    //#input(Action createAction()): com/dmdirc/actions/CoreActionType.UNKNOWN_COMMAND
    //#input(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.__Class_Obj.__Lock
    //#input(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.__Descendant_Table[com/dmdirc/actions/wrappers/AliasWrapper]
    //#input(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.__Descendant_Table[others]
    //#input(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.me
    //#input(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.me.__Tag
    //#input(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.me.name
    //#input(Action createAction()): this
    //#input(Action createAction()): this.arguments
    //#input(Action createAction()): this.command
    //#input(Action createAction()): this.command._tainted
    //#input(Action createAction()): this.response
    //#input(Action createAction()): this.response.length
    //#input(Action createAction()): this.response[0..+Inf]
    //#output(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.me
    //#output(Action createAction()): new Action(createAction#1) num objects
    //#output(Action createAction()): return_value.__Tag
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1) num objects
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).__Tag
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).actions
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).aliases
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).author
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).component
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).description
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).name
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).settings
    //#output(Action createAction()): new AliasWrapper(getAliasWrapper#1).version
    //#output(Action createAction()): new ArrayList(ActionGroup#1) num objects
    //#output(Action createAction()): new ArrayList(AliasWrapper#1) num objects
    //#output(Action createAction()): new HashMap(ActionGroup#2) num objects
    //#output(Action createAction()): return_value
    //#new obj(Action createAction()): new Action(createAction#1)
    //#new obj(Action createAction()): new AliasWrapper(getAliasWrapper#1)
    //#new obj(Action createAction()): new ArrayList(ActionGroup#1)
    //#new obj(Action createAction()): new ArrayList(AliasWrapper#1)
    //#new obj(Action createAction()): new HashMap(ActionGroup#2)
    //#pre[1] (Action createAction()): init'ed(com/dmdirc/actions/wrappers/AliasWrapper.me)
    //#pre[3] (Action createAction()): this.arguments != null
    //#pre[4] (Action createAction()): init'ed(this.command)
    //#pre[6] (Action createAction()): this.response != null
    //#pre[8] (Action createAction()): (soft) init'ed(this.response[0..+Inf])
    //#presumption(Action createAction()): getAliasWrapper(...).__Tag == com/dmdirc/actions/wrappers/AliasWrapper
    //#post(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.me == One-of{old com/dmdirc/actions/wrappers/AliasWrapper.me, &new AliasWrapper(getAliasWrapper#1)}
    //#post(Action createAction()): com/dmdirc/actions/wrappers/AliasWrapper.me != null
    //#post(Action createAction()): return_value == &new Action(createAction#1)
    //#post(Action createAction()): new Action(createAction#1) num objects == 1
    //#post(Action createAction()): return_value.__Tag == com/dmdirc/actions/Action
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1) num objects <= 1
    //#post(Action createAction()): new ArrayList(ActionGroup#1) num objects == new AliasWrapper(getAliasWrapper#1) num objects
    //#post(Action createAction()): new ArrayList(AliasWrapper#1) num objects == new AliasWrapper(getAliasWrapper#1) num objects
    //#post(Action createAction()): new HashMap(ActionGroup#2) num objects == new AliasWrapper(getAliasWrapper#1) num objects
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).__Tag == com/dmdirc/actions/wrappers/AliasWrapper
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).actions == &new ArrayList(ActionGroup#1)
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).aliases == &new ArrayList(AliasWrapper#1)
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).author == null
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).description == null
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).component == -1
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).version == -1
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).name == &"aliases"
    //#post(Action createAction()): new AliasWrapper(getAliasWrapper#1).settings == &new HashMap(ActionGroup#2)
    //#unanalyzed(Action createAction()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(Action createAction()): Effects-of-calling:java.lang.Object:equals
    //#unanalyzed(Action createAction()): Effects-of-calling:com.dmdirc.actions.ActionGroup
    //#unanalyzed(Action createAction()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(Action createAction()): Effects-of-calling:java.util.List:get
    //#unanalyzed(Action createAction()): Effects-of-calling:java.util.List:size
    //#unanalyzed(Action createAction()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(Action createAction()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(Action createAction()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(Action createAction()): Effects-of-calling:java.lang.Object:toString
    //#Alias.java:229: end of method: Action com.dmdirc.actions.wrappers.Alias.createAction()
                AliasWrapper.getAliasWrapper().getName(),
                getName(),
                new ActionType[] {CoreActionType.UNKNOWN_COMMAND, },
                getResponse(),
                getArguments(),
                "");
    }
    
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return "[name=aliases/" + getName() + ", triggers="
    //#Alias.java:241: method: String com.dmdirc.actions.wrappers.Alias.toString()
    //#input(String toString()): ", "._tainted
    //#input(String toString()): ", format='']"._tainted
    //#input(String toString()): ", triggers="._tainted
    //#input(String toString()): "-"._tainted
    //#input(String toString()): "-Any"._tainted
    //#input(String toString()): "[UNKNOWN_COMMAND], response="._tainted
    //#input(String toString()): "[name=aliases."._tainted
    //#input(String toString()): "equals"._tainted
    //#input(String toString()): "greater"._tainted
    //#input(String toString()): "less"._tainted
    //#input(String toString()): com/dmdirc/actions/ActionCondition.__Descendant_Table[com/dmdirc/actions/ActionCondition]
    //#input(String toString()): com/dmdirc/actions/ActionCondition.__Descendant_Table[others]
    //#input(String toString()): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getComparison()Lcom/dmdirc/actions/interfaces/ActionComparison;
    //#input(String toString()): com/dmdirc/actions/ActionCondition.__Dispatch_Table.getTarget()Ljava/lang/String;
    //#input(String toString()): com/dmdirc/actions/CoreActionComparison.INT_EQUALS
    //#input(String toString()): com/dmdirc/actions/CoreActionComparison.INT_GREATER
    //#input(String toString()): com/dmdirc/actions/CoreActionComparison.INT_LESS
    //#input(String toString()): com/dmdirc/actions/CoreActionComparison.STRING_EQUALS
    //#input(String toString()): this
    //#input(String toString()): this.arguments
    //#input(String toString()): this.arguments._tainted
    //#input(String toString()): this.command
    //#input(String toString()): this.command._tainted
    //#input(String toString()): this.response
    //#output(String toString()): java.lang.StringBuilder:toString(...)._tainted
    //#output(String toString()): return_value
    //#new obj(String toString()): java.lang.StringBuilder:toString(...)
    //#pre[2] (String toString()): this.arguments != null
    //#pre[4] (String toString()): init'ed(this.command)
    //#pre[6] (String toString()): init'ed(this.response)
    //#post(String toString()): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(String toString()): return_value == &java.lang.StringBuilder:toString(...)
    //#unanalyzed(String toString()): Effects-of-calling:java.lang.Object:equals
    //#unanalyzed(String toString()): Effects-of-calling:java.util.List:get
    //#unanalyzed(String toString()): Effects-of-calling:java.util.List:size
    //#unanalyzed(String toString()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String toString()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String toString()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String toString()): Effects-of-calling:java.lang.Object:toString
    //#Alias.java:241: end of method: String com.dmdirc.actions.wrappers.Alias.toString()
                + "[UNKNOWN_COMMAND], response="
                + Arrays.toString(response) + ", "
                + arguments + ", format='']";
    }
}
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Descendant_Table[com/dmdirc/actions/wrappers/Alias]
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.createAction()Lcom/dmdirc/actions/Action;
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getArgsArgument()Lcom/dmdirc/actions/ActionCondition;
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getArguments()Ljava/util/List;
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getCommand()Ljava/lang/String;
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getResponse()[Ljava/lang/String;
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.matches(Lcom/dmdirc/actions/wrappers/Alias;)Z
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.setArguments(Ljava/util/List;)V
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.setCommand(Ljava/lang/String;)V
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.setResponse([Ljava/lang/String;)V
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#output(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.update(Lcom/dmdirc/actions/wrappers/Alias;)V
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Descendant_Table[com/dmdirc/actions/wrappers/Alias] == &__Dispatch_Table
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.createAction()Lcom/dmdirc/actions/Action; == &createAction
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getArgsArgument()Lcom/dmdirc/actions/ActionCondition; == &getArgsArgument
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getArguments()Ljava/util/List; == &getArguments
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getCommand()Ljava/lang/String; == &getCommand
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &getName
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.getResponse()[Ljava/lang/String; == &getResponse
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.matches(Lcom/dmdirc/actions/wrappers/Alias;)Z == &matches
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.setArguments(Ljava/util/List;)V == &setArguments
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.setCommand(Ljava/lang/String;)V == &setCommand
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.setResponse([Ljava/lang/String;)V == &setResponse
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#post(com.dmdirc.actions.wrappers.Alias__static_init): __Dispatch_Table.update(Lcom/dmdirc/actions/wrappers/Alias;)V == &update
    //#Alias.java:: end of method: com.dmdirc.actions.wrappers.Alias.com.dmdirc.actions.wrappers.Alias__static_init
    //#Alias.java:: end of class: com.dmdirc.actions.wrappers.Alias
