void () { String s1 = """ class X {{ if (LOG.isDebugEnabled()) { int a = 1; int a = 1; } }}"""; String pattern = """ if ('_Log.isDebugEnabled()) { '_ThenStatement; '_ThenStatement; }"""; assertEquals("Comparing declarations", 1, findMatchesCount(s1, pattern)); }