Should add a comment somewhere in this block clarifying the return value.  i.e. what does 'return true' mean in this context?  Or better yet, rename this function hasDuplicatedRule() (assuming it returns true if there's a duplicated rule)