@@ -0,0 +1,836 @@
+%0Apublic class FormatString %7B%0A    public static void main(String args%5B%5D) %7B%0A        java.util.Formatter f = new java.util.Formatter();%0A        System.out.printf(%22%25d%22, 7);%0A        System.out.format(%22%25d%22, 8);%0A        System.out.println(String.format(%22%25d %25s%22, 8, %22boy%22));%0A        System.out.println(f.format(%22%25d %25s %25f %25d %25f %25d%22, 8, %22boy%22, 7.7, 9, 9.9, 10));%0A        System.out.println(f.format(%22%25d %25s %25f %25d %25f%22, 8, %22boy%22, 7.7, 9, 9.9, 10));%0A        System.out.println(f.format(%22%25d %25s %25f %25d %25f %25d%22, 8, %22boy%22, 7.7, 9, 9.9, 10, 11));%0A        System.out.println(f.format(%22%25d %25%25%25%25%25s %25%25 %25f %25d %25%25%25f %25%25%25d%22, 8, %22boy%22, 7.7, 9, 9.9, 10));%0A        varargsMethod((Object%5B%5D)args);%0A    %7D%0A    %0A    private static void varargsMethod(Object... args) %7B%0A        if(args%5B0%5D instanceof String) %7B%0A            System.out.println((String)args%5B0%5D);%0A        %7D%0A    %7D%0A%7D%0A

For testing a detector that looks for mismatches between number of varargs passed and number expected based on "%" occurrences.