void () { String s1 = """ class X {{ int a; a = 1; } { int b = 1; b = 1; } { int c = 2; c = 2; }}"""; assertEquals(2, findMatchesCount(s1, "{ '_a*:[contains( \"'type '_a = '_b;\" )]; }")); assertEquals(1, findMatchesCount(s1, "{ '_a*:[!contains( \"'_type '_a = '_b;\" )]; }")); }