Program: 187643
Project: 187643
Buggy source:
public int savePets(){
  int petCount=0;
  NBTConfiguration nbtConfiguration=new NBTConfiguration(NBTPetFile);
  NBTTagList Pets=new NBTTagList();
  for (  MyPet MPet : MyPetList.getMyPetList()) {
    NBTTagCompound Pet=new NBTTagCompound();
    NBTTagCompound Location=new NBTTagCompound("String_Node_Str");
    Location.setDouble("String_Node_Str",MPet.getLocation().getX());
    Location.setDouble("String_Node_Str",MPet.getLocation().getY());
    Location.setDouble("String_Node_Str",MPet.getLocation().getZ());
    Location.setString("String_Node_Str",MPet.getLocation().getWorld().getName());
    Pet.setString("String_Node_Str",MPet.getPetType().getTypeName());
    Pet.setString("String_Node_Str",MPet.getOwner().getName());
    Pet.setCompound("String_Node_Str",Location);
    Pet.setInt("String_Node_Str",MPet.getHealth());
    Pet.setInt("String_Node_Str",MPet.RespawnTime);
    Pet.setString("String_Node_Str",MPet.Name);
    Pet.setBoolean("String_Node_Str",MPet.isSitting());
    Pet.setDouble("String_Node_Str",MPet.getExperience().getExp());
    Pet.setCompound("String_Node_Str",MPet.getExtendedInfo());
    NBTTagCompound SkillsNBTTagCompound=new NBTTagCompound("String_Node_Str");
    Collection<MyPetGenericSkill> skills=MPet.getSkillSystem().getSkills();
    if (skills.size() > 0) {
      for (      MyPetGenericSkill skill : skills) {
        NBTTagCompound s=skill.save();
        if (s != null) {
          SkillsNBTTagCompound.set(skill.getName(),s);
        }
      }
    }
    Pet.set("String_Node_Str",SkillsNBTTagCompound);
    Pets.add(Pet);
    petCount++;
  }
  for (  InactiveMyPet IMPet : MyPetList.getInactiveMyPetList()) {
    NBTTagCompound Pet=new NBTTagCompound();
    NBTTagCompound Location=new NBTTagCompound("String_Node_Str");
    Location.setDouble("String_Node_Str",IMPet.getLocation().getX());
    Location.setDouble("String_Node_Str",IMPet.getLocation().getY());
    Location.setDouble("String_Node_Str",IMPet.getLocation().getZ());
    Location.setString("String_Node_Str",IMPet.getLocation().getWorld().getName());
    Pet.setString("String_Node_Str",IMPet.getOwner().getName());
    Pet.setCompound("String_Node_Str",Location);
    Pet.setInt("String_Node_Str",IMPet.getHealth());
    Pet.setInt("String_Node_Str",IMPet.getRespawnTime());
    Pet.setString("String_Node_Str",IMPet.getName());
    Pet.setBoolean("String_Node_Str",IMPet.isSitting());
    Pet.setDouble("String_Node_Str",IMPet.getExp());
    Pet.set("String_Node_Str",IMPet.getSkills());
    Pets.add(Pet);
    petCount++;
  }
  String[] version=plugin.getDescription().getVersion().split("String_Node_Str");
  nbtConfiguration.getNBTTagCompound().setString("String_Node_Str",version[0]);
  nbtConfiguration.getNBTTagCompound().set("String_Node_Str",Pets);
  nbtConfiguration.save();
  return petCount;
}

Fixed version (ground truth):
public int savePets(){
  int petCount=0;
  NBTConfiguration nbtConfiguration=new NBTConfiguration(NBTPetFile);
  NBTTagList petNBTlist=new NBTTagList();
  for (  MyPet MPet : MyPetList.getMyPetList()) {
    NBTTagCompound petNBT=new NBTTagCompound();
    NBTTagCompound locationNBT=new NBTTagCompound("String_Node_Str");
    locationNBT.setDouble("String_Node_Str",MPet.getLocation().getX());
    locationNBT.setDouble("String_Node_Str",MPet.getLocation().getY());
    locationNBT.setDouble("String_Node_Str",MPet.getLocation().getZ());
    locationNBT.setString("String_Node_Str",MPet.getLocation().getWorld().getName());
    petNBT.setString("String_Node_Str",MPet.getPetType().getTypeName());
    petNBT.setString("String_Node_Str",MPet.getOwner().getName());
    petNBT.setCompound("String_Node_Str",locationNBT);
    petNBT.setInt("String_Node_Str",MPet.getHealth());
    petNBT.setInt("String_Node_Str",MPet.RespawnTime);
    petNBT.setString("String_Node_Str",MPet.Name);
    petNBT.setBoolean("String_Node_Str",MPet.isSitting());
    petNBT.setDouble("String_Node_Str",MPet.getExperience().getExp());
    petNBT.setCompound("String_Node_Str",MPet.getExtendedInfo());
    NBTTagCompound skillsNBT=new NBTTagCompound("String_Node_Str");
    Collection<MyPetGenericSkill> skills=MPet.getSkillSystem().getSkills();
    if (skills.size() > 0) {
      for (      MyPetGenericSkill skill : skills) {
        NBTTagCompound s=skill.save();
        if (s != null) {
          skillsNBT.set(skill.getName(),s);
        }
      }
    }
    petNBT.set("String_Node_Str",skillsNBT);
    petNBTlist.add(petNBT);
    petCount++;
  }
  for (  InactiveMyPet IMPet : MyPetList.getInactiveMyPetList()) {
    NBTTagCompound petNBT=new NBTTagCompound();
    NBTTagCompound locationNBT=new NBTTagCompound("String_Node_Str");
    locationNBT.setDouble("String_Node_Str",IMPet.getLocation().getX());
    locationNBT.setDouble("String_Node_Str",IMPet.getLocation().getY());
    locationNBT.setDouble("String_Node_Str",IMPet.getLocation().getZ());
    locationNBT.setString("String_Node_Str",IMPet.getLocation().getWorld().getName());
    petNBT.setString("String_Node_Str",IMPet.getType().getTypeName());
    petNBT.setString("String_Node_Str",IMPet.getOwner().getName());
    petNBT.setCompound("String_Node_Str",locationNBT);
    petNBT.setInt("String_Node_Str",IMPet.getHealth());
    petNBT.setInt("String_Node_Str",IMPet.getRespawnTime());
    petNBT.setString("String_Node_Str",IMPet.getName());
    petNBT.setBoolean("String_Node_Str",IMPet.isSitting());
    petNBT.setDouble("String_Node_Str",IMPet.getExp());
    petNBT.set("String_Node_Str",IMPet.getSkills());
    petNBTlist.add(petNBT);
    petCount++;
  }
  String[] version=plugin.getDescription().getVersion().split("String_Node_Str");
  nbtConfiguration.getNBTTagCompound().setString("String_Node_Str",version[0]);
  nbtConfiguration.getNBTTagCompound().set("String_Node_Str",petNBTlist);
  nbtConfiguration.save();
  return petCount;
}