Source:
public void testAll ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/StringFormatActivity.java:13: Error: Wrong argument type for formatting argument \'#1\' in hello: conversion is \'d\', received String (argument #2 in method call) [StringFormatMatches]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " String output1 = String.format(hello, target);\n" + " ~~~~~~\n" ) + " res/values-es/formatstrings.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormatActivity.java:15: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2 [StringFormatMatches]\n" ) + " String output2 = String.format(hello2, target, \"How are you\");\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "src/test/pkg/StringFormatActivity.java:21: Error: Wrong argument type for formatting argument \'#1\' in score: conversion is \'d\', received boolean (argument #2 in method call) [StringFormatMatches]\n" ) + " String output4 = String.format(score, true); // wrong\n" ) + " ~~~~\n" ) + " res/values/formatstrings.xml:6: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormatActivity.java:22: Error: Wrong argument type for formatting argument \'#1\' in score: conversion is \'d\', received boolean (argument #2 in method call) [StringFormatMatches]\n" ) + " String output = String.format(score, won); // wrong\n" ) + " ~~~\n" ) + " res/values/formatstrings.xml:6: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormatActivity.java:24: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2 [StringFormatMatches]\n" ) + " String.format(getResources().getString(R.string.hello2), target, \"How are you\");\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "src/test/pkg/StringFormatActivity.java:26: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2 [StringFormatMatches]\n" ) + " getResources().getString(R.string.hello2, target, \"How are you\");\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "src/test/pkg/StringFormatActivity.java:33: Error: Wrong argument type for formatting argument \'#1\' in hello: conversion is \'d\', received String (argument #2 in method call) [StringFormatMatches]\n" ) + " String output1 = String.format(hello, target);\n" ) + " ~~~~~~\n" ) + " res/values-es/formatstrings.xml:3: Conflicting argument declaration here\n" ) + "res/values-es/formatstrings.xml:3: Error: Inconsistent formatting types for argument #1 in format string hello (\'%1$d\'): Found both \'s\' and \'d\' (in values/formatstrings.xml) [StringFormatMatches]\n" ) + " <string name=\"hello\">%1$d</string>\n" ) + " ~~~~\n" ) + " res/values/formatstrings.xml:3: Conflicting argument type here\n" ) + "res/values-es/formatstrings.xml:4: Warning: Inconsistent number of arguments in formatting string hello2; found both 2 and 3 [StringFormatCount]\n" ) + " <string name=\"hello2\">%3$d: %1$s, %2$s?</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values/formatstrings.xml:4: Conflicting number of arguments here\n" ) + "res/values/formatstrings.xml:5: Warning: Formatting string \'missing\' is not referencing numbered arguments [1, 2] [StringFormatCount]\n" ) + " <string name=\"missing\">Hello %3$s World</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "8 errors, 2 warnings\n" ) ) , lintProject ( "res/values/formatstrings.xml" , "res/values-es/formatstrings.xml" , "src/test/pkg/StringFormatActivity.java.txt=>src/test/pkg/StringFormatActivity.java" ) ) ; }

Target:
public void testAll ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "src/test/pkg/StringFormatActivity.java:13: Error: Wrong argument type for formatting argument \'#1\' in hello: conversion is \'d\', received String (argument #2 in method call) [StringFormatMatches]\n" + " String output1 = String.format(hello, target);\n" ) + " ~~~~~~\n" ) + " res/values-es/formatstrings.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormatActivity.java:15: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2 [StringFormatMatches]\n" ) + " String output2 = String.format(hello2, target, \"How are you\");\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "src/test/pkg/StringFormatActivity.java:21: Error: Wrong argument type for formatting argument \'#1\' in score: conversion is \'d\', received boolean (argument #2 in method call) (Did you mean formatting character b?) [StringFormatMatches]\n" ) + " String output4 = String.format(score, true); // wrong\n" ) + " ~~~~\n" ) + " res/values/formatstrings.xml:6: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormatActivity.java:22: Error: Wrong argument type for formatting argument \'#1\' in score: conversion is \'d\', received boolean (argument #2 in method call) (Did you mean formatting character b?) [StringFormatMatches]\n" ) + " String output = String.format(score, won); // wrong\n" ) + " ~~~\n" ) + " res/values/formatstrings.xml:6: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormatActivity.java:24: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2 [StringFormatMatches]\n" ) + " String.format(getResources().getString(R.string.hello2), target, \"How are you\");\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "src/test/pkg/StringFormatActivity.java:26: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2 [StringFormatMatches]\n" ) + " getResources().getString(R.string.hello2, target, \"How are you\");\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "src/test/pkg/StringFormatActivity.java:33: Error: Wrong argument type for formatting argument \'#1\' in hello: conversion is \'d\', received String (argument #2 in method call) [StringFormatMatches]\n" ) + " String output1 = String.format(hello, target);\n" ) + " ~~~~~~\n" ) + " res/values-es/formatstrings.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormatActivity.java:41: Error: Wrong argument type for formatting argument \'#1\' in score: conversion is \'d\', received Boolean (argument #2 in method call) (Did you mean formatting character b?) [StringFormatMatches]\n" ) + " String output1 = String.format(score, won); // wrong\n" ) + " ~~~\n" ) + " res/values/formatstrings.xml:6: Conflicting argument declaration here\n" ) + "res/values-es/formatstrings.xml:3: Error: Inconsistent formatting types for argument #1 in format string hello (\'%1$d\'): Found both \'s\' and \'d\' (in values/formatstrings.xml) [StringFormatMatches]\n" ) + " <string name=\"hello\">%1$d</string>\n" ) + " ~~~~\n" ) + " res/values/formatstrings.xml:3: Conflicting argument type here\n" ) + "res/values-es/formatstrings.xml:4: Warning: Inconsistent number of arguments in formatting string hello2; found both 2 and 3 [StringFormatCount]\n" ) + " <string name=\"hello2\">%3$d: %1$s, %2$s?</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + " res/values/formatstrings.xml:4: Conflicting number of arguments here\n" ) + "res/values/formatstrings.xml:5: Warning: Formatting string \'missing\' is not referencing numbered arguments [1, 2] [StringFormatCount]\n" ) + " <string name=\"missing\">Hello %3$s World</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "9 errors, 2 warnings\n" ) ) , lintProject ( "res/values/formatstrings.xml" , "res/values-es/formatstrings.xml" , "src/test/pkg/StringFormatActivity.java.txt=>src/test/pkg/StringFormatActivity.java" ) ) ; }