Program: 187580
Project: 187580
Buggy source:
public int savePets(boolean shutdown){
  int petCount=0;
  NBT_Configuration nbtConfiguration=new NBT_Configuration(NBTPetFile);
  NBTTagList petNBTlist=new NBTTagList();
  for (  MyPet myPet : MyPetList.getAllMyPets()) {
    NBTTagCompound petNBT=new NBTTagCompound();
    NBTTagCompound locationNBT=new NBTTagCompound("String_Node_Str");
    locationNBT.setDouble("String_Node_Str",myPet.getLocation().getX());
    locationNBT.setDouble("String_Node_Str",myPet.getLocation().getY());
    locationNBT.setDouble("String_Node_Str",myPet.getLocation().getZ());
    locationNBT.setFloat("String_Node_Str",myPet.getLocation().getYaw());
    locationNBT.setFloat("String_Node_Str",myPet.getLocation().getPitch());
    locationNBT.setString("String_Node_Str",myPet.getLocation().getWorld().getName());
    petNBT.setString("String_Node_Str",myPet.getPetType().getTypeName());
    petNBT.setString("String_Node_Str",myPet.getOwner().getName());
    petNBT.setCompound("String_Node_Str",locationNBT);
    petNBT.setInt("String_Node_Str",myPet.getHealth());
    petNBT.setInt("String_Node_Str",myPet.respawnTime);
    petNBT.setInt("String_Node_Str",myPet.getHungerValue());
    petNBT.setString("String_Node_Str",myPet.petName);
    petNBT.setDouble("String_Node_Str",myPet.getExperience().getExp());
    petNBT.setCompound("String_Node_Str",myPet.getExtendedInfo());
    if (myPet.getSkillTree() != null) {
      petNBT.setString("String_Node_Str",myPet.getSkillTree().getName());
    }
    NBTTagCompound skillsNBT=new NBTTagCompound("String_Node_Str");
    Collection<MyPetGenericSkill> skillList=myPet.getSkills().getSkills();
    if (skillList.size() > 0) {
      for (      MyPetGenericSkill skill : skillList) {
        NBTTagCompound s=skill.save();
        if (s != null) {
          skillsNBT.set(skill.getName(),s);
        }
      }
    }
    petNBT.set("String_Node_Str",skillsNBT);
    petNBTlist.add(petNBT);
    petCount++;
  }
  for (  InactiveMyPet inactiveMyPet : MyPetList.getAllInactiveMyPets()) {
    NBTTagCompound petNBT=new NBTTagCompound();
    NBTTagCompound locationNBT=new NBTTagCompound("String_Node_Str");
    locationNBT.setDouble("String_Node_Str",inactiveMyPet.getLocation().getX());
    locationNBT.setDouble("String_Node_Str",inactiveMyPet.getLocation().getY());
    locationNBT.setDouble("String_Node_Str",inactiveMyPet.getLocation().getZ());
    locationNBT.setFloat("String_Node_Str",inactiveMyPet.getLocation().getYaw());
    locationNBT.setFloat("String_Node_Str",inactiveMyPet.getLocation().getPitch());
    locationNBT.setString("String_Node_Str",inactiveMyPet.getLocation().getWorld().getName());
    petNBT.setString("String_Node_Str",inactiveMyPet.getPetType().getTypeName());
    petNBT.setString("String_Node_Str",inactiveMyPet.getPetOwner().getName());
    petNBT.setCompound("String_Node_Str",locationNBT);
    petNBT.setInt("String_Node_Str",inactiveMyPet.getHealth());
    petNBT.setInt("String_Node_Str",inactiveMyPet.getHungerValue());
    petNBT.setInt("String_Node_Str",inactiveMyPet.getRespawnTime());
    petNBT.setString("String_Node_Str",inactiveMyPet.getPetName());
    petNBT.setDouble("String_Node_Str",inactiveMyPet.getExp());
    if (inactiveMyPet.getSkillTree() != null) {
      petNBT.setString("String_Node_Str",inactiveMyPet.getSkillTree().getName());
    }
    petNBT.set("String_Node_Str",inactiveMyPet.getSkills());
    petNBTlist.add(petNBT);
    petCount++;
  }
  String[] version=this.getDescription().getVersion().split("String_Node_Str");
  nbtConfiguration.getNBTTagCompound().setString("String_Node_Str",version[0]);
  nbtConfiguration.getNBTTagCompound().setBoolean("String_Node_Str",shutdown);
  nbtConfiguration.getNBTTagCompound().set("String_Node_Str",petNBTlist);
  nbtConfiguration.getNBTTagCompound().set("String_Node_Str",savePlayers());
  nbtConfiguration.save();
  return petCount;
}

Fixed version (ground truth):
public int savePets(boolean shutdown){
  int petCount=0;
  NBT_Configuration nbtConfiguration=new NBT_Configuration(NBTPetFile);
  NBTTagList petNBTlist=new NBTTagList();
  for (  MyPet myPet : MyPetList.getAllMyPets()) {
    NBTTagCompound petNBT=new NBTTagCompound();
    NBTTagCompound locationNBT=new NBTTagCompound("String_Node_Str");
    locationNBT.setDouble("String_Node_Str",myPet.getLocation().getX());
    locationNBT.setDouble("String_Node_Str",myPet.getLocation().getY());
    locationNBT.setDouble("String_Node_Str",myPet.getLocation().getZ());
    locationNBT.setFloat("String_Node_Str",myPet.getLocation().getYaw());
    locationNBT.setFloat("String_Node_Str",myPet.getLocation().getPitch());
    locationNBT.setString("String_Node_Str",myPet.getLocation().getWorld().getName());
    petNBT.setString("String_Node_Str",myPet.getPetType().getTypeName());
    petNBT.setString("String_Node_Str",myPet.getOwner().getName());
    petNBT.setCompound("String_Node_Str",locationNBT);
    petNBT.setInt("String_Node_Str",myPet.getHealth());
    petNBT.setInt("String_Node_Str",myPet.respawnTime);
    petNBT.setInt("String_Node_Str",myPet.getHungerValue());
    petNBT.setString("String_Node_Str",myPet.petName);
    petNBT.setDouble("String_Node_Str",myPet.getExperience().getExp());
    petNBT.setCompound("String_Node_Str",myPet.getExtendedInfo());
    if (myPet.getSkillTree() != null) {
      petNBT.setString("String_Node_Str",myPet.getSkillTree().getName());
    }
    NBTTagCompound skillsNBT=new NBTTagCompound("String_Node_Str");
    Collection<MyPetGenericSkill> skillList=myPet.getSkills().getSkills();
    if (skillList.size() > 0) {
      for (      MyPetGenericSkill skill : skillList) {
        NBTTagCompound s=skill.save();
        if (s != null) {
          skillsNBT.set(skill.getName(),s);
        }
      }
    }
    petNBT.set("String_Node_Str",skillsNBT);
    petNBTlist.add(petNBT);
    petCount++;
  }
  for (  InactiveMyPet inactiveMyPet : MyPetList.getAllInactiveMyPets()) {
    NBTTagCompound petNBT=new NBTTagCompound();
    NBTTagCompound locationNBT=new NBTTagCompound("String_Node_Str");
    locationNBT.setDouble("String_Node_Str",inactiveMyPet.getLocation().getX());
    locationNBT.setDouble("String_Node_Str",inactiveMyPet.getLocation().getY());
    locationNBT.setDouble("String_Node_Str",inactiveMyPet.getLocation().getZ());
    locationNBT.setFloat("String_Node_Str",inactiveMyPet.getLocation().getYaw());
    locationNBT.setFloat("String_Node_Str",inactiveMyPet.getLocation().getPitch());
    locationNBT.setString("String_Node_Str",inactiveMyPet.getLocation().getWorld().getName());
    petNBT.setString("String_Node_Str",inactiveMyPet.getPetType().getTypeName());
    petNBT.setString("String_Node_Str",inactiveMyPet.getPetOwner().getName());
    petNBT.setCompound("String_Node_Str",locationNBT);
    petNBT.setInt("String_Node_Str",inactiveMyPet.getHealth());
    petNBT.setInt("String_Node_Str",inactiveMyPet.getHungerValue());
    petNBT.setInt("String_Node_Str",inactiveMyPet.getRespawnTime());
    petNBT.setString("String_Node_Str",inactiveMyPet.getPetName());
    petNBT.setDouble("String_Node_Str",inactiveMyPet.getExp());
    petNBT.setCompound("String_Node_Str",inactiveMyPet.getInfo());
    if (inactiveMyPet.getSkillTree() != null) {
      petNBT.setString("String_Node_Str",inactiveMyPet.getSkillTree().getName());
    }
    petNBT.set("String_Node_Str",inactiveMyPet.getSkills());
    petNBTlist.add(petNBT);
    petCount++;
  }
  String[] version=this.getDescription().getVersion().split("String_Node_Str");
  nbtConfiguration.getNBTTagCompound().setString("String_Node_Str",version[0]);
  nbtConfiguration.getNBTTagCompound().setBoolean("String_Node_Str",shutdown);
  nbtConfiguration.getNBTTagCompound().set("String_Node_Str",petNBTlist);
  nbtConfiguration.getNBTTagCompound().set("String_Node_Str",savePlayers());
  nbtConfiguration.save();
  return petCount;
}