<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
        <xs:documentation>This scheme describes the XML format used by FindBugs to store the results
            of analysis.</xs:documentation>
    </xs:annotation>

    <xs:element name="FindBugsFilter">
    <xs:complexType>
        <xs:sequence>
            <xs:element ref="Matcher" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
</xs:element>


    <xs:element name="BugCollection">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Project">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="Jar" type="xs:string" minOccurs="0"
                                maxOccurs="unbounded"/>
                            <xs:element name="AuxClasspathEntry" type="xs:string" minOccurs="0"
                                maxOccurs="unbounded"/>
                            <xs:element name="SrcDir" type="xs:string" minOccurs="0"
                                maxOccurs="unbounded"/>
                            <xs:element name="WrkDir" type="xs:string" minOccurs="0"
                                maxOccurs="1"/>
                            <xs:element name="Plugin" minOccurs="0"
                                maxOccurs="unbounded">	<xs:complexType>
                                    <xs:attribute name="id" type="xs:string"/>
                                    <xs:attribute name="enabled" type="xs:string"/>
                                </xs:complexType></xs:element>
                            <xs:element name="SuppressionFilter" minOccurs="0"
                                maxOccurs="1">	<xs:complexType>
                                    <xs:sequence>
                                    <xs:element ref="Matcher"  minOccurs="1" maxOccurs="unbounded"/>
                                    </xs:sequence>
                                </xs:complexType></xs:element>
                            <xs:element name="Cloud" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="Property" minOccurs="0"
                                            maxOccurs="unbounded">
                                            <xs:complexType>
                                                <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                <xs:attribute name="key" type="xs:string"/>
                                                </xs:extension>
                                                </xs:simpleContent>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="id" type="xs:string"/>
                                    <xs:attribute name="online" type="xs:boolean"  use="optional"/>
                                    <xs:attribute name="synced" type="xs:boolean"  use="optional"/>
                                    <xs:attribute name="detailsUrl" type="xs:string"  use="optional"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="filename" type="xs:string" use="optional"/>
                        <xs:attribute name="projectName" type="xs:string" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="BugInstance" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>Each BugInstance can have a sequence of
                            annotations</xs:documentation>
                        </xs:annotation>
                        <xs:sequence>
                            <xs:element name="ShortMessage" type="xs:string" minOccurs="0"/>
                            <xs:element name="LongMessage" type="xs:string" minOccurs="0"/>

                            <xs:choice maxOccurs="unbounded">

                                <xs:element name="Class">
                                    <xs:annotation>
                                        <xs:documentation>This annotation describes a
                                        class</xs:documentation>
                                    </xs:annotation>
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:element ref="SourceLine"/>
                                            <xs:element ref="Message" minOccurs="0"/>
                                        </xs:sequence>
                                        <xs:attribute name="classname" type="xs:string"
                                            use="required"/>
                                        <xs:attribute name="role" type="xs:string" use="optional"/>
                                        <xs:attribute name="primary" type="xs:boolean"
                                            use="optional"/>
                                    </xs:complexType>
                                </xs:element>
                                <xs:element name="Type">
                                    <xs:annotation>
                                        <xs:documentation>This annotation describes a
                                        type</xs:documentation>
                                    </xs:annotation>
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:element ref="SourceLine" minOccurs="0"/>
                                            <xs:element ref="Message" minOccurs="0"/>
                                        </xs:sequence>
                                        <xs:attribute name="descriptor" type="xs:string"
                                            use="required"/>
                                        <xs:attribute name="role" type="xs:string" use="optional"/>
                                        <xs:attribute name="typeParameters" type="xs:string"
                                            use="optional"/>
                                    </xs:complexType>
                                </xs:element>
                                <xs:element name="Method">
                                    <xs:annotation>
                                        <xs:documentation>This annotation describes a
                                        method</xs:documentation>
                                    </xs:annotation>
                                    <xs:complexType>
                                        <xs:sequence minOccurs="0">
                                            <xs:element ref="SourceLine"/>
                                            <xs:element ref="Message" minOccurs="0"/>
                                        </xs:sequence>
                                        <xs:attribute name="classname" type="xs:string"
                                            use="required"/>
                                        <xs:attribute name="name" type="xs:string" use="required"/>
                                        <xs:attribute name="signature" type="xs:string"
                                            use="required"/>
                                        <xs:attribute name="isStatic" type="xs:boolean"
                                            use="required"/>
                                        <xs:attribute name="role" type="xs:string" use="optional"/>
                                        <xs:attribute name="primary" type="xs:boolean"
                                            use="optional"/>
                                    </xs:complexType>
                                </xs:element>
                                <xs:element ref="SourceLine"/>
                                <xs:element name="LocalVariable">
                                    <xs:annotation>
                                        <xs:documentation>This annotation describes a local
                                        variable</xs:documentation>
                                    </xs:annotation>
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:element ref="Message" minOccurs="0"/>
                                        </xs:sequence>
                                        <xs:attribute name="name" type="xs:string" use="required"/>
                                        <xs:attribute name="register" type="xs:short" use="required"/>
                                        <xs:attribute name="pc" type="xs:int" use="required"/>
                                        <xs:attribute name="role" type="xs:string" use="required"/>
                                    </xs:complexType>
                                </xs:element>
                                <xs:element name="Field">
                                    <xs:annotation>
                                        <xs:documentation>This annotation describes a
                                        field</xs:documentation>
                                    </xs:annotation>
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:element ref="SourceLine"/>
                                            <xs:element ref="Message" minOccurs="0"/>
                                        </xs:sequence>
                                        <xs:attribute name="classname" type="xs:string"
                                            use="required"/>
                                        <xs:attribute name="name" type="xs:string" use="required"/>
                                        <xs:attribute name="signature" type="xs:string"
                                            use="required"/>
                                        <xs:attribute name="sourceSignature" type="xs:string"
                                            use="optional"/>
                                        <xs:attribute name="isStatic" type="xs:boolean"
                                            use="required"/>
                                        <xs:attribute name="role" type="xs:string" use="optional"/>
                                        <xs:attribute name="primary" type="xs:boolean"
                                            use="optional"/>

                                    </xs:complexType>
                                </xs:element>
                                <xs:element name="Int">
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:element ref="Message" minOccurs="0"/>
                                        </xs:sequence>
                                        <xs:attribute name="value" type="xs:long" use="required"/>
                                        <xs:attribute name="role" type="xs:string" use="optional"/>
                                    </xs:complexType>
                                </xs:element>
                                <xs:element name="String">
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:element ref="Message" minOccurs="0"/>
                                        </xs:sequence>
                                        <xs:attribute name="value" type="xs:string" use="required"/>
                                        <xs:attribute name="role" type="xs:string" use="optional"/>
                                    </xs:complexType>
                                </xs:element>
                                <xs:element name="Property">
                                    <xs:complexType>
                                        <xs:attribute name="name" type="xs:string" use="required"/>
                                        <xs:attribute name="value" type="xs:string" use="required"/>
                                    </xs:complexType>
                                </xs:element>
        <xs:element name="UserAnnotation" minOccurs="0">
                                <xs:complexType>
                                    <xs:simpleContent>
                                        <xs:extension base="xs:string">
                                            <xs:attribute name="designation" type="designationType"
                                                use="optional"/>
                                            <xs:attribute name="user" type="xs:string"
                                                use="optional"/>
                                            <xs:attribute name="needsSync" type="xs:boolean"
                                                use="optional"/>
                                            <xs:attribute name="timestamp" type="xs:unsignedLong"
                                                use="optional"/>
                                        </xs:extension>
                                    </xs:simpleContent>
                                </xs:complexType>
                            </xs:element>
                            </xs:choice>

                        </xs:sequence>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attribute name="priority" type="xs:unsignedByte" use="required"/>
                        <xs:attribute name="abbrev" type="xs:string" use="required"/>
                        <xs:attribute name="category" type="xs:string" use="required"/>
                        <xs:attribute name="uid" type="xs:unsignedLong" use="optional"/>

                        <xs:attribute name="reviews" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="firstSeen" type="xs:string" use="optional"/>
                        <xs:attribute name="consensus" type="xs:string" use="optional"/>
                        <xs:attribute name="isInCloud" type="xs:boolean" use="optional"/>

                        <!--  The following only appear with multi-version analysis files  -->
                        <xs:attribute name="last" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="removedByChange" type="xs:boolean" use="optional"/>
                        <xs:attribute name="first" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="introducedByChange" type="xs:boolean" use="optional"/>


                        <!--  The following only appear withMessages -->
                        <xs:attribute name="shouldFix" type="xs:boolean" use="optional"/>
                        <xs:attribute name="ageInDays" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="notAProblem" type="xs:boolean" use="optional"/>
                        <xs:attribute name="instanceHash" type="xs:string" use="optional"/>
                        <xs:attribute name="instanceOccurrenceNum" type="xs:unsignedInt"
                            use="optional"/>
                        <xs:attribute name="instanceOccurrenceMax" type="xs:unsignedInt"
                            use="optional"/>

                        <xs:attribute name="rank" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="cweid" type="xs:unsignedInt" use="optional"/>


                    </xs:complexType>
                </xs:element>
                <xs:element name="BugCategory" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="Description" type="xs:string"/>
                            <xs:element name="Abbreviation" type="xs:NMTOKEN" minOccurs="0"/>
                            <xs:element name="Details" type="xs:string" minOccurs="0"/>
                        </xs:sequence>
                        <xs:attribute name="category" type="xs:string" use="required"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="BugPattern" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="ShortDescription" type="xs:string"/>
                            <xs:element name="Details" type="xs:string"/>
                        </xs:sequence>
                        <xs:attribute name="type" type="xs:string" use="required"/>
                        <xs:attribute name="abbrev" type="xs:string" use="required"/>
                        <xs:attribute name="category" type="xs:string" use="required"/>
                        <xs:attribute name="cweid" type="xs:positiveInteger" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="BugCode" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="Description" type="xs:string"/>
                        </xs:sequence>
                        <xs:attribute name="abbrev" type="xs:string" use="required"/>
                        <xs:attribute name="cweid" type="xs:positiveInteger" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="Errors">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="MissingClass" type="xs:string" minOccurs="0"
                                maxOccurs="unbounded"/>
                        </xs:sequence>
                        <xs:attribute name="errors" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="missingClasses" type="xs:unsignedInt" use="optional"/>
                    </xs:complexType>
                </xs:element>

                <xs:element name="FindBugsSummary">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="FileStats" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:attribute name="path" type="xs:string" use="required"/>
                                    <xs:attribute name="bugCount" type="xs:unsignedInt"
                                        use="required"/>
                                    <xs:attribute name="size" type="xs:unsignedInt" use="optional"/>
                                    <xs:attribute name="bugHash" type="xs:string" use="optional"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="PackageStats" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="ClassStats" minOccurs="0"
                                            maxOccurs="unbounded">
                                            <xs:complexType>
                                                <xs:attribute name="class" type="xs:string"
                                                use="required"/>
                                                <xs:attribute name="sourceFile" type="xs:string"
                                                use="optional"/>
                                                <xs:attribute name="interface" type="xs:boolean"
                                                use="required"/>
                                                <xs:attribute name="size" type="xs:unsignedLong"
                                                use="required"/>
                                                <xs:attribute name="bugs" type="xs:unsignedInt"
                                                use="required"/>
                                                <xs:attribute name="priority_1"
                                                type="xs:unsignedInt" use="optional"/>
                                                <xs:attribute name="priority_2"
                                                type="xs:unsignedInt" use="optional"/>
                                                <xs:attribute name="priority_3"
                                                type="xs:unsignedInt" use="optional"/>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="package" type="xs:string" use="required"/>
                                    <xs:attribute name="total_bugs" type="xs:unsignedInt"
                                        use="required"/>
                                    <xs:attribute name="total_types" type="xs:unsignedInt"
                                        use="required"/>
                                    <xs:attribute name="total_size" type="xs:unsignedLong"
                                        use="required"/>
                                    <xs:attribute name="priority_1" type="xs:unsignedInt"
                                        use="optional"/>
                                    <xs:attribute name="priority_2" type="xs:unsignedInt"
                                        use="optional"/>
                                    <xs:attribute name="priority_3" type="xs:unsignedInt"
                                        use="optional"/>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="FindBugsProfile" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="ClassProfile" minOccurs="0"
                                            maxOccurs="unbounded">
                                            <xs:complexType>
                                                <xs:attribute name="name" type="xs:string"
                                                use="required"/>
                                                <xs:attribute name="totalMilliseconds"
                                                type="xs:unsignedInt" use="required"/>
                                                <xs:attribute name="invocations"
                                                type="xs:unsignedInt" use="required"/>
                                                <xs:attribute name="avgMicrosecondsPerInvocation"
                                                type="xs:unsignedInt" use="required"/>
                                                <xs:attribute name="maxMicrosecondsPerInvocation"
                                                type="xs:unsignedInt" use="optional"/>
                                                <xs:attribute name="maxContext" type="xs:string"
                                                    use="optional"/>
                                                <xs:attribute
                                                name="standardDeviationMircosecondsPerInvocation"
                                                type="xs:unsignedInt" use="optional"/>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="timestamp" type="xs:string" use="required"/>
                        <xs:attribute name="total_classes" type="xs:unsignedInt" use="required"/>
                        <xs:attribute name="referenced_classes" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="total_bugs" type="xs:unsignedInt" use="required"/>
                        <xs:attribute name="total_size" type="xs:unsignedInt" use="required"/>
                        <xs:attribute name="num_packages" type="xs:unsignedInt" use="required"/>
                        <xs:attribute name="java_version" type="xs:string" use="optional"/>
                        <xs:attribute name="vm_version" type="xs:string" use="optional"/>
                        <xs:attribute name="cpu_seconds" type="xs:float" use="optional"/>
                        <!-- could move to xs:duration -->
                        <xs:attribute name="clock_seconds" type="xs:float" use="optional"/>
                        <xs:attribute name="peak_mbytes" type="xs:float" use="optional"/>
                        <xs:attribute name="alloc_mbytes" type="xs:float" use="optional"/>
                        <xs:attribute name="gc_seconds" type="xs:float" use="optional"/>
                        <xs:attribute name="priority_1" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="priority_2" type="xs:unsignedInt" use="optional"/>
                        <xs:attribute name="priority_3" type="xs:unsignedInt" use="optional"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="SummaryHTML" type="xs:string" minOccurs="0"/>
                <xs:element name="ClassFeatures">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="ClassFeatureSet" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="Feature" minOccurs="0"
                                            maxOccurs="unbounded">
                                            <xs:complexType>
                                                <xs:attribute name="value" type="xs:string"
                                                use="required"/>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="class" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="History">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="AppVersion" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:attribute name="sequence" type="xs:unsignedInt"
                                        use="required"/>
                                    <xs:attribute name="timestamp" type="xs:unsignedLong"
                                        use="required"/>
                                    <xs:attribute name="release" type="xs:string" use="required"/>
                                    <xs:attribute name="codeSize" type="xs:unsignedInt"
                                        use="required"/>
                                    <xs:attribute name="numClasses" type="xs:unsignedInt"
                                        use="required"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="version" type="xs:string" use="required"/>
            <xs:attribute name="sequence" type="xs:unsignedInt" use="required"/>
            <xs:attribute name="timestamp" type="xs:unsignedLong" use="required"/>
            <xs:attribute name="analysisTimestamp" type="xs:unsignedLong" use="required"/>
            <xs:attribute name="release" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="SourceLine">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Message" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="classname" type="xs:string" use="required"/>
            <xs:attribute name="start" type="xs:int" use="optional"/>
            <xs:attribute name="end" type="xs:int" use="optional"/>
            <xs:attribute name="startBytecode" type="xs:int" use="optional"/>
            <xs:attribute name="endBytecode" type="xs:int" use="optional"/>
            <xs:attribute name="sourcefile" type="xs:string" use="optional"/>
            <xs:attribute name="sourcepath" type="xs:string" use="optional"/>
            <xs:attribute name="relSourcepath" type="xs:string" use="optional"/>
            <xs:attribute name="synthetic" type="xs:boolean" use="optional"/>
            <xs:attribute name="role" type="xs:string" use="optional"/>
            <xs:attribute name="primary" type="xs:boolean" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="Message" type="xs:string"/>

    <xs:simpleType name="designationType">
        <xs:restriction base="xs:token">
            <xs:enumeration value="UNCLASSIFIED"/>
            <xs:enumeration value="BAD_ANALYSIS"/>
            <xs:enumeration value="NOT_A_BUG"/>
            <xs:enumeration value="MOSTLY_HARMLESS"/>
            <xs:enumeration value="SHOULD_FIX"/>
            <xs:enumeration value="MUST_FIX"/>
            <xs:enumeration value="I_WILL_FIX"/>
            <xs:enumeration value="OBSOLETE_CODE"/>
        </xs:restriction>
    </xs:simpleType>



<xs:element name="Matcher" type="MatcherType" abstract="true"/>

<xs:element name="Bug" substitutionGroup="Matcher" type="BugMatcherType" />
<xs:element name="Class" substitutionGroup="Matcher" type="ClassMatcherType" />
<xs:element name="Type" substitutionGroup="Matcher" type="TypeMatcherType" />
<xs:element name="FirstVersion" substitutionGroup="Matcher" type="FirstVersionMatcherType" />
<xs:element name="LastVersion" substitutionGroup="Matcher" type="LastVersionMatcherType" />
<xs:element name="Designation" substitutionGroup="Matcher" type="DesignationMatcherType" />
<xs:element name="BugCode" substitutionGroup="Matcher" type="BugCodeMatcherType" />
<xs:element name="Local" substitutionGroup="Matcher" type="LocalMatcherType" />
<xs:element name="BugPattern" substitutionGroup="Matcher" type="BugPatternMatcherType" />
<xs:element name="Priority" substitutionGroup="Matcher" type="PriorityMatcherType" />
<xs:element name="Rank" substitutionGroup="Matcher" type="RankMatcherType" />
<xs:element name="Package" substitutionGroup="Matcher" type="PackageMatcherType" />
<xs:element name="Method" substitutionGroup="Matcher" type="MethodMatcherType" />
<xs:element name="Field" substitutionGroup="Matcher" type="FieldMatcherType" />
<xs:element name="Or" substitutionGroup="Matcher" type="OrMatcherType" />
<xs:element name="And" substitutionGroup="Matcher" type="AndMatcherType" />
<xs:element name="Match" substitutionGroup="Matcher" type="MatchMatcherType" />
<xs:element name="Not" substitutionGroup="Matcher" type="NotMatcherType" />



    <xs:complexType name="MatcherType" abstract="true" ></xs:complexType>

    <xs:complexType name="BugMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="code" type="xs:string" use="optional" />
                <xs:attribute name="pattern" type="xs:string" use="optional" />
                <xs:attribute name="category" type="xs:string" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ClassMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="name" type="xs:string" use="required" />
                <xs:attribute name="role" type="xs:string" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="TypeMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="descriptor" type="xs:string" use="required" />
                <xs:attribute name="role" type="xs:string" use="optional" />
                <xs:attribute name="typeParameters" type="xs:string" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="FirstVersionMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="value" type="xs:long" use="required" />
                <xs:attribute name="relOp" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="LastVersionMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="value" type="xs:long" use="required" />
                <xs:attribute name="relOp" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="DesignationMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="designation" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="BugCodeMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="name" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="LocalMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="name" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="BugPatternMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="name" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="PriorityMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="value" type="xs:int" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="RankMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="value" type="xs:int" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="PackageMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="name" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="MethodMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="name" type="xs:string" use="optional" />
                <xs:attribute name="params" type="xs:string" use="optional" />
                <xs:attribute name="returns" type="xs:string" use="optional" />
                <xs:attribute name="role" type="xs:string" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="FieldMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:attribute name="name" type="xs:string" use="optional" />
                <xs:attribute name="type" type="xs:string" use="optional" />
                <xs:attribute name="role" type="xs:string" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="OrMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:sequence>
                    <xs:element ref="Matcher" minOccurs="1" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="AndMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:sequence>
                    <xs:element ref="Matcher" minOccurs="1" maxOccurs="unbounded" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MatchMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:sequence>
                    <xs:element ref="Matcher" minOccurs="1" maxOccurs="unbounded" />
                </xs:sequence>
                <xs:attribute name="classregex" type="xs:string" use="optional" />
                <xs:attribute name="class" type="xs:string" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotMatcherType">
        <xs:complexContent>
            <xs:extension base="MatcherType">
                <xs:sequence>
                    <xs:element ref="Matcher" minOccurs="1" maxOccurs="1" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

</xs:schema>
