Buggy code:
public class TransmutationKnowledgeRegistry { private static TransmutationKnowledgeRegistry transmutationKnowledgeRegistry = null ; private static File playerKnowledgeDirectory ; private static File dataKnowledgeDirectory ; private static TransmutationKnowledge templateKnowledge ; private static HashMap < UUID , TransmutationKnowledge > playerKnowledgeMap ; private TransmutationKnowledgeRegistry ( ) { } public static TransmutationKnowledgeRegistry getInstance ( ) { } public TransmutationKnowledge getTemplateKnowledge ( ) { } public Set < ItemStack > getTemplatesKnownTransmutations ( ) { } public Set < ItemStack > getTemplatesKnownTransmutationsFilteredStartsWith ( String filterString ) { } public Set < ItemStack > getTemplatesKnownTransmutationsFilteredContains ( String filterString ) { } public boolean doesTemplateKnow ( ItemStack itemStack ) { } public boolean canTemplateLearn ( ItemStack itemStack ) { } public void teachTemplate ( ItemStack itemStack ) { } public void teachTemplateEverything ( ) { } public void makeTemplateForget ( ItemStack itemStack ) { } public void makeTemplateForgetEverything ( ) { } public Set < ItemStack > getPlayersKnownTransmutations ( EntityPlayer entityPlayer ) { } public Set < ItemStack > getPlayersKnownTransmutations ( UUID playerUUID ) { } public Set < ItemStack > getPlayersKnownTransmutationsFilteredStartsWith ( EntityPlayer entityPlayer , String startsWith ) { } public Set < ItemStack > getPlayersKnownTransmutationsFilteredStartsWith ( UUID playerUUID , String startsWith ) { } public Set < ItemStack > getPlayersKnownTransmutationsFilteredContains ( EntityPlayer entityPlayer , String contains ) { } public Set < ItemStack > getPlayersKnownTransmutationsFilteredContains ( UUID playerUUID , String contains ) { } public boolean doesPlayerKnow ( EntityPlayer entityPlayer , ItemStack itemStack ) { } public boolean doesPlayerKnow ( UUID playerUUID , ItemStack itemStack ) { } public boolean canPlayerLearn ( EntityPlayer entityPlayer , ItemStack itemStack ) { } public boolean canPlayerLearn ( UUID playerUUID , ItemStack itemStack ) { } public void teachPlayer ( EntityPlayer entityPlayer , ItemStack itemStack ) { } public void teachPlayer ( UUID playerUUID , ItemStack itemStack ) { } public void teachPlayerEverything ( EntityPlayer entityPlayer ) { } public void teachPlayerEverything ( UUID playerUUID ) { } public void setPlayerCanTransmuteEverything ( EntityPlayer entityPlayer , boolean canTransmuteEverything ) { } public void setPlayerCanTransmuteEverything ( UUID playerUUID , boolean canTransmuteEverything ) { } public void makePlayerForget ( EntityPlayer entityPlayer , ItemStack itemStack ) { } public void makePlayerForget ( UUID playerUUID , ItemStack itemStack ) { } public void makePlayerForgetEverything ( EntityPlayer entityPlayer ) { } public void makePlayerForgetEverything ( UUID playerUUID ) { } public void loadTemplateKnowledgeFromDisk ( ) { } public void saveTemplateKnowledgeToDisk ( ) { } public void loadPlayerFromDiskIfNeeded ( EntityPlayer entityPlayer ) { } public void loadPlayerFromDiskIfNeeded ( UUID playerUUID ) { } public void unloadPlayer ( EntityPlayer entityPlayer ) { } public void unloadPlayer ( UUID playerUUID ) { } public void savePlayerKnowledgeToDisk ( EntityPlayer entityPlayer ) { } public void savePlayerKnowledgeToDisk ( UUID playerUUID ) { if ( ( playerUUID != null ) && ( ( TransmutationKnowledgeRegistry . playerKnowledgeDirectory ) != null ) ) { if ( ( TransmutationKnowledgeRegistry . playerKnowledgeMap . containsKey ( playerUUID ) ) && ( ( TransmutationKnowledgeRegistry . playerKnowledgeMap . get ( playerUUID ) ) != null ) ) { if ( TransmutationKnowledgeRegistry . playerKnowledgeMap . get ( playerUUID ) . hasBeenModified ( ) ) { SerializationHelper . writeTransmutationKnowledgeToFile ( TransmutationKnowledgeRegistry . playerKnowledgeDirectory , ( ( playerUUID . toString ( ) ) + ".json" ) , TransmutationKnowledgeRegistry . playerKnowledgeMap . get ( playerUUID ) ) ; } } else { loadPlayerFromDiskIfNeeded ( playerUUID ) ; <START_BUG> SerializationHelper . writeTransmutationKnowledgeToFile ( TransmutationKnowledgeRegistry . playerKnowledgeDirectory , ( ( playerUUID . toString ( ) ) + ".json" ) , new TransmutationKnowledge ( ) ) ; <END_BUG> } } } public void saveAll ( ) { } }

Fix:
SerializationHelper . writeTransmutationKnowledgeToFile ( TransmutationKnowledgeRegistry . playerKnowledgeDirectory , ( ( playerUUID . toString ( ) ) + ".json" ) , TransmutationKnowledgeRegistry . playerKnowledgeMap . get ( playerUUID ) ) ;