<?xml version="1.0" encoding="UTF-8"?>
<test-data>
    <test-code>
        <description><![CDATA[
duplicate literals in argument list
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz("Howdy");
    buz("Howdy");
    buz("Howdy");
    buz("Howdy");
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
literal int argument, ok for now
     ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz(2);
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
duplicate literals in field decl
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 String[] FOO = {"foo", "foo", "foo", "foo", "foo", "foo", "foo", "foo", "foo"};
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
duplicate literals in annotations
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
public class Foo {
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
duplicate literals in annotations, skipped
     ]]></description>
        <expected-problems>0</expected-problems>
        <rule-property name="skipAnnotations">true</rule-property>
        <code><![CDATA[
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
@SuppressWarnings("foo")
public class Foo {
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
threshold property
     ]]></description>
        <expected-problems>1</expected-problems>
        <rule-property name="maxDuplicateLiterals">2</rule-property>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz("Howdy");
    buz("Howdy");
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
exception list property
     ]]></description>
        <expected-problems>0</expected-problems>
        <rule-property name="exceptionList">Howdy,foo</rule-property>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz("Howdy"); buz("Howdy"); buz("Howdy"); buz("Howdy");
    buz("foo"); buz("foo"); buz("foo"); buz("foo");
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
exception list and separator properties
     ]]></description>
        <expected-problems>0</expected-problems>
        <rule-property name="exceptionList">Howdy:foo</rule-property>
        <rule-property name="separator">:</rule-property>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz("Howdy"); buz("Howdy"); buz("Howdy"); buz("Howdy");
    buz("foo"); buz("foo"); buz("foo"); buz("foo");
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
minimum length property, minimum length reached
     ]]></description>
        <expected-problems>1</expected-problems>
        <rule-property name="minimumLength">5</rule-property>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz("Howdy"); buz("Howdy"); buz("Howdy"); buz("Howdy");
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
minimum length property, minimum length not reached
     ]]></description>
        <expected-problems>0</expected-problems>
        <rule-property name="minimumLength">5</rule-property>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz("foo"); buz("foo"); buz("foo"); buz("foo");
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
minimum length property, default value
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 private void bar() {
    buz("foo"); buz("foo"); buz("foo"); buz("foo");
    buz("fo"); buz("fo"); buz("fo"); buz("fo");
 }
}
     ]]></code>
    </test-code>

    <test-code>
        <description>#1425 Invalid XML Characters in Output</description>
        <expected-problems>1</expected-problems>
        <expected-messages>
            <message>The String literal "Tokenizer \ud801\udc1ctest" appears 4 times in this file; the first occurrence is on line 2</message>
        </expected-messages>
        <code><![CDATA[
public class Duplicate {
    String s1 = "Tokenizer \ud801\udc1ctest";
    String s2 = "Tokenizer \ud801\udc1ctest";
    String s3 = "Tokenizer \ud801\udc1ctest";
    String s4 = "Tokenizer \ud801\udc1ctest";
    char c = '\uffef';
    char c\u0030 = 'a';
}
        ]]></code>
    </test-code>
</test-data>
