Answer:
Defense mechanism of repression.
Step-by-step explanation:
Repression is a defense mechanism that helps a person keep distance from his own desires because of guilt. A person who criticize the imorality of certain behaviors or actios, and is later engaged in the same activities is because the person repressed wanting to do it.
Repression occurs in order to avoid guilt. Repression allows thoughts to stay unconscious so a person doesn´t have to deal with them. Normally repression happends because a person cannot accept his own dessire, because sometimes it contradicts with his ideal self.