//# 0 errors, 271 messages
//#
/*
    //#AddonInfo.java:1:1: class: com.dmdirc.addons.addonbrowser.AddonInfo$AddonType
    //#AddonInfo.java:1:1: class: com.dmdirc.addons.addonbrowser.AddonInfo
    //#AddonInfo.java:1:1: method: com.dmdirc.addons.addonbrowser.AddonInfo.com.dmdirc.addons.addonbrowser.AddonInfo__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.addonbrowser;

import com.dmdirc.Main;
import com.dmdirc.updater.UpdateChannel;
import com.dmdirc.updater.UpdateChecker;
import com.dmdirc.updater.UpdateComponent;
import com.dmdirc.util.URLBuilder;

import java.awt.Image;
import java.util.Map;

import javax.swing.ImageIcon;

/**
 * Describes an addon.
 * 
 * @author chris
 */
public class AddonInfo {
    
    /**
     * The possible addon types.
     */
    public static enum AddonType {
    //#AddonInfo.java:46: method: AddonInfo$AddonType[] com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.values()
    //#input(AddonInfo$AddonType[] values()): $VALUES
    //#input(AddonInfo$AddonType[] values()): $VALUES.length
    //#input(AddonInfo$AddonType[] values()): $VALUES[0..3]
    //#output(AddonInfo$AddonType[] values()): new AddonInfo$AddonType[](values#1) num objects
    //#output(AddonInfo$AddonType[] values()): return_value.length
    //#output(AddonInfo$AddonType[] values()): return_value[0..3]
    //#output(AddonInfo$AddonType[] values()): return_value
    //#new obj(AddonInfo$AddonType[] values()): new AddonInfo$AddonType[](values#1)
    //#pre[1] (AddonInfo$AddonType[] values()): (soft) init'ed($VALUES[0..3])
    //#post(AddonInfo$AddonType[] values()): return_value == &new AddonInfo$AddonType[](values#1)
    //#post(AddonInfo$AddonType[] values()): new AddonInfo$AddonType[](values#1) num objects == 1
    //#post(AddonInfo$AddonType[] values()): return_value.length == 3
    //#post(AddonInfo$AddonType[] values()): return_value[0..3] == One-of{$VALUES[0..3], undefined}
    //#AddonInfo.java:46: end of method: AddonInfo$AddonType[] com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.values()
    //#AddonInfo.java:46: method: AddonInfo$AddonType com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.valueOf(String)
    //#input(AddonInfo$AddonType valueOf(String)): __Descendant_Table[com/dmdirc/addons/addonbrowser/AddonInfo$AddonType]
    //#input(AddonInfo$AddonType valueOf(String)): __Descendant_Table[others]
    //#input(AddonInfo$AddonType valueOf(String)): name
    //#output(AddonInfo$AddonType valueOf(String)): return_value
    //#presumption(AddonInfo$AddonType valueOf(String)): java.lang.Enum:valueOf(...).__Tag@46 == com/dmdirc/addons/addonbrowser/AddonInfo$AddonType
    //#post(AddonInfo$AddonType valueOf(String)): init'ed(return_value)
    //#AddonInfo.java:46: end of method: AddonInfo$AddonType com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.valueOf(String)
    //#AddonInfo.java:46: method: void com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.com.dmdirc.addons.addonbrowser.AddonInfo$AddonType(String, int)
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo$AddonType(String, int)): Param_1
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo$AddonType(String, int)): Param_2
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo$AddonType(String, int)): this
    //#AddonInfo.java:46: end of method: void com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.com.dmdirc.addons.addonbrowser.AddonInfo$AddonType(String, int)
        /** Plugins. */
        TYPE_PLUGIN,
    //#AddonInfo.java:48: method: com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_ACTION_PACK
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_PLUGIN
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_THEME
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): __Descendant_Table[com/dmdirc/addons/addonbrowser/AddonInfo$AddonType]
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#1) num objects
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_PLUGIN.__Tag
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#2) num objects
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_THEME.__Tag
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#3) num objects
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_ACTION_PACK.__Tag
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType[](AddonInfo$AddonType__static_init#4) num objects
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES.length
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES[0]
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES[1]
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES[2]
    //#new obj(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#1)
    //#new obj(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#2)
    //#new obj(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#3)
    //#new obj(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType[](AddonInfo$AddonType__static_init#4)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES == &new AddonInfo$AddonType[](AddonInfo$AddonType__static_init#4)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_ACTION_PACK == &new AddonInfo$AddonType(AddonInfo$AddonType__static_init#3)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES[2] == &new AddonInfo$AddonType(AddonInfo$AddonType__static_init#3)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_PLUGIN == &new AddonInfo$AddonType(AddonInfo$AddonType__static_init#1)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES[0] == &new AddonInfo$AddonType(AddonInfo$AddonType__static_init#1)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_THEME == &new AddonInfo$AddonType(AddonInfo$AddonType__static_init#2)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES[1] == &new AddonInfo$AddonType(AddonInfo$AddonType__static_init#2)
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): __Descendant_Table[com/dmdirc/addons/addonbrowser/AddonInfo$AddonType] == &__Dispatch_Table
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#1) num objects == 1
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#2) num objects == 1
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType(AddonInfo$AddonType__static_init#3) num objects == 1
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): new AddonInfo$AddonType[](AddonInfo$AddonType__static_init#4) num objects == 1
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_PLUGIN.__Tag == com/dmdirc/addons/addonbrowser/AddonInfo$AddonType
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_THEME.__Tag == com/dmdirc/addons/addonbrowser/AddonInfo$AddonType
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): TYPE_ACTION_PACK.__Tag == com/dmdirc/addons/addonbrowser/AddonInfo$AddonType
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): $VALUES.length == 3
    //#unanalyzed(com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init): Effects-of-calling:java.lang.Enum
        /** Themes. */
        TYPE_THEME,
        /** Action packs. */
        TYPE_ACTION_PACK;
    //#AddonInfo.java:52: end of method: com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init

        /** {@inheritDoc} */
        @Override
        public String toString() {
            return super.toString().charAt(5) + 
    //#AddonInfo.java:57: method: String com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.toString()
    //#input(String toString()): this
    //#input(String toString()): this._tainted
    //#output(String toString()): java.lang.StringBuilder:toString(...)._tainted
    //#output(String toString()): return_value
    //#new obj(String toString()): java.lang.StringBuilder:toString(...)
    //#post(String toString()): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String toString()): return_value == &java.lang.StringBuilder:toString(...)
    //#AddonInfo.java:57: end of method: String com.dmdirc.addons.addonbrowser.AddonInfo$AddonType.toString()
                    super.toString().substring(6).toLowerCase().replace('_', ' ');
        }
    };
    
    private final int id;
    private final String stableDownload;
    private final String unstableDownload;
    private final String title;
    private final String author;
    private final int rating;
    private final String description;
    private final AddonType type;
    private final boolean verified;
    private final int date;
    private final ImageIcon screenshot;

    public AddonInfo(final Map<String, String> entry) {
    //#AddonInfo.java:74: method: void com.dmdirc.addons.addonbrowser.AddonInfo.com.dmdirc.addons.addonbrowser.AddonInfo(Map)
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): "http:..addons.dmdirc.com.addonimg."._tainted
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): com/dmdirc/addons/addonbrowser/AddonInfo$AddonType.TYPE_ACTION_PACK
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): com/dmdirc/addons/addonbrowser/AddonInfo$AddonType.TYPE_PLUGIN
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): com/dmdirc/addons/addonbrowser/AddonInfo$AddonType.TYPE_THEME
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): entry
    //#input(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): new ImageIcon(AddonInfo#1) num objects
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): new ImageIcon(AddonInfo#3) num objects
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.author
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.date
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.description
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.id
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.rating
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.screenshot
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.stableDownload
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.title
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.type
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.unstableDownload
    //#output(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.verified
    //#new obj(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): new ImageIcon(AddonInfo#1)
    //#new obj(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): new ImageIcon(AddonInfo#3)
    //#pre[1] (void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): entry != null
    //#presumption(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): java.util.Map:get(...)@79 != null
    //#presumption(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): java.util.Map:get(...)@79 != null
    //#presumption(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): java.util.Map:get(...)@85 != null
    //#presumption(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): java.util.Map:get(...)@87 != null
    //#presumption(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): javax.swing.ImageIcon:getImage(...)@90 != null
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.author)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.date)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.description)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.id)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.rating)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.screenshot in Addr_Set{&new ImageIcon(AddonInfo#3),&new ImageIcon(AddonInfo#1)}
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.stableDownload)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.title)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.type == One-of{&com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init.new AddonInfo$AddonType(AddonInfo$AddonType__static_init#1), &com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init.new AddonInfo$AddonType(AddonInfo$AddonType__static_init#2...
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): this.type in Addr_Set{&com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init.new AddonInfo$AddonType(AddonInfo$AddonType__static_init#3),&com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init.new AddonInfo$AddonType(AddonInfo$AddonType__static_init#2),&com.dmdirc.addons.addonbrowser.AddonInfo$AddonType__static_init.new AddonInfo$AddonType(AddonInfo$AddonType__static_init#1)}
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.unstableDownload)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): init'ed(this.verified)
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): new ImageIcon(AddonInfo#1) num objects <= 1
    //#post(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): new ImageIcon(AddonInfo#3) num objects <= 1
    //#test_vector(void com.dmdirc.addons.addonbrowser.AddonInfo(Map)): java.lang.String:equals(...)@87: {0}, {1}
        this.id = Integer.parseInt(entry.get("id"));
        this.title = entry.get("title");
        this.author = entry.get("user");
        this.rating = Integer.parseInt(entry.get("rating"));
        this.type = entry.get("type").equals("plugin") ?
            AddonType.TYPE_PLUGIN : entry.get("type").equals("theme") ?
                AddonType.TYPE_THEME : AddonType.TYPE_ACTION_PACK;
        this.stableDownload = entry.get("stable");
        this.unstableDownload = entry.get("unstable");
        this.description = entry.get("description");
        this.verified = entry.get("verified").equals("yes");
        this.date = Integer.parseInt(entry.get("date"));
        if (entry.get("screenshot").equals("yes")) {
            this.screenshot = new ImageIcon(URLBuilder.buildURL(
    //#AddonInfo.java:88: Warning: method not available - call not analyzed
    //#    call on URL com.dmdirc.util.URLBuilder:buildURL(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.addonbrowser.AddonInfo
    //#    method: void com.dmdirc.addons.addonbrowser.AddonInfo(Map)
    //#    unanalyzed callee: URL com.dmdirc.util.URLBuilder:buildURL(String)
                    "http://addons.dmdirc.com/addonimg/" + id));
            this.screenshot.setImage(this.screenshot.getImage().
                   getScaledInstance(150, 150,Image.SCALE_SMOOTH));
        } else {
            this.screenshot = new ImageIcon(URLBuilder.buildURL(
    //#AddonInfo.java:93: Warning: method not available - call not analyzed
    //#    call on URL com.dmdirc.util.URLBuilder:buildURL(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.addonbrowser.AddonInfo
    //#    method: void com.dmdirc.addons.addonbrowser.AddonInfo(Map)
    //#    unanalyzed callee: URL com.dmdirc.util.URLBuilder:buildURL(String)
                    "dmdirc://com/dmdirc/res/logo.png"));
        }
    }
    //#AddonInfo.java:96: end of method: void com.dmdirc.addons.addonbrowser.AddonInfo.com.dmdirc.addons.addonbrowser.AddonInfo(Map)

    public String getAuthor() {
        return author;
    //#AddonInfo.java:99: method: String com.dmdirc.addons.addonbrowser.AddonInfo.getAuthor()
    //#input(String getAuthor()): this
    //#input(String getAuthor()): this.author
    //#output(String getAuthor()): return_value
    //#post(String getAuthor()): return_value == this.author
    //#post(String getAuthor()): init'ed(return_value)
    //#AddonInfo.java:99: end of method: String com.dmdirc.addons.addonbrowser.AddonInfo.getAuthor()
    }

    public int getDate() {
        return date;
    //#AddonInfo.java:103: method: int com.dmdirc.addons.addonbrowser.AddonInfo.getDate()
    //#input(int getDate()): this
    //#input(int getDate()): this.date
    //#output(int getDate()): return_value
    //#post(int getDate()): return_value == this.date
    //#post(int getDate()): init'ed(return_value)
    //#AddonInfo.java:103: end of method: int com.dmdirc.addons.addonbrowser.AddonInfo.getDate()
    }

    public String getDescription() {
        return description;
    //#AddonInfo.java:107: method: String com.dmdirc.addons.addonbrowser.AddonInfo.getDescription()
    //#input(String getDescription()): this
    //#input(String getDescription()): this.description
    //#output(String getDescription()): return_value
    //#post(String getDescription()): return_value == this.description
    //#post(String getDescription()): init'ed(return_value)
    //#AddonInfo.java:107: end of method: String com.dmdirc.addons.addonbrowser.AddonInfo.getDescription()
    }

    public int getId() {
        return id;
    //#AddonInfo.java:111: method: int com.dmdirc.addons.addonbrowser.AddonInfo.getId()
    //#input(int getId()): this
    //#input(int getId()): this.id
    //#output(int getId()): return_value
    //#post(int getId()): return_value == this.id
    //#post(int getId()): init'ed(return_value)
    //#AddonInfo.java:111: end of method: int com.dmdirc.addons.addonbrowser.AddonInfo.getId()
    }

    public int getRating() {
        return rating;
    //#AddonInfo.java:115: method: int com.dmdirc.addons.addonbrowser.AddonInfo.getRating()
    //#input(int getRating()): this
    //#input(int getRating()): this.rating
    //#output(int getRating()): return_value
    //#post(int getRating()): return_value == this.rating
    //#post(int getRating()): init'ed(return_value)
    //#AddonInfo.java:115: end of method: int com.dmdirc.addons.addonbrowser.AddonInfo.getRating()
    }

    public String getStableDownload() {
        return stableDownload;
    //#AddonInfo.java:119: method: String com.dmdirc.addons.addonbrowser.AddonInfo.getStableDownload()
    //#input(String getStableDownload()): this
    //#input(String getStableDownload()): this.stableDownload
    //#output(String getStableDownload()): return_value
    //#post(String getStableDownload()): return_value == this.stableDownload
    //#post(String getStableDownload()): init'ed(return_value)
    //#AddonInfo.java:119: end of method: String com.dmdirc.addons.addonbrowser.AddonInfo.getStableDownload()
    }

    public String getTitle() {
        return title;
    //#AddonInfo.java:123: method: String com.dmdirc.addons.addonbrowser.AddonInfo.getTitle()
    //#input(String getTitle()): this
    //#input(String getTitle()): this.title
    //#output(String getTitle()): return_value
    //#post(String getTitle()): return_value == this.title
    //#post(String getTitle()): init'ed(return_value)
    //#AddonInfo.java:123: end of method: String com.dmdirc.addons.addonbrowser.AddonInfo.getTitle()
    }

    public AddonType getType() {
        return type;
    //#AddonInfo.java:127: method: AddonInfo$AddonType com.dmdirc.addons.addonbrowser.AddonInfo.getType()
    //#input(AddonInfo$AddonType getType()): this
    //#input(AddonInfo$AddonType getType()): this.type
    //#output(AddonInfo$AddonType getType()): return_value
    //#post(AddonInfo$AddonType getType()): return_value == this.type
    //#post(AddonInfo$AddonType getType()): init'ed(return_value)
    //#AddonInfo.java:127: end of method: AddonInfo$AddonType com.dmdirc.addons.addonbrowser.AddonInfo.getType()
    }

    public String getUnstableDownload() {
        return unstableDownload;
    //#AddonInfo.java:131: method: String com.dmdirc.addons.addonbrowser.AddonInfo.getUnstableDownload()
    //#input(String getUnstableDownload()): this
    //#input(String getUnstableDownload()): this.unstableDownload
    //#output(String getUnstableDownload()): return_value
    //#post(String getUnstableDownload()): return_value == this.unstableDownload
    //#post(String getUnstableDownload()): init'ed(return_value)
    //#AddonInfo.java:131: end of method: String com.dmdirc.addons.addonbrowser.AddonInfo.getUnstableDownload()
    }

    public boolean isVerified() {
        return verified;
    //#AddonInfo.java:135: method: bool com.dmdirc.addons.addonbrowser.AddonInfo.isVerified()
    //#input(bool isVerified()): this
    //#input(bool isVerified()): this.verified
    //#output(bool isVerified()): return_value
    //#post(bool isVerified()): return_value == this.verified
    //#post(bool isVerified()): init'ed(return_value)
    //#AddonInfo.java:135: end of method: bool com.dmdirc.addons.addonbrowser.AddonInfo.isVerified()
    }

    public ImageIcon getScreenshot() {
        return screenshot;
    //#AddonInfo.java:139: method: ImageIcon com.dmdirc.addons.addonbrowser.AddonInfo.getScreenshot()
    //#input(ImageIcon getScreenshot()): this
    //#input(ImageIcon getScreenshot()): this.screenshot
    //#output(ImageIcon getScreenshot()): return_value
    //#post(ImageIcon getScreenshot()): return_value == this.screenshot
    //#post(ImageIcon getScreenshot()): init'ed(return_value)
    //#AddonInfo.java:139: end of method: ImageIcon com.dmdirc.addons.addonbrowser.AddonInfo.getScreenshot()
    }
    
    public boolean isInstalled() {
        for (UpdateComponent comp : UpdateChecker.getComponents()) {
    //#AddonInfo.java:143: method: bool com.dmdirc.addons.addonbrowser.AddonInfo.isInstalled()
    //#AddonInfo.java:143: Warning: method not available - call not analyzed
    //#    call on List com.dmdirc.updater.UpdateChecker:getComponents()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.addonbrowser.AddonInfo
    //#    method: bool isInstalled()
    //#    unanalyzed callee: List com.dmdirc.updater.UpdateChecker:getComponents()
    //#input(bool isInstalled()): "addon-"._tainted
    //#input(bool isInstalled()): __Descendant_Table[com/dmdirc/addons/addonbrowser/AddonInfo]
    //#input(bool isInstalled()): __Descendant_Table[others]
    //#input(bool isInstalled()): __Dispatch_Table.getId()I
    //#input(bool isInstalled()): this
    //#input(bool isInstalled()): this.__Tag
    //#input(bool isInstalled()): this.id
    //#output(bool isInstalled()): return_value
    //#pre[2] (bool isInstalled()): (soft) this.__Tag == com/dmdirc/addons/addonbrowser/AddonInfo
    //#presumption(bool isInstalled()): com.dmdirc.updater.UpdateChecker:getComponents(...)@143 != null
    //#presumption(bool isInstalled()): com.dmdirc.updater.UpdateComponent:getName(...)@144 != null
    //#presumption(bool isInstalled()): java.util.Iterator:next(...)@143 != null
    //#post(bool isInstalled()): init'ed(return_value)
    //#test_vector(bool isInstalled()): java.lang.String:equals(...)@144: {0}, {1}
    //#test_vector(bool isInstalled()): java.util.Iterator:hasNext(...)@143: {0}, {1}
            if (comp.getName().equals("addon-" + getId())) {
    //#AddonInfo.java:144: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.updater.UpdateComponent:getName()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.addonbrowser.AddonInfo
    //#    method: bool isInstalled()
    //#    unanalyzed callee: String com.dmdirc.updater.UpdateComponent:getName()
                return true;
            }
        }
        
        return false;
    //#AddonInfo.java:149: end of method: bool com.dmdirc.addons.addonbrowser.AddonInfo.isInstalled()
    }
    
    public boolean isDownloadable() {
        return false; /*!stableDownload.isEmpty() ||
    //#AddonInfo.java:153: method: bool com.dmdirc.addons.addonbrowser.AddonInfo.isDownloadable()
    //#output(bool isDownloadable()): return_value
    //#post(bool isDownloadable()): return_value == 0
    //#AddonInfo.java:153: end of method: bool com.dmdirc.addons.addonbrowser.AddonInfo.isDownloadable()
                (Main.UPDATE_CHANNEL != UpdateChannel.STABLE
                && !unstableDownload.isEmpty());*/
    }

    public boolean matches(final String text) {
        return title.toLowerCase().indexOf(text.toLowerCase()) > -1
    //#AddonInfo.java:159: method: bool com.dmdirc.addons.addonbrowser.AddonInfo.matches(String)
    //#input(bool matches(String)): text
    //#input(bool matches(String)): this
    //#input(bool matches(String)): this.description
    //#input(bool matches(String)): this.title
    //#output(bool matches(String)): return_value
    //#pre[1] (bool matches(String)): text != null
    //#pre[4] (bool matches(String)): this.title != null
    //#pre[3] (bool matches(String)): (soft) this.description != null
    //#post(bool matches(String)): init'ed(return_value)
    //#AddonInfo.java:159: end of method: bool com.dmdirc.addons.addonbrowser.AddonInfo.matches(String)
                || description.toLowerCase().indexOf(text.toLowerCase()) > -1;
    }

}
    //#AddonInfo.java:: end of class: com.dmdirc.addons.addonbrowser.AddonInfo$AddonType
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Descendant_Table[com/dmdirc/addons/addonbrowser/AddonInfo]
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getDate()I
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getDescription()Ljava/lang/String;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getId()I
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getRating()I
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getScreenshot()Ljavax/swing/ImageIcon;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getStableDownload()Ljava/lang/String;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getTitle()Ljava/lang/String;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getType()Lcom/dmdirc/addons/addonbrowser/AddonInfo$AddonType;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getUnstableDownload()Ljava/lang/String;
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.isDownloadable()Z
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.isInstalled()Z
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.isVerified()Z
    //#output(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.matches(Ljava/lang/String;)Z
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Descendant_Table[com/dmdirc/addons/addonbrowser/AddonInfo] == &__Dispatch_Table
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String; == &getAuthor
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getDate()I == &getDate
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getDescription()Ljava/lang/String; == &getDescription
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getId()I == &getId
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getRating()I == &getRating
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getScreenshot()Ljavax/swing/ImageIcon; == &getScreenshot
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getStableDownload()Ljava/lang/String; == &getStableDownload
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getTitle()Ljava/lang/String; == &getTitle
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getType()Lcom/dmdirc/addons/addonbrowser/AddonInfo$AddonType; == &getType
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.getUnstableDownload()Ljava/lang/String; == &getUnstableDownload
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.isDownloadable()Z == &isDownloadable
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.isInstalled()Z == &isInstalled
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.isVerified()Z == &isVerified
    //#post(com.dmdirc.addons.addonbrowser.AddonInfo__static_init): __Dispatch_Table.matches(Ljava/lang/String;)Z == &matches
    //#AddonInfo.java:: end of method: com.dmdirc.addons.addonbrowser.AddonInfo.com.dmdirc.addons.addonbrowser.AddonInfo__static_init
    //#AddonInfo.java:: end of class: com.dmdirc.addons.addonbrowser.AddonInfo
