check duplication of member functions in classes