takes one to know one

It takes one to know one is a very common phrase which is used as an expression to others to criticize them for judging others for the same type of faults they have. In other words, its another way to say something is acting like a hypocrite because they are looking down on someone else for the very things they themselves have. For instance, if they judge someone based on their poor language, that person probably also has poor language skills.