Loosely matching rhymes for unbalanced code