question: private static boolean strContains ( Set < String > messages , String messageKey ) { String key = messageKey ; do { if ( messages . contains ( key ) ) { return true ; } int dot = key . indexOf ( '.' ) ; if ( dot < 0 ) return false ; key = key . substring ( dot + 1 ) ; } while ( true ) ; }
target:  Instead of a precise comparison, we incrementally remove leading dot-separated strings until we find a match. For example if messages contains "y.z" and we look for "x.y.z" we find a match after removing the first "x.". Compare to SourceChecker.fullMessageOf.