immorality vs moral code

immorality

noun
  • An immoral act or practice. 

  • The state or quality of being immoral; vice. 

moral code

noun
  • A written, formal, and consistent set of rules prescribing righteous behavior, accepted by a person or by a group of people. 

How often have the words immorality and moral code occurred in a corpus of books? (source: Google Ngram Viewer )