Source:
public void testIssue42798 ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/StringFormat3.java:12: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #3 in method call) [StringFormatMatches]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " context.getString(R.string.gridview_views_count), article.playsCount);\n" + " ~~~~~~~~~~~~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:16: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #3 in method call) [StringFormatMatches]\n" ) + " context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:17: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #2 in method call) [StringFormatMatches]\n" ) + " String s4 = String.format(context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:22: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #3 in method call) [StringFormatMatches]\n" ) + " context.getString(R.string.gridview_views_count), \"string\");\n" ) + " ~~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "res/values/formatstrings5.xml:3: Warning: Formatting %d followed by words: This should probably be a plural rather than a string [PluralsCandidate]\n" ) + " <string name=\"gridview_views_count\">%d vues</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "4 errors, 1 warnings\n" ) ) , lintProject ( "res/values/formatstrings5.xml" , "src/test/pkg/StringFormat3.java.txt=>src/test/pkg/StringFormat3.java" ) ) ; }

Target:
public void testIssue42798 ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/StringFormat3.java:12: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #3 in method call) [StringFormatMatches]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " context.getString(R.string.gridview_views_count), article.playsCount);\n" + " ~~~~~~~~~~~~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:16: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #3 in method call) [StringFormatMatches]\n" ) + " context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:17: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #2 in method call) [StringFormatMatches]\n" ) + " String s4 = String.format(context.getString(R.string.gridview_views_count), \"wrong\");\n" ) + " ~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "src/test/pkg/StringFormat3.java:22: Error: Wrong argument type for formatting argument \'#1\' in gridview_views_count: conversion is \'d\', received String (argument #3 in method call) [StringFormatMatches]\n" ) + " context.getString(R.string.gridview_views_count), \"string\");\n" ) + " ~~~~~~~~\n" ) + " res/values/formatstrings5.xml:3: Conflicting argument declaration here\n" ) + "res/values/formatstrings5.xml:3: Warning: Formatting %d followed by words (\"vues\"): This should probably be a plural rather than a string [PluralsCandidate]\n" ) + " <string name=\"gridview_views_count\">%d vues</string>\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "4 errors, 1 warnings\n" ) ) , lintProject ( "res/values/formatstrings5.xml" , "src/test/pkg/StringFormat3.java.txt=>src/test/pkg/StringFormat3.java" ) ) ; }