void () { String source = "class X {{ String.format(\"\"); String.format(\"\", 1); String.format(\"\", 1, 2); String.format(\"\", 1, 2, 3); }}"; String pattern = "'_Instance.'_MethodCall('_Parameter{2,3})"; assertEquals(2, findMatchesCount(source, pattern)); }