The Japanese wizard's code is a social code of ethics adopted by the wizarding society of Japan. To be found betraying the wizard's code is a terrible disgrace, the individual in question being subject to social stigma and ostracism, and even being subject to judicial action by the Japanese Ministry of Magic.
One part of this code forbade "illegal practices", such as practising Dark Magic, or breaking the International Statute of Secrecy. If someone is caught breaking this law, this person may face trial at the Ministry. Moreover, if this person is also a student from Mahoutokoro (in which one's school uniform is bewitched to turn white as an indication that that student has betrayed the code), it would lead to instant expulsion.
Behind the scenes
- The wizard's code is reminiscent of the anthropologic concept of an honour-shame culture which is, in the real world, associated with societies strongly influenced by Confucianism (among them, Japan). Indeed, historically, the samurai lived by a strict honour code (Bushido), that stressed frugality, loyalty, mastery of martial arts, and honour to the death.
- Pottermore (Mentioned only)